Savarese Software Research Corporation
ssrc::wisp::protocol::Caller< PT > Class Template Reference

#include <Caller.h>

Classes

class   Future
 

Public Types

typedef PT  packing_traits
 
typedef packing_traits::packer_type  packer_type
 
typedef packing_traits::unpacker_type  unpacker_type
 
typedef std::tuple< std::string, wisp_call_role, wisp_call_token jumbo_message_key_type
 

Public Member Functions

  Caller (const std::string &connection="", const std::string &name="", const unsigned int message_capacity=Message::DefaultCapacity, const bool group_membership=GroupMembershipDisable)
 
const Mailbox &  mbox ()
 
packer_type packer ()
 
unpacker_type unpacker ()
 
wisp_call_token  call_token ()
 
const std::string &  name () const
 
bool  group_membership () const
 
void  join (const std::string &group)
 
void  leave (const std::string &group)
 
unsigned int  message_capacity_initial () const
 
unsigned int  message_capacity_receive () const
 
unsigned int  message_capacity_send () const
 
unsigned int  request_queue_size () const
 
unsigned int  response_map_size () const
 
bool  returned (const wisp_call_token token) const
 
unsigned int  count_jumbo_messages () const
 
template<typename key_container >
void  collect_jumbo_message_keys (key_container &container)
 
template<typename iterator_type >
void  erase_jumbo_messages (const iterator_type &begin, const iterator_type &end)
 
template<typename MessageType >
void  unpack (MessageType &msg, MessageInfo &info)
 
void  receive (message_info_ptr &info)
  Assumes _info.unique() == true. More...
 
void  receive_request (message_info_ptr &info)
 
template<typename Traits , typename DestinationType >
void  send (const DestinationType &dest, const typename Traits::parameter_type &param, const Message::Service service=DefaultMessageServiceType)
 
template<typename Traits , typename DestinationType >
void  reply (const DestinationType &dest, const wisp_call_token token, const typename Traits::parameter_type &param, const Message::Service service=DefaultMessageServiceType)
 
template<typename Traits , typename DestinationType >
void  call (const DestinationType &dest, typename Traits::return_type *ret, const typename Traits::parameter_type &param, const Message::Service service=DefaultMessageServiceType)
 
template<typename Traits , typename DestinationType >
Future< typename Traits::return_type >::shared_ptr  call (const DestinationType &dest, const typename Traits::parameter_type &param, const Message::Service service=DefaultMessageServiceType)
 
template<typename Traits , typename DestinationType >
void  operator() (const Traits &, const DestinationType &dest, const wisp_call_token token, const typename Traits::parameter_type &param, const Message::Service service=DefaultMessageServiceType)
 
template<typename Traits , typename DestinationType >
void  operator() (const Traits &, const DestinationType &dest, typename Traits::return_type *ret, const typename Traits::parameter_type &param, const Message::Service service=DefaultMessageServiceType)
 
template<typename Traits , typename DestinationType >
Future< typename Traits::return_type >::shared_ptr  operator() (const Traits &, const DestinationType &dest, const typename Traits::parameter_type &param, const Message::Service service=DefaultMessageServiceType)
 
template<typename Traits , typename DestinationType >
void  send (const DestinationType &dest, const Message::Service service=DefaultMessageServiceType)
 
template<typename Traits , typename DestinationType , typename... P>
void  send (const Message::Service service, const DestinationType &dest, P &&...p)
 
template<typename Traits , typename DestinationType , typename... P>
void  sendp (const DestinationType &dest, P &&...p)
 
template<typename Traits , typename DestinationType >
void  reply (const DestinationType &dest, const wisp_call_token token, const Message::Service service=DefaultMessageServiceType)
 
template<typename Traits , typename DestinationType >
void  operator() (const Traits &, const DestinationType &dest, const wisp_call_token token, const Message::Service service=DefaultMessageServiceType)
 
template<typename Traits , typename DestinationType , typename... P>
void  reply (const Message::Service service, const DestinationType &dest, const wisp_call_token token, P &&...p)
 
template<typename Traits , typename DestinationType , typename... P>
void  replyp (const DestinationType &dest, const wisp_call_token token, P &&...p)
 
