Sirikata
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes
Sirikata::OH::Manual::ServerQueryHandler Class Reference

This class manages queries registered with servers. More...

#include <ServerQueryHandler.hpp>

Inheritance diagram for Sirikata::OH::Manual::ServerQueryHandler:
Collaboration diagram for Sirikata::OH::Manual::ServerQueryHandler:

List of all members.

Classes

struct  ServerQueryState

Public Member Functions

 ServerQueryHandler (ObjectHostContext *ctx, ManualObjectQueryProcessor *parent, Network::IOStrandPtr strand)
virtual void start ()
virtual void stop ()
void incrementServerQuery (OHDP::SpaceNodeID node)
void decrementServerQuery (OHDP::SpaceNodeID node)
void queriersAreObserving (const OHDP::SpaceNodeID &snid, const ProxIndexID indexid, const ObjectReference &objid)
void queriersStoppedObserving (const OHDP::SpaceNodeID &snid, const ProxIndexID indexid, const ObjectReference &objid)
void replicatedNodeRemoved (const OHDP::SpaceNodeID &snid, ProxIndexID indexid, const ObjectReference &objid)

Private Types

typedef std::tr1::shared_ptr
< ServerQueryState
ServerQueryStatePtr
typedef
std::tr1::unordered_map
< OHDP::SpaceNodeID,
ServerQueryStatePtr,
OHDP::SpaceNodeID::Hasher
ServerQueryMap

Private Member Functions

virtual void onSpaceNodeSession (const OHDP::SpaceNodeID &id, OHDPSST::Stream::Ptr sn_stream)
virtual void onSpaceNodeSessionEnded (const OHDP::SpaceNodeID &id)
virtual void onCreatedReplicatedIndex (Pinto::Manual::ReplicatedClientWithID< OHDP::SpaceNodeID > *client, const OHDP::SpaceNodeID &snid, ProxIndexID proxid, ReplicatedLocationServiceCachePtr loccache, ServerID sid, bool dynamic_objects)
virtual void onDestroyedReplicatedIndex (Pinto::Manual::ReplicatedClientWithID< OHDP::SpaceNodeID > *client, const OHDP::SpaceNodeID &snid, ProxIndexID proxid)
virtual void sendReplicatedClientProxMessage (Pinto::Manual::ReplicatedClientWithID< OHDP::SpaceNodeID > *client, const OHDP::SpaceNodeID &snid, const String &msg)
void sendProxMessage (ServerQueryMap::iterator serv_it, const String &msg)
void writeSomeProxData (ServerQueryStatePtr data)
void handleCreatedProxSubstream (const OHDP::SpaceNodeID &snid, int success, OHDPSST::Stream::Ptr prox_stream)
void handleProximitySubstreamRead (const OHDP::SpaceNodeID &snid, OHDPSST::Stream::Ptr prox_stream, String *prevdata, uint8 *buffer, int length)
void handleProximityMessage (const OHDP::SpaceNodeID &snid, const String &payload)
void handleLocationSubstream (const OHDP::SpaceNodeID &snid, int err, OHDPSST::Stream::Ptr s)
void handleLocationSubstreamRead (const OHDP::SpaceNodeID &snid, OHDPSST::Stream::Ptr s, std::stringstream *prevdata, uint8 *buffer, int length)
bool handleLocationMessage (const OHDP::SpaceNodeID &snid, const std::string &payload)

Private Attributes

ObjectHostContextmContext
ManualObjectQueryProcessormParent
Network::IOStrandPtr mStrand
ServerQueryMap mServerQueries

Detailed Description

This class manages queries registered with servers.

It accepts aggregated requests from the parent ManualObjectQueryProcessor, registers them with the server, and manages receiving results and forwarding them for further processing. It takes care of other details like orphan location updates so the parent just gets a stream of updates.


Member Typedef Documentation


Constructor & Destructor Documentation

Sirikata::OH::Manual::ServerQueryHandler::ServerQueryHandler ( ObjectHostContext ctx,
ManualObjectQueryProcessor parent,
Network::IOStrandPtr  strand 
)

Member Function Documentation

