![]() |
Blue Brain BioExplorer
|
Classes | |
struct | ScopedCurrentClient |
Public Types | |
using | JsonRpcServer = rockets::jsonrpc::Server< rockets::Server > |
Public Member Functions | |
Impl (PluginAPI *api) | |
~Impl () | |
void | preRender () |
void | postRender () |
void | registerNotification (const RpcParameterDescription &desc, const PropertyMap &input, const std::function< void(PropertyMap)> &action) |
void | registerNotification (const RpcDescription &desc, const std::function< void()> &action) |
void | registerRequest (const RpcParameterDescription &desc, const PropertyMap &input, const PropertyMap &output, const std::function< PropertyMap(PropertyMap)> &action) |
void | registerRequest (const RpcDescription &desc, const PropertyMap &output, const std::function< PropertyMap()> &action) |
void | _registerRequest (const std::string &name, const RetParamFunc &action) |
void | _registerRequest (const std::string &name, const RetFunc &action) |
void | _registerNotification (const std::string &name, const ParamFunc &action) |
void | _registerNotification (const std::string &name, const VoidFunc &action) |
void | processDelayedNotifies () |
void | _setupRocketsServer () |
void | _setupWebsocket () |
void | _delayedNotify (const std::function< void()> ¬ify) |
void | _rebroadcast (const std::string &endpoint, const std::string &message, const std::set< uintptr_t > &filter) |
void | _bindEndpoint (const std::string &method, rockets::jsonrpc::ResponseCallback action) |
template<typename Params , typename RetVal > | |
void | _bindEndpoint (const std::string &method, std::function< RetVal(Params)> action) |
template<typename RetVal > | |
void | _bindEndpoint (const std::string &method, std::function< RetVal()> action) |
template<typename Params > | |
void | _bindEndpoint (const std::string &method, std::function< void(Params)> action) |
void | _bindEndpoint (const std::string &method, rockets::jsonrpc::VoidCallback action) |
void | _bindModelEndpoint (const std::string &method, const std::string &key, std::function< bool(std::string, ModelDescriptorPtr)> action) |
template<class T > | |
void | _handleGET (const std::string &endpoint, T &obj, const int64_t throttleTime=DEFAULT_THROTTLE) |
template<class T > | |
void | _handlePUT (const std::string &endpoint, T &obj) |
template<class T , class PRE , class POST > | |
void | _handlePUT (const std::string &endpoint, T &obj, PRE preUpdateFunc, POST postUpdateFunc) |
template<class T > | |
void | _handle (const std::string &endpoint, T &obj, const int64_t throttleTime=DEFAULT_THROTTLE) |
template<class P , class R > | |
void | _handleRPC (const RpcParameterDescription &desc, std::function< R(P)> action) |
template<class R > | |
void | _handleRPC (const RpcDescription &desc, std::function< R()> action) |
template<class P > | |
void | _handleRPC (const RpcParameterDescription &desc, std::function< void(P)> action) |
void | _handleRPC (const RpcDescription &desc, std::function< void()> action) |
template<class P , class R > | |
void | _handleAsyncRPC (const RpcParameterDescription &desc, std::function< rockets::jsonrpc::CancelRequestCallback(P, uintptr_t, rockets::jsonrpc::AsyncResponse, rockets::jsonrpc::ProgressUpdateCallback)> action) |
template<class P , class R > | |
void | _handleTask (const RpcParameterDescription &desc, std::function< std::shared_ptr< Task< R >>(P, uintptr_t)> createTask) |
template<class T > | |
void | _handleObjectSchema (const std::string &endpoint) |
template<class T > | |
void | _handleObjectSchema (const std::string &endpoint, T &obj) |
void | _handleSchema (const std::string &endpoint, const std::string &schema) |
void | _registerEndpoints () |
void | _handleImageJPEG () |
void | _broadcastImageJpeg () |
void | _broadcastControlledImageJpeg () |
void | _handleVersion () |
void | _handleAnimationParams () |
void | _handleCamera () |
void | _handleRenderer () |
void | _handleSchemaRPC () |
void | _handleInspect () |
void | _handleQuit () |
void | _handleExitLater () |
void | _handleResetCamera () |
void | _handleSnapshot () |
void | _handleTriggerImageStream () |
void | _handleSetImageStreamingMode () |
void | _handleRequestModelUpload () |
void | _handleChunk () |
void | _handleSetModelTransferFunction () |
void | _handleGetModelTransferFunction () |
void | _handleAddClipPlane () |
void | _handleGetClipPlanes () |
void | _handleUpdateClipPlane () |
void | _handleRemoveClipPlanes () |
void | _handleGetLights () |
void | _handleAddLight () |
void | _handleRemoveLights () |
void | _handleClearLights () |
FileStats | _getFileStats (const std::string &path) |
void | _handleFsExists () |
void | _handleFsGetContent () |
void | _handleFsGetRoot () |
void | _handleFsGetListDir () |
void | _handleAddModel () |
void | _handleRemoveModel () |
void | _handleUpdateModel () |
void | _handleGetModelProperties () |
void | _handleSetModelProperties () |
void | _handleModelPropertiesSchema () |
void | _handleGetInstances () |
void | _handleGetLoaders () |
void | _handleUpdateInstance () |
void | _handlePropertyObject (PropertyObject &object, const std::string &endpoint, const std::string objectName) |
void | _handleLoadersSchema () |
void | _handleSetEnvironmentMap () |
void | _handleGetEnvironmentMap () |
void | _handleSetVideostream () |
void | _handleGetVideostream () |
void | _triggerControlledStreaming () |
![]() | |
virtual | ~ActionInterface ()=default |
void | registerNotification (const std::string &name, const std::function< void()> &action) |
template<typename Params > | |
void | registerNotification (const std::string &name, const std::function< void(Params)> &action) |
template<typename Params , typename RetVal > | |
void | registerRequest (const std::string &name, const std::function< RetVal(Params)> &action) |
template<typename RetVal > | |
void | registerRequest (const std::string &name, const std::function< RetVal()> &action) |
Public Attributes | |
Engine & | _engine |
std::unordered_map< std::string, std::pair< std::mutex, Throttle > > | _throttle |
std::vector< std::function< void()> > | _delayedNotifies |
std::mutex | _delayedNotifiesMutex |
uintptr_t | _currentClientID {NO_CURRENT_CLIENT} |
std::unordered_map< std::string, std::string > | _schemas |
ParametersManager & | _parametersManager |
std::unique_ptr< rockets::Server > | _rocketsServer |
std::unique_ptr< JsonRpcServer > | _jsonrpcServer |
bool | _manualProcessing {true} |
ImageGenerator | _imageGenerator |
Timer | _timer |
float | _leftover {0.f} |
std::map< TaskPtr, std::shared_ptr< async::task< void > > > | _tasks |
std::mutex | _tasksMutex |
BinaryRequests | _binaryRequests |
bool | _endpointsRegistered {false} |
bool | _useControlledStream {false} |
std::atomic< bool > | _controlledStreamingFlag {false} |
bool | _scheduledShutdownActive {false} |
bool | _cancelScheduledShutdown {false} |
std::unique_ptr< std::thread > | _shutDownWorker |
std::mutex | _scheduleMutex |
std::mutex | _waitLock |
std::condition_variable | _monitor |
std::vector< BaseObject * > | _objects |
Static Public Attributes | |
static constexpr uintptr_t | NO_CURRENT_CLIENT {0} |
Additional Inherited Members | |
![]() | |
using | RetParamFunc = std::function< std::string(std::string)> |
using | RetFunc = std::function< std::string()> |
using | ParamFunc = std::function< void(std::string)> |
using | VoidFunc = std::function< void()> |
Definition at line 232 of file RocketsPlugin.cpp.
using core::RocketsPlugin::Impl::JsonRpcServer = rockets::jsonrpc::Server<rockets::Server> |
Definition at line 2168 of file RocketsPlugin.cpp.
|
inline |
Definition at line 235 of file RocketsPlugin.cpp.
|
inline |
Definition at line 249 of file RocketsPlugin.cpp.
|
inline |
Definition at line 525 of file RocketsPlugin.cpp.
|
inline |
Definition at line 594 of file RocketsPlugin.cpp.
|
inline |
Definition at line 559 of file RocketsPlugin.cpp.
|
inline |
Definition at line 536 of file RocketsPlugin.cpp.
|
inline |
Definition at line 579 of file RocketsPlugin.cpp.
|
inline |
Definition at line 605 of file RocketsPlugin.cpp.
|
inline |
Definition at line 1058 of file RocketsPlugin.cpp.
|
inline |
Definition at line 1030 of file RocketsPlugin.cpp.
|
inline |
Definition at line 470 of file RocketsPlugin.cpp.
|
inline |
Definition at line 1592 of file RocketsPlugin.cpp.
|
inline |
Definition at line 752 of file RocketsPlugin.cpp.
|
inline |
Definition at line 1363 of file RocketsPlugin.cpp.
|
inline |
Definition at line 1498 of file RocketsPlugin.cpp.
|
inline |
Definition at line 1841 of file RocketsPlugin.cpp.
|
inline |
Definition at line 1141 of file RocketsPlugin.cpp.
|
inline |
Definition at line 786 of file RocketsPlugin.cpp.
|
inline |
Definition at line 1150 of file RocketsPlugin.cpp.
|
inline |
Definition at line 1317 of file RocketsPlugin.cpp.
|
inline |
Definition at line 1580 of file RocketsPlugin.cpp.
|
inline |
Definition at line 1222 of file RocketsPlugin.cpp.
|
inline |
Definition at line 1685 of file RocketsPlugin.cpp.
|
inline |
Definition at line 1705 of file RocketsPlugin.cpp.
|
inline |
Definition at line 1765 of file RocketsPlugin.cpp.
|
inline |
Definition at line 1749 of file RocketsPlugin.cpp.
|
inline |
Definition at line 645 of file RocketsPlugin.cpp.
|
inline |
Definition at line 1379 of file RocketsPlugin.cpp.
|
inline |
Definition at line 2084 of file RocketsPlugin.cpp.
|
inline |
Definition at line 1950 of file RocketsPlugin.cpp.
|
inline |
Definition at line 1425 of file RocketsPlugin.cpp.
|
inline |
Definition at line 1971 of file RocketsPlugin.cpp.
|
inline |
Definition at line 1892 of file RocketsPlugin.cpp.
|
inline |
Definition at line 1345 of file RocketsPlugin.cpp.
|
inline |
Definition at line 2128 of file RocketsPlugin.cpp.
|
inline |
Definition at line 1016 of file RocketsPlugin.cpp.
|
inline |
Definition at line 1200 of file RocketsPlugin.cpp.
|
inline |
Definition at line 2046 of file RocketsPlugin.cpp.
|
inline |
Definition at line 1927 of file RocketsPlugin.cpp.
|
inline |
Definition at line 917 of file RocketsPlugin.cpp.
|
inline |
Definition at line 923 of file RocketsPlugin.cpp.
|
inline |
Definition at line 2013 of file RocketsPlugin.cpp.
|
inline |
Definition at line 716 of file RocketsPlugin.cpp.
|
inline |
Definition at line 722 of file RocketsPlugin.cpp.
|
inline |
Definition at line 1212 of file RocketsPlugin.cpp.
|
inline |
Definition at line 1409 of file RocketsPlugin.cpp.
|
inline |
Definition at line 1565 of file RocketsPlugin.cpp.
|
inline |
Definition at line 1853 of file RocketsPlugin.cpp.
|
inline |
Definition at line 1163 of file RocketsPlugin.cpp.
|
inline |
Definition at line 1305 of file RocketsPlugin.cpp.
|
inline |
Definition at line 1259 of file RocketsPlugin.cpp.
|
inline |
Definition at line 766 of file RocketsPlugin.cpp.
|
inline |
Definition at line 779 of file RocketsPlugin.cpp.
|
inline |
Definition at line 759 of file RocketsPlugin.cpp.
|
inline |
Definition at line 773 of file RocketsPlugin.cpp.
|
inline |
Definition at line 928 of file RocketsPlugin.cpp.
|
inline |
Definition at line 1176 of file RocketsPlugin.cpp.
|
inline |
Definition at line 2065 of file RocketsPlugin.cpp.
|
inline |
Definition at line 1287 of file RocketsPlugin.cpp.
|
inline |
Definition at line 1910 of file RocketsPlugin.cpp.
|
inline |
Definition at line 1325 of file RocketsPlugin.cpp.
|
inline |
Definition at line 2093 of file RocketsPlugin.cpp.
|
inline |
Definition at line 1269 of file RocketsPlugin.cpp.
|
inline |
Definition at line 796 of file RocketsPlugin.cpp.
|
inline |
Definition at line 1281 of file RocketsPlugin.cpp.
|
inline |
Definition at line 1389 of file RocketsPlugin.cpp.
|
inline |
Definition at line 1981 of file RocketsPlugin.cpp.
|
inline |
Definition at line 1868 of file RocketsPlugin.cpp.
|
inline |
Definition at line 1126 of file RocketsPlugin.cpp.
|
inline |
Definition at line 487 of file RocketsPlugin.cpp.
|
inline |
Definition at line 937 of file RocketsPlugin.cpp.
|
inlinevirtual |
Reimplemented from core::ActionInterface.
Definition at line 390 of file RocketsPlugin.cpp.
|
inlinevirtual |
Reimplemented from core::ActionInterface.
Definition at line 400 of file RocketsPlugin.cpp.
|
inlinevirtual |
Reimplemented from core::ActionInterface.
Definition at line 380 of file RocketsPlugin.cpp.
|
inlinevirtual |
Reimplemented from core::ActionInterface.
Definition at line 370 of file RocketsPlugin.cpp.
|
inline |
Definition at line 424 of file RocketsPlugin.cpp.
|
inline |
Definition at line 456 of file RocketsPlugin.cpp.
|
inline |
Definition at line 2145 of file RocketsPlugin.cpp.
|
inline |
Definition at line 294 of file RocketsPlugin.cpp.
|
inline |
Definition at line 276 of file RocketsPlugin.cpp.
|
inline |
Definition at line 410 of file RocketsPlugin.cpp.
|
inlinevirtual |
Register an action with no parameter and no return value.
desc | description of the action/RPC |
action | the action to perform on an incoming notification |
Implements core::ActionInterface.
Definition at line 325 of file RocketsPlugin.cpp.
|
inlinevirtual |
Register an action with a property map as the parameter and no return value.
desc | description of the action/RPC |
input | the acceptable property map as the parameter for the RPC |
action | the action to perform on an incoming notification |
Implements core::ActionInterface.
Definition at line 312 of file RocketsPlugin.cpp.
|
inlinevirtual |
Register an action with no parameter and a property map as the return value.
desc | description of the action/RPC |
output | the property map layout that is returned on a successful request |
action | the action to perform on an incoming request |
Implements core::ActionInterface.
Definition at line 357 of file RocketsPlugin.cpp.
|
inlinevirtual |
Register an action with a property map as the parameter and a property map as the return value.
desc | description of the action/RPC |
input | the acceptable property map as the parameter for the RPC |
output | the property map layout that is returned on a successful request |
action | the action to perform on an incoming request |
Implements core::ActionInterface.
Definition at line 337 of file RocketsPlugin.cpp.
BinaryRequests core::RocketsPlugin::Impl::_binaryRequests |
Definition at line 2181 of file RocketsPlugin.cpp.
bool core::RocketsPlugin::Impl::_cancelScheduledShutdown {false} |
Definition at line 2195 of file RocketsPlugin.cpp.
std::atomic<bool> core::RocketsPlugin::Impl::_controlledStreamingFlag {false} |
Definition at line 2190 of file RocketsPlugin.cpp.
uintptr_t core::RocketsPlugin::Impl::_currentClientID {NO_CURRENT_CLIENT} |
Definition at line 2157 of file RocketsPlugin.cpp.
std::vector<std::function<void()> > core::RocketsPlugin::Impl::_delayedNotifies |
Definition at line 2154 of file RocketsPlugin.cpp.
std::mutex core::RocketsPlugin::Impl::_delayedNotifiesMutex |
Definition at line 2155 of file RocketsPlugin.cpp.
bool core::RocketsPlugin::Impl::_endpointsRegistered {false} |
Definition at line 2184 of file RocketsPlugin.cpp.
Engine& core::RocketsPlugin::Impl::_engine |
Definition at line 2151 of file RocketsPlugin.cpp.
ImageGenerator core::RocketsPlugin::Impl::_imageGenerator |
Definition at line 2173 of file RocketsPlugin.cpp.
std::unique_ptr<JsonRpcServer> core::RocketsPlugin::Impl::_jsonrpcServer |
Definition at line 2169 of file RocketsPlugin.cpp.
float core::RocketsPlugin::Impl::_leftover {0.f} |
Definition at line 2176 of file RocketsPlugin.cpp.
bool core::RocketsPlugin::Impl::_manualProcessing {true} |
Definition at line 2171 of file RocketsPlugin.cpp.
std::condition_variable core::RocketsPlugin::Impl::_monitor |
Definition at line 2202 of file RocketsPlugin.cpp.
std::vector<BaseObject*> core::RocketsPlugin::Impl::_objects |
Definition at line 2204 of file RocketsPlugin.cpp.
ParametersManager& core::RocketsPlugin::Impl::_parametersManager |
Definition at line 2165 of file RocketsPlugin.cpp.
std::unique_ptr<rockets::Server> core::RocketsPlugin::Impl::_rocketsServer |
Definition at line 2167 of file RocketsPlugin.cpp.
bool core::RocketsPlugin::Impl::_scheduledShutdownActive {false} |
Definition at line 2193 of file RocketsPlugin.cpp.
std::mutex core::RocketsPlugin::Impl::_scheduleMutex |
Definition at line 2199 of file RocketsPlugin.cpp.
std::unordered_map<std::string, std::string> core::RocketsPlugin::Impl::_schemas |
Definition at line 2163 of file RocketsPlugin.cpp.
std::unique_ptr<std::thread> core::RocketsPlugin::Impl::_shutDownWorker |
Definition at line 2197 of file RocketsPlugin.cpp.
std::map<TaskPtr, std::shared_ptr<async::task<void> > > core::RocketsPlugin::Impl::_tasks |
Definition at line 2178 of file RocketsPlugin.cpp.
std::mutex core::RocketsPlugin::Impl::_tasksMutex |
Definition at line 2179 of file RocketsPlugin.cpp.
std::unordered_map<std::string, std::pair<std::mutex, Throttle> > core::RocketsPlugin::Impl::_throttle |
Definition at line 2153 of file RocketsPlugin.cpp.
Timer core::RocketsPlugin::Impl::_timer |
Definition at line 2175 of file RocketsPlugin.cpp.
bool core::RocketsPlugin::Impl::_useControlledStream {false} |
Definition at line 2188 of file RocketsPlugin.cpp.
std::mutex core::RocketsPlugin::Impl::_waitLock |
Definition at line 2201 of file RocketsPlugin.cpp.
|
staticconstexpr |
Definition at line 2156 of file RocketsPlugin.cpp.