template<typename Traits , typename DestinationType >
void  call (const DestinationType &dest, typename Traits::return_type *ret, const Message::Service service=DefaultMessageServiceType)
 
template<typename Traits , typename DestinationType >
void  operator() (const Traits &, const DestinationType &dest, typename Traits::return_type *ret, const Message::Service service=DefaultMessageServiceType)
 
template<typename Traits , typename DestinationType , typename... P>
void  call (const Message::Service service, const DestinationType &dest, typename Traits::return_type *ret, P &&...p)
 
template<typename Traits , typename DestinationType , typename... P>
void  callp (const DestinationType &dest, typename Traits::return_type *ret, P &&...p)
 
template<typename Traits , typename DestinationType >
Future< typename Traits::return_type >::shared_ptr  call (const DestinationType &dest, const Message::Service service=DefaultMessageServiceType)
 
template<typename Traits , typename DestinationType , typename... P>
Future< typename Traits::return_type >::shared_ptr  call (const Message::Service service, const DestinationType &dest, P &&...p)
 
template<typename Traits , typename DestinationType , typename... P>
Future< typename Traits::return_type >::shared_ptr  callp (const DestinationType &dest, P &&...p)
 
template<typename Traits , typename DestinationType >
Future< typename Traits::return_type >::shared_ptr  operator() (const Traits &, const DestinationType &dest, const Message::Service service=DefaultMessageServiceType)
 

Static Public Attributes

static const unsigned int  MaxUnfragmentedMessageSize
 

Friends

template<typename ReturnType >
class  Future
 

Detailed Description

template<typename PT = BinaryPackingTraits>
class ssrc::wisp::protocol::Caller< PT >

Definition at line 317 of file Caller.h.

Member Typedef Documentation

§ jumbo_message_key_type

template<typename PT = BinaryPackingTraits>
typedef std::tuple<std::string, wisp_call_role, wisp_call_token> ssrc::wisp::protocol::Caller< PT >::jumbo_message_key_type

Definition at line 586 of file Caller.h.

§ packer_type

template<typename PT = BinaryPackingTraits>
typedef packing_traits::packer_type ssrc::wisp::protocol::Caller< PT >::packer_type

Definition at line 322 of file Caller.h.

§ packing_traits

template<typename PT = BinaryPackingTraits>
typedef PT ssrc::wisp::protocol::Caller< PT >::packing_traits

Definition at line 321 of file Caller.h.

§ unpacker_type

template<typename PT = BinaryPackingTraits>
typedef packing_traits::unpacker_type ssrc::wisp::protocol::Caller< PT >::unpacker_type

Definition at line 323 of file Caller.h.

Constructor & Destructor Documentation

§ Caller()

template<typename PT = BinaryPackingTraits>
ssrc::wisp::protocol::Caller< PT >::Caller ( const std::string &  connection = "",
const std::string &  name = "",
const unsigned int  message_capacity = Message::DefaultCapacity,
const bool  group_membership = GroupMembershipDisable 
)
inlineexplicit

Definition at line 648 of file Caller.h.

Member Function Documentation

§ call() [1/6]

template<typename PT = BinaryPackingTraits>
template<typename Traits , typename DestinationType >
void ssrc::wisp::protocol::Caller< PT >::call ( const DestinationType &  dest,
typename Traits::return_type *  ret,
const typename Traits::parameter_type &  param,
const Message::Service  service = DefaultMessageServiceType 
)
inline

Definition at line 889 of file Caller.h.

References ssrc::wisp::protocol::TwoWay, and ssrc::wisp::protocol::TwoWayRequest.

§ call() [2/6]

template<typename PT = BinaryPackingTraits>
template<typename Traits , typename DestinationType >
Future<typename Traits::return_type>::shared_ptr ssrc::wisp::protocol::Caller< PT >::call ( const DestinationType &  dest,
const typename Traits::parameter_type &  param,
const Message::Service  service = DefaultMessageServiceType 
)
inline

§ call() [3/6]

template<typename PT = BinaryPackingTraits>
template<typename Traits , typename DestinationType >
void ssrc::wisp::protocol::Caller< PT >::call ( const DestinationType &  dest,
typename Traits::return_type *  ret,
const Message::Service  service = DefaultMessageServiceType 
)
inline

Definition at line 1066 of file Caller.h.

§ call() [4/6]

template<typename PT = BinaryPackingTraits>
template<typename Traits , typename DestinationType , typename... P>
void ssrc::wisp::protocol::Caller< PT >::call ( const Message::Service  service,
const DestinationType &  dest,
typename Traits::return_type *  ret,
P &&...  p 
)
inline

Definition at line 1087 of file Caller.h.

§ call() [5/6]

template<typename PT = BinaryPackingTraits>
template<typename Traits , typename DestinationType >
Future<typename Traits::return_type>::shared_ptr ssrc::wisp::protocol::Caller< PT >::call ( const DestinationType &  dest,
const Message::Service  service = DefaultMessageServiceType 
)
inline

Definition at line 1111 of file Caller.h.

§ call() [6/6]

template<typename PT = BinaryPackingTraits>
template<typename Traits , typename DestinationType , typename... P>
Future<typename Traits::return_type>::shared_ptr ssrc::wisp::protocol::Caller< PT >::call ( const Message::Service  service,
const DestinationType &  dest,
P &&...  p 
)
inline

Definition at line 1120 of file Caller.h.

§ call_token()

template<typename PT = BinaryPackingTraits>
wisp_call_token ssrc::wisp::protocol::Caller< PT >::call_token ( )
inline

Definition at line 679 of file Caller.h.

§ callp() [1/2]

template<typename PT = BinaryPackingTraits>
template<typename Traits , typename DestinationType , typename... P>
void ssrc::wisp::protocol::Caller< PT >::callp ( const DestinationType &  dest,
typename Traits::return_type *  ret,
P &&...  p 
)
inline

Definition at line 1099 of file Caller.h.

§ callp() [2/2]

template<typename PT = BinaryPackingTraits>
template<typename Traits , typename DestinationType , typename... P>
Future<typename Traits::return_type>::shared_ptr ssrc::wisp::protocol::Caller< PT >::callp ( const DestinationType &  dest,
P &&...  p 
)
inline

Definition at line 1131 of file Caller.h.

§ collect_jumbo_message_keys()

template<typename PT = BinaryPackingTraits>
template<typename key_container >
void ssrc::wisp::protocol::Caller< PT >::collect_jumbo_message_keys ( key_container &  container )
inline

§ count_jumbo_messages()

template<typename PT = BinaryPackingTraits>
unsigned int ssrc::wisp::protocol::Caller< PT >::count_jumbo_messages ( ) const
inline

Definition at line 723 of file Caller.h.

§ erase_jumbo_messages()

template<typename PT = BinaryPackingTraits>
template<typename iterator_type >
void ssrc::wisp::protocol::Caller< PT >::erase_jumbo_messages ( const iterator_type &  begin,
const iterator_type &  end 
)
inline

Definition at line 738 of file Caller.h.

§ group_membership()

template<typename PT = BinaryPackingTraits>
bool ssrc::wisp::protocol::Caller< PT >::group_membership ( ) const
inline

Definition at line 687 of file Caller.h.

§ join()

template<typename PT = BinaryPackingTraits>
void ssrc::wisp::protocol::Caller< PT >::join ( const std::string &  group )
inline

Definition at line 691 of file Caller.h.

§ leave()

template<typename PT = BinaryPackingTraits>
void ssrc::wisp::protocol::Caller< PT >::leave ( const std::string &  group )
inline

Definition at line 695 of file Caller.h.

§ mbox()

template<typename PT = BinaryPackingTraits>
const Mailbox& ssrc::wisp::protocol::Caller< PT >::mbox ( )
inline

Definition at line 667 of file Caller.h.

§ message_capacity_initial()

template<typename PT = BinaryPackingTraits>
unsigned int ssrc::wisp::protocol::Caller< PT >::message_capacity_initial ( ) const
inline

Definition at line 699 of file Caller.h.

§ message_capacity_receive()

template<typename PT = BinaryPackingTraits>
unsigned int ssrc::wisp::protocol::Caller< PT >::message_capacity_receive ( ) const
inline

Definition at line 703 of file Caller.h.

§ message_capacity_send()

