ssrc::wispers::group_session::GroupSessionService Class Reference
GroupSessionService is not a standalone service (although it was originally). More...
#include <service.h>

Public Member Functions | |
| GroupSessionService (super::caller_type &caller, const wisp_message_protocol protocol, GroupSessionDatabase *db, const GroupSessionInitializer &initializer) | |
| The db argument should be the result of a direct new allocation because GroupSessionService stores it in a scoped_ptr. | |
| virtual | ~GroupSessionService () |
| virtual unsigned int | check_for_expirations (const sec_type now) |
Protected Types | |
| typedef GroupSessionProtocol | protocol_traits |
Protected Member Functions | |
| WISP_IMPORT (protocol_traits, MessageCreateGroupSession) | |
| WISP_IMPORT (protocol_traits, MessageEndGroupSession) | |
| WISP_IMPORT (protocol_traits, MessageExpireGroupSession) | |
| WISP_IMPORT (protocol_traits, MessageRelayEvent) | |
| WISP_IMPORT (protocol_traits, MessageRelayEventSelfDiscard) | |
| WISP_IMPORT (protocol_traits, MessageFindGroupSessions) | |
| WISP_IMPORT (protocol_traits, MessageFindGroupSessionsResult) | |
| WISP_IMPORT (protocol_traits, MessageFindGroupSessionsForMember) | |
| WISP_IMPORT (protocol_traits, MessageReturnGroupSessionsForMember) | |
| WISP_IMPORT (protocol_traits, MessageFindGroupSessionsByType) | |
| WISP_IMPORT (protocol_traits, MessageReturnGroupSessionsByType) | |
| WISP_IMPORT (protocol_traits, MessageCreateReservation) | |
| WISP_IMPORT (protocol_traits, MessageCancelReservation) | |
| WISP_IMPORT (protocol_traits, MessageFindMembers) | |
| WISP_IMPORT (protocol_traits, MessageFindMembersResult) | |
| WISP_IMPORT (protocol_traits, MessageAddMembers) | |
| WISP_IMPORT (protocol_traits, MessageRemoveMembers) | |
| WISP_IMPORT (protocol_traits, MessageAddMember) | |
| WISP_IMPORT (protocol_traits, MessageRemoveMember) | |
| WISP_IMPORT (SessionProtocol, MessageExpireSession) | |
| WISP_IMPORT (SessionProtocol, MessageLoginSession) | |
| WISP_IMPORT (protocol_traits, CallStartGroupSession) | |
| WISP_IMPORT (protocol_traits, CallExpireGroupSession) | |
| WISP_IMPORT (protocol_traits, CallReturnGroupSessionsForMember) | |
| WISP_IMPORT (protocol_traits, CallReturnGroupSessionsByType) | |
| WISP_IMPORT (protocol_traits, CallFindGroupSessionsResult) | |
| WISP_IMPORT (protocol_traits, CallFindMembersResult) | |
| WISP_IMPORT (protocol_traits, CallAddMemberConfirm) | |
| WISP_IMPORT (protocol_traits, CallRemoveMemberConfirm) | |
| gsid_type | generate_gsid () |
| void | recount_sessions () |
| virtual void | start_group_session (const GroupSession &session, ByteBuffer &payload) |
| void | process_request (MessageCreateGroupSession &msg, const MessageInfo &) |
| virtual void | end_group_session (const gsid_type gsid) |
| void | process_request (const MessageEndGroupSession &msg, const MessageInfo &) |
| virtual bool | insert_reservation (const Reservation &reservation, ByteBuffer &payload) |
| void | process_request (MessageCreateReservation &msg, const MessageInfo &) |
| virtual void | confirm_reservation_activation (const GroupSession &session) |
| template<typename reservation_type > | |
| void | activate_reservation (const reservation_type &reservation, const string &session_name, const member_container &additional_participants) |
| void | process_request (const MessageFindGroupSessionsByType &msg, const MessageInfo &msginfo) |
| void | process_request (const MessageFindGroupSessions &msg, const MessageInfo &msginfo) |
| void | process_request (const MessageFindMembers &msg, const MessageInfo &msginfo) |
| void | process_request (const MessageAddMembers &msg, const MessageInfo &) |
| void | process_request (const MessageRemoveMembers &msg, const MessageInfo &) |
| void | process_request (const MessageAddMember &msg, const MessageInfo &msginfo) |
| void | process_request (const MessageRemoveMember &msg, const MessageInfo &msginfo) |
| virtual unsigned int | cancel_reservation (const gsid_type gsid, const uid_type requestor, const MessageInfo &) |
| void | process_request (const MessageCancelReservation &msg, const MessageInfo &msginfo) |
| void | process_request (const MessageFindGroupSessionsForMember &msg, const MessageInfo &msginfo) |
| void | process_request (const MessageRelayEvent &msg, const MessageInfo &) |
| void | process_request (const MessageRelayEventSelfDiscard &msg, const MessageInfo &) |
| void | process_request (const MessageExpireSession &msg, const MessageInfo &) |
| void | process_request (const MessageLoginSession &msg, const MessageInfo &) |
| virtual void | transition (State state) |
Protected Attributes | |
| const unsigned int | _protocol_id |
| const unsigned int | _partition_id |
| const unsigned int | _num_partitions |
| const unsigned int | _ids_per_expiration_message |
| boost::scoped_ptr < GroupSessionDatabase > | _database |
| const gsid_type | _gsid_min |
| const gsid_type | _gsid_max |
| Random< gsid_type > | _random |
| TimeValue | _gs_poll_interval |
| timeout_ptr | _gs_poll_timeout |
| unsigned int | _session_count |
| unsigned int | _reservation_count |
Static Protected Attributes | |
| static const string | EventGroupExpireGroupSession |
Friends | |
| class | NS_SSRC_WISP_SERVICE::ServiceProtocolProcessor< packing_traits > |
Detailed Description
GroupSessionService is not a standalone service (although it was originally).
For scalability reasons, applications that require group sessions should create a custom group session controller that subclasses GroupSessionService. It's not a straightforward procedure, detailed instructions will have to be written.
Definition at line 50 of file group_session/service.h.
Member Typedef Documentation
typedef GroupSessionProtocol ssrc::wispers::group_session::GroupSessionService::protocol_traits [protected] |
Definition at line 55 of file group_session/service.h.
Constructor & Destructor Documentation
| ssrc::wispers::group_session::GroupSessionService::GroupSessionService | ( | super::caller_type & | caller, | |
| const wisp_message_protocol | protocol, | |||
| GroupSessionDatabase * | db, | |||
| const GroupSessionInitializer & | initializer | |||
| ) |
The db argument should be the result of a direct new allocation because GroupSessionService stores it in a scoped_ptr.
This is a kluge to avoid making GroupSessionService a template class.
Definition at line 562 of file group_session/service.cc.
| virtual ssrc::wispers::group_session::GroupSessionService::~GroupSessionService | ( | ) | [inline, virtual] |
Definition at line 253 of file group_session/service.h.
Member Function Documentation
| void ssrc::wispers::group_session::GroupSessionService::activate_reservation | ( | const reservation_type & | reservation, | |
| const string & | session_name, | |||
| const member_container & | additional_participants | |||
| ) | [inline, protected] |
Definition at line 156 of file group_session/service.h.
References created(), DatabaseTransaction::end(), and GroupSession.
| unsigned int ssrc::wispers::group_session::GroupSessionService::cancel_reservation | ( | const gsid_type | gsid, | |
| const uid_type | requestor, | |||
| const MessageInfo & | ||||
| ) | [protected, virtual] |
Definition at line 150 of file group_session/service.cc.
References _database, _reservation_count, and DatabaseTransaction::end().
| unsigned int ssrc::wispers::group_session::GroupSessionService::check_for_expirations | ( | const sec_type | now | ) | [virtual] |
Definition at line 125 of file group_session/service.cc.
| virtual void ssrc::wispers::group_session::GroupSessionService::confirm_reservation_activation | ( | const GroupSession & | session | ) | [inline, protected, virtual] |
Definition at line 150 of file group_session/service.h.
| virtual void ssrc::wispers::group_session::GroupSessionService::end_group_session | ( | const gsid_type | gsid | ) | [inline, protected, virtual] |
Definition at line 122 of file group_session/service.h.
References DatabaseTransaction::end().
| gsid_type ssrc::wispers::group_session::GroupSessionService::generate_gsid | ( | ) | [inline, protected] |
Definition at line 103 of file group_session/service.h.
Referenced by process_request().
| virtual bool ssrc::wispers::group_session::GroupSessionService::insert_reservation | ( | const Reservation & | reservation, | |
| ByteBuffer & | payload | |||
| ) | [inline, protected, virtual] |
Definition at line 136 of file group_session/service.h.
| void ssrc::wispers::group_session::GroupSessionService::process_request | ( | const MessageLoginSession & | msg, | |
| const MessageInfo & | ||||
| ) | [protected] |
Definition at line 522 of file group_session/service.cc.
References _database, WebServiceProtocol::event_queue_ws_group(), uid(), and web_event_indirect().
| void ssrc::wispers::group_session::GroupSessionService::process_request | ( | const MessageExpireSession & | msg, | |
| const MessageInfo & | ||||
| ) | [protected] |
Definition at line 470 of file group_session/service.cc.
References _database, DatabaseTransaction::end(), WebServiceProtocol::event_queue_ws_group(), and web_event_indirect().
| void ssrc::wispers::group_session::GroupSessionService::process_request | ( | const MessageRelayEventSelfDiscard & | msg, | |
| const MessageInfo & | ||||
| ) | [protected] |
Definition at line 454 of file group_session/service.cc.
References _database.
| void ssrc::wispers::group_session::GroupSessionService::process_request | ( | const MessageRelayEvent & | msg, | |
| const MessageInfo & | ||||
| ) | [protected] |
Definition at line 437 of file group_session/service.cc.
References _database.
| void ssrc::wispers::group_session::GroupSessionService::process_request | ( | const MessageFindGroupSessionsForMember & | msg, | |
| const MessageInfo & | msginfo | |||
| ) | [protected] |
Definition at line 420 of file group_session/service.cc.
References _database.
| void ssrc::wispers::group_session::GroupSessionService::process_request | ( | const MessageCancelReservation & | msg, | |
| const MessageInfo & | msginfo | |||
| ) | [inline, protected] |
Definition at line 223 of file group_session/service.h.
| void ssrc::wispers::group_session::GroupSessionService::process_request | ( | const MessageRemoveMember & | msg, | |
| const MessageInfo & | msginfo | |||
| ) | [protected] |
Definition at line 395 of file group_session/service.cc.
References _database, GroupSessionProtocol::Observer, and GroupSessionProtocol::Participant.
| void ssrc::wispers::group_session::GroupSessionService::process_request | ( | const MessageAddMember & | msg, | |
| const MessageInfo & | msginfo | |||
| ) | [protected] |
Definition at line 351 of file group_session/service.cc.
References _database.
| void ssrc::wispers::group_session::GroupSessionService::process_request | ( | const MessageRemoveMembers & | msg, | |
| const MessageInfo & | ||||
| ) | [protected] |
Definition at line 332 of file group_session/service.cc.
References _database, and DatabaseTransaction::end().
| void ssrc::wispers::group_session::GroupSessionService::process_request | ( | const MessageAddMembers & | msg, | |
| const MessageInfo & | ||||
| ) | [protected] |
Definition at line 313 of file group_session/service.cc.
References _database, and DatabaseTransaction::end().
| void ssrc::wispers::group_session::GroupSessionService::process_request | ( | const MessageFindMembers & | msg, | |
| const MessageInfo & | msginfo | |||
| ) | [protected] |
Definition at line 293 of file group_session/service.cc.
References _database.
| void ssrc::wispers::group_session::GroupSessionService::process_request | ( | const MessageFindGroupSessions & | msg, | |
| const MessageInfo & | msginfo | |||
| ) | [protected] |
Definition at line 275 of file group_session/service.cc.
References _database, and _session_count.
| void ssrc::wispers::group_session::GroupSessionService::process_request | ( | const MessageFindGroupSessionsByType & | msg, | |
| const MessageInfo & | msginfo | |||
| ) | [protected] |
Definition at line 252 of file group_session/service.cc.
References _database, and WISP_IMPORT().
| void ssrc::wispers::group_session::GroupSessionService::process_request | ( | MessageCreateReservation & | msg, | |
| const MessageInfo & | ||||
| ) | [protected] |
Definition at line 219 of file group_session/service.cc.
| void ssrc::wispers::group_session::GroupSessionService::process_request | ( | const MessageEndGroupSession & | msg, | |
| const MessageInfo & | ||||
| ) | [inline, protected] |
Definition at line 130 of file group_session/service.h.
| void ssrc::wispers::group_session::GroupSessionService::process_request | ( | MessageCreateGroupSession & | msg, | |
| const MessageInfo & | ||||
| ) | [protected] |
Definition at line 181 of file group_session/service.cc.
References _database, _session_count, created(), DatabaseTransaction::end(), generate_gsid(), GroupSession, and start_group_session().
| void ssrc::wispers::group_session::GroupSessionService::recount_sessions | ( | ) | [inline, protected] |
Definition at line 107 of file group_session/service.h.
| virtual void ssrc::wispers::group_session::GroupSessionService::start_group_session | ( | const GroupSession & | session, | |
| ByteBuffer & | payload | |||
| ) | [inline, protected, virtual] |
Definition at line 112 of file group_session/service.h.
Referenced by process_request().
| void ssrc::wispers::group_session::GroupSessionService::transition | ( | State | state | ) | [protected, virtual] |
Definition at line 37 of file group_session/service.cc.
| ssrc::wispers::group_session::GroupSessionService::WISP_IMPORT | ( | protocol_traits | , | |
| CallRemoveMemberConfirm | ||||
| ) | [protected] |
| ssrc::wispers::group_session::GroupSessionService::WISP_IMPORT | ( | protocol_traits | , | |
| CallAddMemberConfirm | ||||
| ) | [protected] |
| ssrc::wispers::group_session::GroupSessionService::WISP_IMPORT | ( | protocol_traits | , | |
| CallFindMembersResult | ||||
| ) | [protected] |
| ssrc::wispers::group_session::GroupSessionService::WISP_IMPORT | ( | protocol_traits | , | |
| CallFindGroupSessionsResult | ||||
| ) | [protected] |
| ssrc::wispers::group_session::GroupSessionService::WISP_IMPORT | ( | protocol_traits | , | |
| CallReturnGroupSessionsByType | ||||
| ) | [protected] |
| ssrc::wispers::group_session::GroupSessionService::WISP_IMPORT | ( | protocol_traits | , | |
| CallReturnGroupSessionsForMember | ||||
| ) | [protected] |
| ssrc::wispers::group_session::GroupSessionService::WISP_IMPORT | ( | protocol_traits | , | |
| CallExpireGroupSession | ||||
| ) | [protected] |
| ssrc::wispers::group_session::GroupSessionService::WISP_IMPORT | ( | protocol_traits | , | |
| CallStartGroupSession | ||||
| ) | [protected] |
| ssrc::wispers::group_session::GroupSessionService::WISP_IMPORT | ( | SessionProtocol | , | |
| MessageLoginSession | ||||
| ) | [protected] |
| ssrc::wispers::group_session::GroupSessionService::WISP_IMPORT | ( | SessionProtocol | , | |
| MessageExpireSession | ||||
| ) | [protected] |
| ssrc::wispers::group_session::GroupSessionService::WISP_IMPORT | ( | protocol_traits | , | |
| MessageRemoveMember | ||||
| ) | [protected] |
| ssrc::wispers::group_session::GroupSessionService::WISP_IMPORT | ( | protocol_traits | , | |
| MessageAddMember | ||||
| ) | [protected] |
| ssrc::wispers::group_session::GroupSessionService::WISP_IMPORT | ( | protocol_traits | , | |
| MessageRemoveMembers | ||||
| ) | [protected] |
| ssrc::wispers::group_session::GroupSessionService::WISP_IMPORT | ( | protocol_traits | , | |
| MessageAddMembers | ||||
| ) | [protected] |
| ssrc::wispers::group_session::GroupSessionService::WISP_IMPORT | ( | protocol_traits | , | |
| MessageFindMembersResult | ||||
| ) | [protected] |
| ssrc::wispers::group_session::GroupSessionService::WISP_IMPORT | ( | protocol_traits | , | |
| MessageFindMembers | ||||
| ) | [protected] |
| ssrc::wispers::group_session::GroupSessionService::WISP_IMPORT | ( | protocol_traits | , | |
| MessageCancelReservation | ||||
| ) | [protected] |
| ssrc::wispers::group_session::GroupSessionService::WISP_IMPORT | ( | protocol_traits | , | |
| MessageCreateReservation | ||||
| ) | [protected] |
| ssrc::wispers::group_session::GroupSessionService::WISP_IMPORT | ( | protocol_traits | , | |
| MessageReturnGroupSessionsByType | ||||
| ) | [protected] |
| ssrc::wispers::group_session::GroupSessionService::WISP_IMPORT | ( | protocol_traits | , | |
| MessageFindGroupSessionsByType | ||||
| ) | [protected] |
| ssrc::wispers::group_session::GroupSessionService::WISP_IMPORT | ( | protocol_traits | , | |
| MessageReturnGroupSessionsForMember | ||||
| ) | [protected] |
| ssrc::wispers::group_session::GroupSessionService::WISP_IMPORT | ( | protocol_traits | , | |
| MessageFindGroupSessionsForMember | ||||
| ) | [protected] |
| ssrc::wispers::group_session::GroupSessionService::WISP_IMPORT | ( | protocol_traits | , | |
| MessageFindGroupSessionsResult | ||||
| ) | [protected] |
| ssrc::wispers::group_session::GroupSessionService::WISP_IMPORT | ( | protocol_traits | , | |
| MessageFindGroupSessions | ||||
| ) | [protected] |
| ssrc::wispers::group_session::GroupSessionService::WISP_IMPORT | ( | protocol_traits | , | |
| MessageRelayEventSelfDiscard | ||||
| ) | [protected] |
| ssrc::wispers::group_session::GroupSessionService::WISP_IMPORT | ( | protocol_traits | , | |
| MessageRelayEvent | ||||
| ) | [protected] |
| ssrc::wispers::group_session::GroupSessionService::WISP_IMPORT | ( | protocol_traits | , | |
| MessageExpireGroupSession | ||||
| ) | [protected] |
| ssrc::wispers::group_session::GroupSessionService::WISP_IMPORT | ( | protocol_traits | , | |
| MessageEndGroupSession | ||||
| ) | [protected] |
| ssrc::wispers::group_session::GroupSessionService::WISP_IMPORT | ( | protocol_traits | , | |
| MessageCreateGroupSession | ||||
| ) | [protected] |
Referenced by process_request().
Friends And Related Function Documentation
friend class NS_SSRC_WISP_SERVICE::ServiceProtocolProcessor< packing_traits > [friend] |
Definition at line 51 of file group_session/service.h.
Member Data Documentation
boost::scoped_ptr<GroupSessionDatabase> ssrc::wispers::group_session::GroupSessionService::_database [protected] |
Definition at line 96 of file group_session/service.h.
Referenced by cancel_reservation(), and process_request().
TimeValue ssrc::wispers::group_session::GroupSessionService::_gs_poll_interval [protected] |
Definition at line 99 of file group_session/service.h.
timeout_ptr ssrc::wispers::group_session::GroupSessionService::_gs_poll_timeout [protected] |
Definition at line 100 of file group_session/service.h.
const gsid_type ssrc::wispers::group_session::GroupSessionService::_gsid_max [protected] |
Definition at line 97 of file group_session/service.h.
const gsid_type ssrc::wispers::group_session::GroupSessionService::_gsid_min [protected] |
Definition at line 97 of file group_session/service.h.
const unsigned int ssrc::wispers::group_session::GroupSessionService::_ids_per_expiration_message [protected] |
Definition at line 95 of file group_session/service.h.
const unsigned int ssrc::wispers::group_session::GroupSessionService::_num_partitions [protected] |
Definition at line 94 of file group_session/service.h.
const unsigned int ssrc::wispers::group_session::GroupSessionService::_partition_id [protected] |
Definition at line 93 of file group_session/service.h.
const unsigned int ssrc::wispers::group_session::GroupSessionService::_protocol_id [protected] |
Definition at line 92 of file group_session/service.h.
Random<gsid_type> ssrc::wispers::group_session::GroupSessionService::_random [protected] |
Definition at line 98 of file group_session/service.h.
unsigned int ssrc::wispers::group_session::GroupSessionService::_reservation_count [protected] |
Definition at line 101 of file group_session/service.h.
Referenced by cancel_reservation().
unsigned int ssrc::wispers::group_session::GroupSessionService::_session_count [protected] |
Definition at line 101 of file group_session/service.h.
Referenced by process_request().
const string ssrc::wispers::group_session::GroupSessionService::EventGroupExpireGroupSession [static, protected] |
Definition at line 90 of file group_session/service.h.
The documentation for this class was generated from the following files: