![]() |
AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <IPCRouter.h>
Public Member Functions | |
void | onMessage (const std::string &message) |
IPCHandlerRegistrationInterface Functions | |
std::shared_ptr< IPCDispatcherInterface > | registerHandler (const std::string &ipcNamespace, std::weak_ptr< IPCHandlerBase > handler) override |
bool | deregisterHandler (const std::string &ipcNamespace) override |
RequiresShutdown Functions | |
void | doShutdown () override |
![]() | |
virtual | ~IPCHandlerRegistrationInterface ()=default |
![]() | |
RequiresShutdown (const std::string &name) | |
virtual | ~RequiresShutdown () |
Destructor. More... | |
const std::string & | name () const |
void | shutdown () |
bool | isShutdown () const |
Static Public Member Functions | |
static std::shared_ptr< IPCRouter > | create (std::shared_ptr< communication::MessagingServerInterface > messagingServer, std::shared_ptr< IPCDispatcherInterface > ipcDispatcher, std::shared_ptr< IPCVersionManager > ipcVersionManager) |
Additional Inherited Members |
The function of this class is responsible for managing the messages to and from IPC client. Following are the rules:
invokeMethod
. Note that access to handler component registry is time-bound and thread-safe. To accommodate these attributes, this class deliberately avoids executor pattern and instead relies on mutex lock to minimize the critical section.
|
static |
Constructs an instance of an IPC Router.
messagingServer | An implementation of MessagingServerInterface . |
ipcDispatcher | An instance of a message dispatcher to IPC Client. |
ipcVersionManager | An instance of a IPCVersionManager . |
|
overridevirtual |
De-registers a IPC handler interface for a given namespace
ipcNamespace | Namespace for the IPC handler to be de-registered. |
Implements alexaClientSDK::sampleApplications::ipcServerSampleApp::ipc::IPCHandlerRegistrationInterface.
|
overridevirtual |
Prepares/enables this object to be deleted. This should be the last function called on this object prior to deleting (or resetting) its shared_ptr.
Implements alexaClientSDK::avsCommon::utils::RequiresShutdown.
void alexaClientSDK::sampleApplications::ipcServerSampleApp::ipc::IPCRouter::onMessage | ( | const std::string & | message | ) |
Called when a new message needs to be routed to registered ipc component.
message | a serialized message that needs to be routed to respective IPC component. |
|
overridevirtual |
Registers a IPC handler interface for a given namespace
ipcNamespace | Namespace for the IPC handler to be registered. |
handler | A weak pointer to the handler instance. |
Implements alexaClientSDK::sampleApplications::ipcServerSampleApp::ipc::IPCHandlerRegistrationInterface.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0