#include <service.h>
Public Types |
|
enum | State { Starting, Started, Stopping, Stopped } |
typedef PackingTraits | packing_traits |
typedef protocol::ContinuationCaller< packing_traits > | caller_type |
Public Member Functions |
|
ServiceProtocolProcessor (caller_type &caller) | |
virtual | ~ServiceProtocolProcessor ()=default |
std::string | name () const |
State | state () const |
void | start () |
void | stop () |
void | membership (const MessageInfo &msginfo, const MembershipInfo &meminfo) |
void | request (MessageInfo &msginfo) |
void | response (MessageInfo &msginfo) |
timeout_ptr | schedule_timeout (const timeout_handler &handler, const TimeValue &timeout, const bool once=EventLoop::Persist) |
void | cancel_timeout (const timeout_ptr &timeout) |
void | clear_timeouts () |
ServiceContext::timeout_map::size_type | count_timeouts () const |
Static Public Attributes |
|
static const bool | GroupMembership = GroupMembershipDisable |
Subclasses should redefine this variable to override behavior. More... |
|
Protected Member Functions |
|
ServiceContext & | context () |
virtual void | process_membership_message (const MessageInfo &msginfo, const MembershipInfo &meminfo) |
template<typename MessageType , typename Impl > | |
void | request (Impl &impl, MessageType &msg, MessageInfo &msginfo) SSRC_DECL_THROW(boost |
template<typename MessageType , typename Impl > | |
void | request (Impl &impl, MessageInfo &msginfo) SSRC_DECL_THROW(boost |
template<typename MessageType , typename Impl > | |
void | respond (Impl &impl, MessageType &msg, MessageInfo &msginfo) SSRC_DECL_THROW(boost |
template<typename MessageType , typename Impl > | |
void | respond (Impl &impl, MessageInfo &msginfo) SSRC_DECL_THROW(boost |
bool | set_request_handler (const message_handler_entry &handler) |
message_handler_map::size_type | remove_request_handler (const message_handler_entry &handler) |
void | clear_request_handlers () |
template<typename MessageType , typename Impl > | |
bool | set_request_handler (Impl &impl) |
template<typename MessageType , typename Impl > | |
bool | set_request_handler (Impl &impl, MessageType &buffer) |
bool | set_response_handler (const message_handler_entry &handler) |
message_handler_map::size_type | remove_response_handler (const message_handler_entry &handler) |
void | clear_response_handlers () |
template<typename MessageType , typename Impl > | |
bool | set_response_handler (Impl &impl) |
template<typename MessageType , typename Impl > | |
bool | set_response_handler (Impl &impl, MessageType &buffer) |
virtual void | transition (State state) |
Protected Attributes |
|
caller_type & | _caller |
Friends |
|
template<typename PP > | |
class | ServiceEventHandler |
Detailed Description
template<typename PackingTraits = BinaryPackingTraits>
class ServiceProtocolProcessor< PackingTraits >
Definition at line 191 of file service/service.h.
Member Typedef Documentation
typedef protocol::ContinuationCaller<packing_traits> ServiceProtocolProcessor< PackingTraits >::caller_type |
Definition at line 194 of file service/service.h.
typedef PackingTraits ServiceProtocolProcessor< PackingTraits >::packing_traits |
Definition at line 193 of file service/service.h.
Member Enumeration Documentation
enum ServiceProtocolProcessor::State |
Enumerator | |
---|---|
Starting | |
Started | |
Stopping | |
Stopped |
Definition at line 196 of file service/service.h.
Constructor & Destructor Documentation
|
inlineexplicit |
Definition at line 337 of file service/service.h.
|
virtualdefault |
Member Function Documentation
|
inline |
Definition at line 403 of file service/service.h.
References ServiceContext::remove_timeout().
|
inlineprotected |
Definition at line 276 of file service/service.h.
|
inlineprotected |
Definition at line 309 of file service/service.h.
|
inline |
Definition at line 407 of file service/service.h.
References ServiceContext::clear_timeouts().
|
inlineprotected |
Definition at line 223 of file service/service.h.
|
inline |
Definition at line 411 of file service/service.h.
References ServiceContext::count_timeouts().
|
inline |
Definition at line 362 of file service/service.h.
References ServiceProtocolProcessor< PackingTraits >::process_membership_message().
|
inline |
Definition at line 344 of file service/service.h.
|
inlineprotectedvirtual |
Definition at line 225 of file service/service.h.
Referenced by ServiceProtocolProcessor< PackingTraits >::membership().
|
inlineprotected |
Definition at line 271 of file service/service.h.
|
inlineprotected |
Definition at line 304 of file service/service.h.
|
inlineprotected |
Definition at line 231 of file service/service.h.
Referenced by ServiceProtocolProcessor< PackingTraits >::request().
|
inlineprotected |
Definition at line 241 of file service/service.h.
References ServiceProtocolProcessor< PackingTraits >::request().
|
inline |
Definition at line 368 of file service/service.h.
|
inlineprotected |
Definition at line 249 of file service/service.h.
Referenced by ServiceProtocolProcessor< PackingTraits >::respond().
|
inlineprotected |
Definition at line 259 of file service/service.h.
References ServiceProtocolProcessor< PackingTraits >::respond().
|
inline |
Definition at line 380 of file service/service.h.
|
inline |
Definition at line 396 of file service/service.h.
References ServiceContext::add_timeout().
|
inlineprotected |
Definition at line 266 of file service/service.h.
Referenced by ServiceProtocolProcessor< PackingTraits >::set_request_handler().
|
inlineprotected |
Definition at line 281 of file service/service.h.
References ServiceProtocolProcessor< PackingTraits >::set_request_handler().
|
inlineprotected |
Definition at line 290 of file service/service.h.
References ServiceProtocolProcessor< PackingTraits >::set_request_handler().
|
inlineprotected |
Definition at line 299 of file service/service.h.
Referenced by ServiceProtocolProcessor< PackingTraits >::set_response_handler().
|
inlineprotected |
Definition at line 314 of file service/service.h.
References ServiceProtocolProcessor< PackingTraits >::set_response_handler().
|
inlineprotected |
Definition at line 322 of file service/service.h.
References ServiceProtocolProcessor< PackingTraits >::set_response_handler().
|
inline |
Definition at line 352 of file service/service.h.
References ServiceProtocolProcessor< PackingTraits >::Starting, and ServiceProtocolProcessor< PackingTraits >::transition().
|
inline |
Definition at line 348 of file service/service.h.
Referenced by ServiceProtocolProcessor< PackingTraits >::transition().
|
inline |
Definition at line 358 of file service/service.h.
References ServiceProtocolProcessor< PackingTraits >::Stopping, and ServiceProtocolProcessor< PackingTraits >::transition().
|
inlineprotectedvirtual |
Definition at line 331 of file service/service.h.
References ServiceProtocolProcessor< PackingTraits >::state().
Referenced by ServiceProtocolProcessor< PackingTraits >::start(), and ServiceProtocolProcessor< PackingTraits >::stop().
Friends And Related Function Documentation
|
friend |
Definition at line 416 of file service/service.h.
Member Data Documentation
|
protected |
Definition at line 217 of file service/service.h.
|
static |
Subclasses should redefine this variable to override behavior.
We don't reference the template parameter so that you can subclass a protocol processor that is a concrete class that disables group membership and enable it in the subclass. Otherwise, every protocol processor would have to be a template class. The variable is used only by the Service template to initialize _caller.
Definition at line 206 of file service/service.h.
The documentation for this class was generated from the following file: