C# Class Simpl.OODSS.Distributed.Server.ClientSessionManager.BaseSessionManager

Show file Open project: ecologylab/simplCSharp Class Usage Examples

Protected Properties

Property Type Description
FrontEnd ServerProcessor
Handle SessionHandle
Initialized bool
LastActivity long
LocalScope Scope
TranslationScope Simpl.Serialization.SimplTypesScope

Public Methods

Method Description
BaseSessionManager ( string sessionId, SimplTypesScope translationScope, Scope applicationObjectScope, ServerProcessor frontend ) : System
GetAddress ( ) : IPEndPoint
GetLastActivity ( ) : long

Appends the sender's IP address to the incoming message and calls performService on the given RequestMessage using the local ObjectRegistry. performService(RequestMessage) may be overridden by subclasses to provide more specialized functionality. Generally, overrides should then call super.performService(RequestMessage) so that the IP address is appended to the message.

Calls RequestMessage.performService(Scope) and returns the result.

Indicates the last System timestamp was when the ContextManager had any activity.

GetScope ( ) : Scope
GetSessionId ( ) : String
IsInitialized ( ) : bool

Indicates whether or not this context manager has been initialized. Normally, this means that it has shared a session id with the client.

IsInvalidating ( ) : System.Boolean
IsMessageWaiting ( ) : bool

Indicates whether there are any messages queued up to be processed. isMessageWaiting() should be overridden if getNextRequest() is overridden so that it properly reflects the way that getNextRequest() works; it may also be important to override enqueueRequest().

SendUpdateToClient ( UpdateMessage update, string receivingSessionId ) : void
SetInvalidating ( bool invalidating ) : void
Shutdown ( ) : void

Hook method for having shutdown behavior. This method is called whenever the server is closing down the connection to this client.

Private Methods

Method Description
GenerateContextScope ( Scope baseScope ) : Scope

Provides the context scope for the client attached to this session manager. The base implementation instantiates a new Scope with baseScope as the argument. Subclasses may provide specific subclasses of Scope as the return value. They must still incorporate baseScope as the lexically chained application object scope.

Method Details

BaseSessionManager() public method

public BaseSessionManager ( string sessionId, SimplTypesScope translationScope, Scope applicationObjectScope, ServerProcessor frontend ) : System
sessionId string
translationScope Simpl.Serialization.SimplTypesScope
applicationObjectScope Scope
frontend ServerProcessor
return System

GetAddress() public abstract method

public abstract GetAddress ( ) : IPEndPoint
return System.Net.IPEndPoint

GetLastActivity() public method

Appends the sender's IP address to the incoming message and calls performService on the given RequestMessage using the local ObjectRegistry. performService(RequestMessage) may be overridden by subclasses to provide more specialized functionality. Generally, overrides should then call super.performService(RequestMessage) so that the IP address is appended to the message. Calls RequestMessage.performService(Scope) and returns the result. Indicates the last System timestamp was when the ContextManager had any activity.
public GetLastActivity ( ) : long
return long

GetScope() public method

public GetScope ( ) : Scope
return Scope

GetSessionId() public method

public GetSessionId ( ) : String
return String

IsInitialized() public method

Indicates whether or not this context manager has been initialized. Normally, this means that it has shared a session id with the client.
public IsInitialized ( ) : bool
return bool

IsInvalidating() public method

public IsInvalidating ( ) : System.Boolean
return System.Boolean

IsMessageWaiting() public method

Indicates whether there are any messages queued up to be processed. isMessageWaiting() should be overridden if getNextRequest() is overridden so that it properly reflects the way that getNextRequest() works; it may also be important to override enqueueRequest().
public IsMessageWaiting ( ) : bool
return bool

SendUpdateToClient() public abstract method

public abstract SendUpdateToClient ( UpdateMessage update, string receivingSessionId ) : void
update Simpl.OODSS.Messages.UpdateMessage
receivingSessionId string
return void

SetInvalidating() public method

public SetInvalidating ( bool invalidating ) : void
invalidating bool
return void

Shutdown() public method

Hook method for having shutdown behavior. This method is called whenever the server is closing down the connection to this client.
public Shutdown ( ) : void
return void

Property Details

FrontEnd protected property

The frontend for the server that is running the ContextManager. This is needed in case the client attempts to restore a session, in which case the frontend must be queried for the old ContextManager.
protected ServerProcessor FrontEnd
return ServerProcessor

Handle protected property

Session handle available to use by clients
protected SessionHandle Handle
return SessionHandle

Initialized protected property

Indicates whether the first request message has been received. The first request may be an InitConnection, which has special properties.
protected bool Initialized
return bool

LastActivity protected property

protected long LastActivity
return long

LocalScope protected property

protected Scope LocalScope
return Scope

TranslationScope protected property

protected SimplTypesScope,Simpl.Serialization TranslationScope
return Simpl.Serialization.SimplTypesScope