org.cometd.server
Class ServerSessionImpl

java.lang.Object
  extended by org.cometd.server.ServerSessionImpl
All Implemented Interfaces:
ServerSession, Session

public class ServerSessionImpl
extends java.lang.Object
implements ServerSession


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.cometd.bayeux.server.ServerSession
ServerSession.DeQueueListener, ServerSession.Extension, ServerSession.MaxQueueListener, ServerSession.MessageListener, ServerSession.RemoveListener, ServerSession.ServerSessionListener
 
Constructor Summary
protected ServerSessionImpl(BayeuxServerImpl bayeux)
           
protected ServerSessionImpl(BayeuxServerImpl bayeux, LocalSessionImpl localSession, java.lang.String idHint)
           
 
Method Summary
 void addExtension(ServerSession.Extension extension)
           
 void addListener(ServerSession.ServerSessionListener listener)
           
 void batch(java.lang.Runnable batch)
           
 void cancelDispatch()
           
 void cancelIntervalTimeout()
           
protected  void connect(long timestamp)
           
 void deliver(Session from, ServerMessage message)
           
 void deliver(Session from, java.lang.String channelId, java.lang.Object data, java.lang.Object id)
           
 void dequeue()
           
 void disconnect()
           
 void dispatch()
           
 void dispatchLazy()
           
protected  void doDeliver(ServerSession from, ServerMessage message)
           
protected  void dump(java.lang.StringBuilder b, java.lang.String indent)
           
 void endBatch()
           
protected  boolean extendRecv(ServerMessage.Mutable message)
           
protected  ServerMessage extendSend(ServerMessage message)
           
 java.lang.Object getAdvice()
           
 java.lang.Object getAttribute(java.lang.String name)
           
 java.util.Set<java.lang.String> getAttributeNames()
           
protected  java.util.List<ServerSession.Extension> getExtensions()
           
 java.lang.String getId()
           
 long getInterval()
           
 LocalSession getLocalSession()
           
 java.util.Queue<ServerMessage> getQueue()
           
 long getTimeout()
           
protected  void handshake()
           
 boolean isConnected()
           
 boolean isHandshook()
           
 boolean isLocalSession()
           
 boolean isMetaConnectDeliveryOnly()
           
 void reAdvise()
           
 java.lang.Object removeAttribute(java.lang.String name)
           
protected  boolean removed(boolean timedout)
           
 void removeListener(ServerSession.ServerSessionListener listener)
           
 void setAttribute(java.lang.String name, java.lang.Object value)
           
 boolean setDispatcher(ServerTransport.Dispatcher dispatcher)
           
 void setInterval(long intervalMS)
           
 void setMetaConnectDeliveryOnly(boolean meta)
           
 void setTimeout(long timeoutMS)
           
 void startBatch()
           
 void startIntervalTimeout()
           
protected  void subscribedTo(ServerChannelImpl channel)
           
 java.lang.Object takeAdvice()
           
 java.lang.String toString()
           
protected  void unsubscribedTo(ServerChannelImpl channel)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServerSessionImpl

protected ServerSessionImpl(BayeuxServerImpl bayeux)

ServerSessionImpl

protected ServerSessionImpl(BayeuxServerImpl bayeux,
                            LocalSessionImpl localSession,
                            java.lang.String idHint)
Method Detail

getExtensions

protected java.util.List<ServerSession.Extension> getExtensions()

addExtension

public void addExtension(ServerSession.Extension extension)
Specified by:
addExtension in interface ServerSession

batch

public void batch(java.lang.Runnable batch)
Specified by:
batch in interface Session

deliver

public void deliver(Session from,
                    ServerMessage message)
Specified by:
deliver in interface ServerSession

deliver

public void deliver(Session from,
                    java.lang.String channelId,
                    java.lang.Object data,
                    java.lang.Object id)
Specified by:
deliver in interface ServerSession

doDeliver

protected void doDeliver(ServerSession from,
                         ServerMessage message)

handshake

protected void handshake()

connect

protected void connect(long timestamp)

disconnect

public void disconnect()
Specified by:
disconnect in interface ServerSession
Specified by:
disconnect in interface Session

endBatch

public void endBatch()
Specified by:
endBatch in interface Session

getLocalSession

public LocalSession getLocalSession()
Specified by:
getLocalSession in interface ServerSession

isLocalSession

public boolean isLocalSession()
Specified by:
isLocalSession in interface ServerSession

startBatch

public void startBatch()
Specified by:
startBatch in interface Session

addListener

public void addListener(ServerSession.ServerSessionListener listener)
Specified by:
addListener in interface ServerSession

getId

public java.lang.String getId()
Specified by:
getId in interface Session

getQueue

public java.util.Queue<ServerMessage> getQueue()
Specified by:
getQueue in interface ServerSession

removeListener

public void removeListener(ServerSession.ServerSessionListener listener)
Specified by:
removeListener in interface ServerSession

setDispatcher

public boolean setDispatcher(ServerTransport.Dispatcher dispatcher)

dispatch

public void dispatch()

dispatchLazy

public void dispatchLazy()

cancelDispatch

public void cancelDispatch()

cancelIntervalTimeout

public void cancelIntervalTimeout()

startIntervalTimeout

public void startIntervalTimeout()

getAttribute

public java.lang.Object getAttribute(java.lang.String name)
Specified by:
getAttribute in interface Session

getAttributeNames

public java.util.Set<java.lang.String> getAttributeNames()
Specified by:
getAttributeNames in interface Session

removeAttribute

public java.lang.Object removeAttribute(java.lang.String name)
Specified by:
removeAttribute in interface Session

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.Object value)
Specified by:
setAttribute in interface Session

isConnected

public boolean isConnected()
Specified by:
isConnected in interface Session

isHandshook

public boolean isHandshook()

extendRecv

protected boolean extendRecv(ServerMessage.Mutable message)

extendSend

protected ServerMessage extendSend(ServerMessage message)

getAdvice

public java.lang.Object getAdvice()

reAdvise

public void reAdvise()

takeAdvice

public java.lang.Object takeAdvice()

getTimeout

public long getTimeout()

getInterval

public long getInterval()

setTimeout

public void setTimeout(long timeoutMS)

setInterval

public void setInterval(long intervalMS)

removed

protected boolean removed(boolean timedout)
Parameters:
timedout -
Returns:
True if the session was connected.

setMetaConnectDeliveryOnly

public void setMetaConnectDeliveryOnly(boolean meta)

isMetaConnectDeliveryOnly

public boolean isMetaConnectDeliveryOnly()

dequeue

public void dequeue()

subscribedTo

protected void subscribedTo(ServerChannelImpl channel)

unsubscribedTo

protected void unsubscribedTo(ServerChannelImpl channel)

dump

protected void dump(java.lang.StringBuilder b,
                    java.lang.String indent)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2010 Dojo Foundation. All Rights Reserved.