void Sirikata::OH::Manual::ServerQueryHandler::decrementServerQuery ( OHDP::SpaceNodeID  node)
void Sirikata::OH::Manual::ServerQueryHandler::handleCreatedProxSubstream ( const OHDP::SpaceNodeID snid,
int  success,
OHDPSST::Stream::Ptr  prox_stream 
) [private]
bool Sirikata::OH::Manual::ServerQueryHandler::handleLocationMessage ( const OHDP::SpaceNodeID snid,
const std::string &  payload 
) [private]
void Sirikata::OH::Manual::ServerQueryHandler::handleLocationSubstream ( const OHDP::SpaceNodeID snid,
int  err,
OHDPSST::Stream::Ptr  s 
) [private]
void Sirikata::OH::Manual::ServerQueryHandler::handleLocationSubstreamRead ( const OHDP::SpaceNodeID snid,
OHDPSST::Stream::Ptr  s,
std::stringstream *  prevdata,
uint8 *  buffer,
int  length 
) [private]
void Sirikata::OH::Manual::ServerQueryHandler::handleProximityMessage ( const OHDP::SpaceNodeID snid,
const String &  payload 
) [private]
void Sirikata::OH::Manual::ServerQueryHandler::handleProximitySubstreamRead ( const OHDP::SpaceNodeID snid,
OHDPSST::Stream::Ptr  prox_stream,
String *  prevdata,
uint8 *  buffer,
int  length 
) [private]
void Sirikata::OH::Manual::ServerQueryHandler::incrementServerQuery ( OHDP::SpaceNodeID  node)
void Sirikata::OH::Manual::ServerQueryHandler::onCreatedReplicatedIndex ( Pinto::Manual::ReplicatedClientWithID< OHDP::SpaceNodeID > *  client,
const OHDP::SpaceNodeID snid,
ProxIndexID  proxid,
ReplicatedLocationServiceCachePtr  loccache,
ServerID  sid,
bool  dynamic_objects 
) [private, virtual]
void Sirikata::OH::Manual::ServerQueryHandler::onDestroyedReplicatedIndex ( Pinto::Manual::ReplicatedClientWithID< OHDP::SpaceNodeID > *  client,
const OHDP::SpaceNodeID snid,
ProxIndexID  proxid 
) [private, virtual]
void Sirikata::OH::Manual::ServerQueryHandler::onSpaceNodeSession ( const OHDP::SpaceNodeID id,
OHDPSST::Stream::Ptr  sn_stream 
) [private, virtual]
void Sirikata::OH::Manual::ServerQueryHandler::onSpaceNodeSessionEnded ( const OHDP::SpaceNodeID id) [private, virtual]
void Sirikata::OH::Manual::ServerQueryHandler::queriersAreObserving ( const OHDP::SpaceNodeID snid,
const ProxIndexID  indexid,
const ObjectReference objid 
)
void Sirikata::OH::Manual::ServerQueryHandler::queriersStoppedObserving ( const OHDP::SpaceNodeID snid,
const ProxIndexID  indexid,
const ObjectReference objid 
)
void Sirikata::OH::Manual::ServerQueryHandler::replicatedNodeRemoved ( const OHDP::SpaceNodeID snid,
ProxIndexID  indexid,
const ObjectReference objid 
)
void Sirikata::OH::Manual::ServerQueryHandler::sendProxMessage ( ServerQueryMap::iterator  serv_it,
const String &  msg 
) [private]
void Sirikata::OH::Manual::ServerQueryHandler::sendReplicatedClientProxMessage ( Pinto::Manual::ReplicatedClientWithID< OHDP::SpaceNodeID > *  client,
const OHDP::SpaceNodeID snid,
const String &  msg 
) [private, virtual]
void Sirikata::OH::Manual::ServerQueryHandler::start ( ) [virtual]
void Sirikata::OH::Manual::ServerQueryHandler::stop ( ) [virtual]
void Sirikata::OH::Manual::ServerQueryHandler::writeSomeProxData ( ServerQueryStatePtr  data) [private]

Member Data Documentation

Referenced by onSpaceNodeSession().


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