template<typename PT = BinaryPackingTraits>
unsigned int ssrc::wisp::protocol::Caller< PT >::message_capacity_send ( ) const
inline

Definition at line 707 of file Caller.h.

References ssrc::wisp::protocol::MessageInfo::message.

§ name()

template<typename PT = BinaryPackingTraits>
const std::string& ssrc::wisp::protocol::Caller< PT >::name ( ) const
inline

Definition at line 683 of file Caller.h.

§ operator()() [1/6]

template<typename PT = BinaryPackingTraits>
template<typename Traits , typename DestinationType >
void ssrc::wisp::protocol::Caller< PT >::operator() ( const Traits &  ,
const DestinationType &  dest,
const wisp_call_token  token,
const typename Traits::parameter_type &  param,
const Message::Service  service = DefaultMessageServiceType 
)
inline

Definition at line 951 of file Caller.h.

§ operator()() [2/6]

template<typename PT = BinaryPackingTraits>
template<typename Traits , typename DestinationType >
void ssrc::wisp::protocol::Caller< PT >::operator() ( const Traits &  ,
const DestinationType &  dest,
typename Traits::return_type *  ret,
const typename Traits::parameter_type &  param,
const Message::Service  service = DefaultMessageServiceType 
)
inline

Definition at line 963 of file Caller.h.

§ operator()() [3/6]

template<typename PT = BinaryPackingTraits>
template<typename Traits , typename DestinationType >
Future<typename Traits::return_type>::shared_ptr ssrc::wisp::protocol::Caller< PT >::operator() ( const Traits &  ,
const DestinationType &  dest,
const typename Traits::parameter_type &  param,
const Message::Service  service = DefaultMessageServiceType 
)
inline

Definition at line 977 of file Caller.h.

§ operator()() [4/6]

template<typename PT = BinaryPackingTraits>
template<typename Traits , typename DestinationType >
void ssrc::wisp::protocol::Caller< PT >::operator() ( const Traits &  ,
const DestinationType &  dest,
const wisp_call_token  token,
const Message::Service  service = DefaultMessageServiceType 
)
inline

Definition at line 1032 of file Caller.h.

§ operator()() [5/6]

template<typename PT = BinaryPackingTraits>
template<typename Traits , typename DestinationType >
void ssrc::wisp::protocol::Caller< PT >::operator() ( const Traits &  ,
const DestinationType &  dest,
typename Traits::return_type *  ret,
const Message::Service  service = DefaultMessageServiceType 
)
inline

Definition at line 1076 of file Caller.h.

§ operator()() [6/6]

template<typename PT = BinaryPackingTraits>
template<typename Traits , typename DestinationType >
Future<typename Traits::return_type>::shared_ptr ssrc::wisp::protocol::Caller< PT >::operator() ( const Traits &  ,
const DestinationType &  dest,
const Message::Service  service = DefaultMessageServiceType 
)
inline

Definition at line 1142 of file Caller.h.

References __END_NS_SSRC_WISP_PROTOCOL.

§ packer()

template<typename PT = BinaryPackingTraits>
packer_type& ssrc::wisp::protocol::Caller< PT >::packer ( )
inline

Definition at line 671 of file Caller.h.

§ receive()

template<typename PT = BinaryPackingTraits>
void ssrc::wisp::protocol::Caller< PT >::receive ( message_info_ptr info )
inline

Assumes _info.unique() == true.

We do not check _info.unique() for performance reasons (unique() may acquire thread mutexes). This function is intended to be called only by an event dispatcher inside an event loop in a single thread.

Definition at line 769 of file Caller.h.

References ssrc::wisp::protocol::CallHeader::is_jumbo_fragment().

§ receive_request()

template<typename PT = BinaryPackingTraits>
void ssrc::wisp::protocol::Caller< PT >::receive_request ( message_info_ptr info )
inline

§ reply() [1/3]

template<typename PT = BinaryPackingTraits>
template<typename Traits , typename DestinationType >
void ssrc::wisp::protocol::Caller< PT >::reply ( const DestinationType &  dest,
const wisp_call_token  token,
const typename Traits::parameter_type &  param,
const Message::Service  service = DefaultMessageServiceType 
)
inline

Definition at line 877 of file Caller.h.

