Savarese Software Research Corporation
GroupSessionService Class Reference

GroupSessionService is not a standalone service (although it was originally). More...

#include <service.h>

Inheritance diagram for GroupSessionService:

List of all members.

Public Member Functions

 GroupSessionService (super::caller_type &caller, const wisp_message_protocol protocol, GroupSessionDatabase *db, const GroupSessionInitializer &initializer) SSRC_DECL_THROW(DatabaseException
 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, MessageRelayEvents)
 WISP_IMPORT (protocol_traits, MessageRelayEventsSelfDiscard)
 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 () SSRC_DECL_THROW(DatabaseException)
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) SSRC_DECL_THROW(DatabaseException)
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 (MessageRelayEvents &msg, const MessageInfo &)
void process_request (MessageRelayEventsSelfDiscard &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
const std::string _gs_name

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 GroupSessionService::protocol_traits [protected]

Definition at line 55 of file group_session/service.h.


Constructor & Destructor Documentation

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.

virtual GroupSessionService::~GroupSessionService ( ) [inline, virtual]

Definition at line 261 of file group_session/service.h.


Member Function Documentation

template<typename reservation_type >
void GroupSessionService::activate_reservation ( const reservation_type &  reservation,
const string session_name,
const member_container additional_participants 
) [inline, protected]
unsigned int GroupSessionService::cancel_reservation ( const gsid_type  gsid,
const uid_type  requestor,
const MessageInfo &   
) [protected, virtual]

Definition at line 153 of file group_session/service.cc.

References _database, _reservation_count, and DatabaseTransaction::end().

Referenced by process_request().

unsigned int GroupSessionService::check_for_expirations ( const sec_type  now) [virtual]
virtual void GroupSessionService::confirm_reservation_activation ( const GroupSession session) [inline, protected, virtual]

Definition at line 153 of file group_session/service.h.

References _gs_name.

Referenced by activate_reservation().

virtual void GroupSessionService::end_group_session ( const gsid_type  gsid) [inline, protected, virtual]

Definition at line 125 of file group_session/service.h.

References _database, _session_count, and DatabaseTransaction::end().

Referenced by process_request().

Definition at line 106 of file group_session/service.h.

References _random.

Referenced by process_request().

virtual bool GroupSessionService::insert_reservation ( const Reservation &  reservation,
ByteBuffer &  payload 
) [inline, protected, virtual]

Definition at line 139 of file group_session/service.h.

References _database, and _reservation_count.

Referenced by process_request().

void GroupSessionService::process_request ( MessageCreateGroupSession &  msg,
const MessageInfo &   
) [protected]
void GroupSessionService::process_request ( const MessageEndGroupSession &  msg,
const MessageInfo &   
) [inline, protected]

Definition at line 133 of file group_session/service.h.

References end_group_session().

void GroupSessionService::process_request ( MessageCreateReservation &  msg,
const MessageInfo &   
) [protected]
void GroupSessionService::process_request ( const MessageFindGroupSessionsByType &  msg,
const MessageInfo &  msginfo 
) [protected]

Definition at line 255 of file group_session/service.cc.

References _database, and WISP_IMPORT().

void GroupSessionService::process_request ( const MessageFindGroupSessions &  msg,
const MessageInfo &  msginfo 
) [protected]

Definition at line 278 of file group_session/service.cc.

References _database, _gs_name, and _session_count.

void GroupSessionService::process_request ( const MessageFindMembers &  msg,
const MessageInfo &  msginfo 
) [protected]

Definition at line 298 of file group_session/service.cc.

References _database.

void GroupSessionService::process_request ( const MessageAddMembers &  msg,
const MessageInfo &   
) [protected]

Definition at line 318 of file group_session/service.cc.

References _database, and DatabaseTransaction::end().

void GroupSessionService::process_request ( const MessageRemoveMembers &  msg,
const MessageInfo &   
) [protected]

Definition at line 337 of file group_session/service.cc.

References _database, and DatabaseTransaction::end().

void GroupSessionService::process_request ( const MessageRemoveMember &  msg,
const MessageInfo &  msginfo 
) [protected]
void GroupSessionService::process_request ( const MessageCancelReservation &  msg,
const MessageInfo &  msginfo 
) [inline, protected]

Definition at line 226 of file group_session/service.h.

References cancel_reservation().

void GroupSessionService::process_request ( const MessageFindGroupSessionsForMember &  msg,
const MessageInfo &  msginfo 
) [protected]

Definition at line 432 of file group_session/service.cc.

References _database, and _gs_name.

void GroupSessionService::process_request ( const MessageRelayEvent &  msg,
const MessageInfo &   
) [protected]

Definition at line 450 of file group_session/service.cc.

References _database.

void GroupSessionService::process_request ( const MessageRelayEventSelfDiscard &  msg,
const MessageInfo &   
) [protected]

Definition at line 467 of file group_session/service.cc.

References _database.

void GroupSessionService::process_request ( MessageRelayEvents &  msg,
const MessageInfo &   
) [protected]

Definition at line 483 of file group_session/service.cc.

References _database.

void GroupSessionService::process_request ( MessageRelayEventsSelfDiscard &  msg,
const MessageInfo &   
) [protected]

Definition at line 499 of file group_session/service.cc.

References _database.

void GroupSessionService::process_request ( const MessageExpireSession &  msg,
const MessageInfo &   
) [protected]
void GroupSessionService::process_request ( const MessageLoginSession &  msg,
const MessageInfo &   
) [protected]
void GroupSessionService::recount_sessions ( ) [inline, protected]

Definition at line 110 of file group_session/service.h.

References _database, _reservation_count, and _session_count.

Referenced by activate_reservation(), and process_request().

virtual void GroupSessionService::start_group_session ( const GroupSession session,
ByteBuffer &  payload 
) [inline, protected, virtual]

Definition at line 115 of file group_session/service.h.

References _gs_name.

Referenced by process_request().

GroupSessionService::WISP_IMPORT ( protocol_traits  ,
MessageCreateGroupSession   
) [protected]

Referenced by process_request().

GroupSessionService::WISP_IMPORT ( protocol_traits  ,
MessageEndGroupSession   
) [protected]
GroupSessionService::WISP_IMPORT ( protocol_traits  ,
MessageExpireGroupSession   
) [protected]
GroupSessionService::WISP_IMPORT ( protocol_traits  ,
MessageRelayEvent   
) [protected]
GroupSessionService::WISP_IMPORT ( protocol_traits  ,
MessageRelayEventSelfDiscard   
) [protected]
GroupSessionService::WISP_IMPORT ( protocol_traits  ,
MessageRelayEvents   
) [protected]
GroupSessionService::WISP_IMPORT ( protocol_traits  ,
MessageRelayEventsSelfDiscard   
) [protected]
GroupSessionService::WISP_IMPORT ( protocol_traits  ,
MessageFindGroupSessions   
) [protected]
GroupSessionService::WISP_IMPORT ( protocol_traits  ,
MessageFindGroupSessionsResult   
) [protected]
GroupSessionService::WISP_IMPORT ( protocol_traits  ,
MessageFindGroupSessionsForMember   
) [protected]
GroupSessionService::WISP_IMPORT ( protocol_traits  ,
MessageReturnGroupSessionsForMember   
) [protected]
GroupSessionService::WISP_IMPORT ( protocol_traits  ,
MessageFindGroupSessionsByType   
) [protected]
GroupSessionService::WISP_IMPORT ( protocol_traits  ,
MessageReturnGroupSessionsByType   
) [protected]
GroupSessionService::WISP_IMPORT ( protocol_traits  ,
MessageCreateReservation   
) [protected]
GroupSessionService::WISP_IMPORT ( protocol_traits  ,
MessageCancelReservation   
) [protected]
GroupSessionService::WISP_IMPORT ( protocol_traits  ,
MessageFindMembers   
) [protected]
GroupSessionService::WISP_IMPORT ( protocol_traits  ,
MessageFindMembersResult   
) [protected]
GroupSessionService::WISP_IMPORT ( protocol_traits  ,
MessageAddMembers   
) [protected]
GroupSessionService::WISP_IMPORT ( protocol_traits  ,
MessageRemoveMembers   
) [protected]
GroupSessionService::WISP_IMPORT ( protocol_traits  ,
MessageAddMember   
) [protected]
GroupSessionService::WISP_IMPORT ( protocol_traits  ,
MessageRemoveMember   
) [protected]
GroupSessionService::WISP_IMPORT ( SessionProtocol  ,
MessageExpireSession   
) [protected]
GroupSessionService::WISP_IMPORT ( SessionProtocol  ,
MessageLoginSession   
) [protected]
GroupSessionService::WISP_IMPORT ( protocol_traits  ,
CallStartGroupSession   
) [protected]
GroupSessionService::WISP_IMPORT ( protocol_traits  ,
CallExpireGroupSession   
) [protected]
GroupSessionService::WISP_IMPORT ( protocol_traits  ,
CallReturnGroupSessionsForMember   
) [protected]
GroupSessionService::WISP_IMPORT ( protocol_traits  ,
CallReturnGroupSessionsByType   
) [protected]
GroupSessionService::WISP_IMPORT ( protocol_traits  ,
CallFindGroupSessionsResult   
) [protected]
GroupSessionService::WISP_IMPORT ( protocol_traits  ,
CallFindMembersResult   
) [protected]
GroupSessionService::WISP_IMPORT ( protocol_traits  ,
CallAddMemberConfirm   
) [protected]
GroupSessionService::WISP_IMPORT ( protocol_traits  ,
CallRemoveMemberConfirm   
) [protected]

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

Definition at line 101 of file group_session/service.h.

Referenced by transition().

timeout_ptr GroupSessionService::_gs_poll_timeout [protected]

Definition at line 102 of file group_session/service.h.

Referenced by transition().

Definition at line 99 of file group_session/service.h.

Definition at line 99 of file group_session/service.h.

const unsigned int GroupSessionService::_ids_per_expiration_message [protected]

Definition at line 97 of file group_session/service.h.

const unsigned int GroupSessionService::_num_partitions [protected]

Definition at line 96 of file group_session/service.h.

const unsigned int GroupSessionService::_partition_id [protected]

Definition at line 95 of file group_session/service.h.

Referenced by transition().

const unsigned int GroupSessionService::_protocol_id [protected]

Definition at line 94 of file group_session/service.h.

Referenced by transition().

Definition at line 100 of file group_session/service.h.

Referenced by generate_gsid().


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

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