com.threerings.crowd.server
Class CrowdSession

java.lang.Object
  extended by com.threerings.presents.server.PresentsSession
      extended by com.threerings.crowd.server.CrowdSession
All Implemented Interfaces:
ClientResolutionListener, PresentsConnection.MessageHandler

public class CrowdSession
extends PresentsSession

Extends the presents session with crowd-specific session handling.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.threerings.presents.server.PresentsSession
PresentsSession.ClientProxy, PresentsSession.CompoundDispatcher, PresentsSession.ForwardEventDispatcher, PresentsSession.LogoffDispatcher, PresentsSession.MessageDispatcher, PresentsSession.PingDispatcher, PresentsSession.SubscribeDispatcher, PresentsSession.ThrottleUpdatedDispatcher, PresentsSession.TransmitDatagramsDispatcher, PresentsSession.UnsubscribeDispatcher, PresentsSession.UserChangeListener
 
Field Summary
protected  BodyManager _bodyman
           
protected  ChatHistory _chatHistory
           
protected  BodyLocator _locator
           
protected  LocationManager _locman
           
 
Fields inherited from class com.threerings.presents.server.PresentsSession
_areq, _authdata, _authname, _clmgr, _clobj, _compound, _compoundDepth, _conmgr, _conn, _connectTime, _destroyedSubs, _disps, _invmgr, _loader, _messagesDropped, _messagesIn, _messagesOut, _messagesPerSec, _networkStamp, _omgr, _pendingThrottles, _sessionStamp, _subscrips, _throttle, DEFAULT_FLUSH_TIME, PING_DEBUG
 
Constructor Summary
CrowdSession()
           
 
Method Summary
protected  void clearLocation(BodyObject bobj)
          When the user ends their session, this method is called to clear out any location they might occupy.
protected  void sessionConnectionClosed()
          Called on the dobjmgr thread when the connection associated with this session has been closed and unmapped.
protected  void sessionDidEnd()
          Called when the client session ends (either because the client logged off or because the server forcibly terminated the session).
protected  void sessionWillResume()
          Called when the client resumes a session (after having disconnected and reconnected).
 
Methods inherited from class com.threerings.presents.server.PresentsSession
checkExpired, clearSubscrips, clientObjectDidChange, clientObjectWillChange, clientResolved, connectionFailed, createBootstrapData, createIncomingMessageThrottle, createProxySubscriber, dispatchMessage, endSession, finishCompoundMessage, finishResumeSession, getAuthName, getClientObject, getConnection, getCredentials, getFlushTime, getInetAddress, getNetworkStamp, getSecret, getSessionStamp, getTimeZone, getTransmitDatagrams, handleMessage, handleThrottleExceeded, populateBootstrapData, postMessage, resolutionFailed, resumeSession, safeEndSession, safePostMessage, safePostMessage, sendBootstrap, sendThrottleUpdate, sessionWillStart, setClassLoader, setConnection, setIncomingMessageThrottle, setUsername, shutdown, startCompoundMessage, startSession, subscribedToObject, throttleUpdated, toString, toString, unmapSubscrip, unsubscribedFromObject, updateUsername, wasUnmapped, who
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_locator

@Inject
protected BodyLocator _locator

_bodyman

@Inject
protected BodyManager _bodyman

_locman

@Inject
protected LocationManager _locman

_chatHistory

@Inject
protected ChatHistory _chatHistory
Constructor Detail

CrowdSession

public CrowdSession()
Method Detail

sessionConnectionClosed

protected void sessionConnectionClosed()
Description copied from class: PresentsSession
Called on the dobjmgr thread when the connection associated with this session has been closed and unmapped. If the user logged off before closing their connection, this will be preceded by a call to PresentsSession.sessionDidEnd().

Overrides:
sessionConnectionClosed in class PresentsSession

sessionWillResume

protected void sessionWillResume()
Description copied from class: PresentsSession
Called when the client resumes a session (after having disconnected and reconnected). After this method is executed, the bootstrap information will be sent to the client which will trigger the resumption of the session. Derived classes that override this method should be sure to call super.sessionWillResume.

Note: This function will be called on the dobjmgr thread which means that object manipulations are OK, but client instance manipulations must done carefully.

Overrides:
sessionWillResume in class PresentsSession

sessionDidEnd

protected void sessionDidEnd()
Description copied from class: PresentsSession
Called when the client session ends (either because the client logged off or because the server forcibly terminated the session). Derived classes that override this method should be sure to call super.sessionDidEnd.

Note: This function will be called on the dobjmgr thread which means that object manipulations are OK, but client instance manipulations must done carefully.

Overrides:
sessionDidEnd in class PresentsSession

clearLocation

protected void clearLocation(BodyObject bobj)
When the user ends their session, this method is called to clear out any location they might occupy. The default implementation takes care of standard crowd location occupancy, but users of other services may which to override this method and clear the user out of a scene, zone or other location-derived occupancy.