References ssrc::wisp::protocol::OneWay, and ssrc::wisp::protocol::TwoWayResponse.

§ reply() [2/3]

template<typename PT = BinaryPackingTraits>
template<typename Traits , typename DestinationType >
void ssrc::wisp::protocol::Caller< PT >::reply ( const DestinationType &  dest,
const wisp_call_token  token,
const Message::Service  service = DefaultMessageServiceType 
)
inline

Definition at line 1023 of file Caller.h.

§ reply() [3/3]

template<typename PT = BinaryPackingTraits>
template<typename Traits , typename DestinationType , typename... P>
void ssrc::wisp::protocol::Caller< PT >::reply ( const Message::Service  service,
const DestinationType &  dest,
const wisp_call_token  token,
P &&...  p 
)
inline

Definition at line 1043 of file Caller.h.

§ replyp()

template<typename PT = BinaryPackingTraits>
template<typename Traits , typename DestinationType , typename... P>
void ssrc::wisp::protocol::Caller< PT >::replyp ( const DestinationType &  dest,
const wisp_call_token  token,
P &&...  p 
)
inline

Definition at line 1055 of file Caller.h.

§ request_queue_size()

template<typename PT = BinaryPackingTraits>
unsigned int ssrc::wisp::protocol::Caller< PT >::request_queue_size ( ) const
inline

Definition at line 711 of file Caller.h.

§ response_map_size()

template<typename PT = BinaryPackingTraits>
unsigned int ssrc::wisp::protocol::Caller< PT >::response_map_size ( ) const
inline

Definition at line 715 of file Caller.h.

§ returned()

template<typename PT = BinaryPackingTraits>
bool ssrc::wisp::protocol::Caller< PT >::returned ( const wisp_call_token  token ) const
inline

§ send() [1/3]

template<typename PT = BinaryPackingTraits>
template<typename Traits , typename DestinationType >
void ssrc::wisp::protocol::Caller< PT >::send ( const DestinationType &  dest,
const typename Traits::parameter_type &  param,
const Message::Service  service = DefaultMessageServiceType 
)
inline

Definition at line 867 of file Caller.h.

References ssrc::wisp::protocol::OneWay, and ssrc::wisp::protocol::OneWayRequest.

§ send() [2/3]

template<typename PT = BinaryPackingTraits>
template<typename Traits , typename DestinationType >
void ssrc::wisp::protocol::Caller< PT >::send ( const DestinationType &  dest,
const Message::Service  service = DefaultMessageServiceType 
)
inline

Definition at line 995 of file Caller.h.

§ send() [3/3]

template<typename PT = BinaryPackingTraits>
template<typename Traits , typename DestinationType , typename... P>
void ssrc::wisp::protocol::Caller< PT >::send ( const Message::Service  service,
const DestinationType &  dest,
P &&...  p 
)
inline

Definition at line 1003 of file Caller.h.

§ sendp()

template<typename PT = BinaryPackingTraits>
template<typename Traits , typename DestinationType , typename... P>
void ssrc::wisp::protocol::Caller< PT >::sendp ( const DestinationType &  dest,
P &&...  p 
)
inline

Definition at line 1013 of file Caller.h.

§ unpack()

template<typename PT = BinaryPackingTraits>
template<typename MessageType >
void ssrc::wisp::protocol::Caller< PT >::unpack ( MessageType &  msg,
MessageInfo info 
)
inline

§ unpacker()

template<typename PT = BinaryPackingTraits>
unpacker_type& ssrc::wisp::protocol::Caller< PT >::unpacker ( )
inline

Definition at line 675 of file Caller.h.

Friends And Related Function Documentation

§ Future

template<typename PT = BinaryPackingTraits>
template<typename ReturnType >
friend class Future
friend

Definition at line 318 of file Caller.h.

Member Data Documentation

§ MaxUnfragmentedMessageSize

template<typename PT = BinaryPackingTraits>
const unsigned int ssrc::wisp::protocol::Caller< PT >::MaxUnfragmentedMessageSize
static
Initial value:
=
131072U

Definition at line 328 of file Caller.h.


The documentation for this class was generated from the following file:

Savarese Software Research Corporation
Copyright © 2006-2012 Savarese Software Research Corporation. All rights reserved.