IBR-DTN
1.0.0
|
#include <ApiServer.h>
Public Member Functions | |
ApiServer (const ibrcommon::File &socket) | |
ApiServer (const ibrcommon::vinterface &net, int port=4550) | |
virtual | ~ApiServer () |
virtual const std::string | getName () const |
void | freeRegistration (Registration ®) |
void | raiseEvent (const dtn::routing::QueueBundleEvent &evt) throw () |
Registration & | getRegistration (const std::string &handle) |
virtual size_t | timeout (ibrcommon::Timer *) |
![]() | |
IndependentComponent () | |
virtual | ~IndependentComponent () |
virtual void | initialize () throw () |
virtual void | startup () throw () |
virtual void | terminate () throw () |
![]() | |
virtual | ~Component ()=0 |
![]() | |
virtual | ~EventReceiver () |
![]() | |
virtual | ~ApiServerInterface () |
Protected Member Functions | |
void | __cancellation () throw () |
virtual void | connectionUp (ClientHandler *conn) |
virtual void | connectionDown (ClientHandler *conn) |
void | componentUp () throw () |
void | componentRun () throw () |
void | componentDown () throw () |
![]() | |
void | run () throw () |
Definition at line 43 of file ApiServer.h.
dtn::api::ApiServer::ApiServer | ( | const ibrcommon::File & | socket | ) |
Definition at line 45 of file ApiServer.cpp.
dtn::api::ApiServer::ApiServer | ( | const ibrcommon::vinterface & | net, |
int | port = 4550 |
||
) |
Definition at line 51 of file ApiServer.cpp.
|
virtual |
Definition at line 96 of file ApiServer.cpp.
|
protectedvirtual |
This method is called after componentDown() and should should guarantee that blocking calls in componentRun() will unblock.
Implements dtn::daemon::IndependentComponent.
Definition at line 105 of file ApiServer.cpp.
|
protectedvirtual |
This method is called if the component should stop. Clean-up code should be inserted here.
Implements dtn::daemon::IndependentComponent.
Definition at line 216 of file ApiServer.cpp.
References dtn::core::EventDispatcher< E >::remove().
|
protectedvirtual |
This is the run method. The component should loop in there until componentDown() or __cancellation() is called.
Implements dtn::daemon::IndependentComponent.
Definition at line 125 of file ApiServer.cpp.
References dtn::api::Registration::getHandle(), dtn::daemon::Configuration::getInstance(), and dtn::daemon::Configuration::version().
|
protectedvirtual |
Is called in preparation of the component. Before componentRun() is called.
Implements dtn::daemon::IndependentComponent.
Definition at line 111 of file ApiServer.cpp.
References dtn::core::EventDispatcher< E >::add().
|
protectedvirtual |
Implements dtn::api::ApiServerInterface.
Definition at line 309 of file ApiServer.cpp.
|
protectedvirtual |
Implements dtn::api::ApiServerInterface.
Definition at line 303 of file ApiServer.cpp.
|
virtual |
Implements dtn::api::ApiServerInterface.
Definition at line 327 of file ApiServer.cpp.
References dtn::api::Registration::detach(), dtn::api::Registration::getHandle(), and dtn::api::Registration::isPersistent().
|
virtual |
Implements dtn::daemon::Component.
Definition at line 298 of file ApiServer.cpp.
|
virtual |
retrieve a registration for a given handle from the ApiServers registration list the registration is automatically set into the attached state
handle | the handle of the registration to return |
Registration::AlreadyAttachedException | the registration is already attached to a different client |
Registration::NotFoundException | no registration was found for the given handle |
Implements dtn::api::ApiServerInterface.
Definition at line 244 of file ApiServer.cpp.
References dtn::api::Registration::attach(), and dtn::api::Registration::isPersistent().
|
virtual |
Implements dtn::core::EventReceiver< dtn::routing::QueueBundleEvent >.
Definition at line 353 of file ApiServer.cpp.
References dtn::api::ClientHandler::getRegistration(), dtn::api::Registration::hasSubscribed(), dtn::api::Registration::notify(), and dtn::api::Registration::NOTIFY_BUNDLE_AVAILABLE.
|
virtual |
Removes expired registrations.
ibrcommon::Timer::StopTimerException | thrown, if the GarbageCollector should be stopped |
Definition at line 264 of file ApiServer.cpp.
References dtn::api::Registration::attach(), dtn::api::Registration::detach(), dtn::api::Registration::getHandle(), and dtn::api::Registration::isPersistent().