org.cometd.server
Class LocalSessionImpl
java.lang.Object
org.cometd.common.AbstractClientSession
org.cometd.server.LocalSessionImpl
- All Implemented Interfaces:
- ClientSession, LocalSession, Session
public class LocalSessionImpl
- extends AbstractClientSession
- implements LocalSession
A LocalSession implementation.
This session is local to the BayeuxServer
instance and
communicates with the server without any serialization.
The normal Bayeux meta messages are exchanged between the LocalSession
and the ServerSession.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
LocalSessionImpl
protected LocalSessionImpl(BayeuxServerImpl bayeux,
java.lang.String idHint)
doDisconnected
protected void doDisconnected()
- Specified by:
doDisconnected
in class AbstractClientSession
- See Also:
AbstractClientSession.doDisconnected()
newChannel
protected AbstractClientSession.AbstractSessionChannel newChannel(ChannelId channelId)
- Specified by:
newChannel
in class AbstractClientSession
- See Also:
AbstractClientSession.newChannel(org.cometd.common.ChannelId)
newChannelId
protected ChannelId newChannelId(java.lang.String channelId)
- Specified by:
newChannelId
in class AbstractClientSession
- See Also:
AbstractClientSession.newChannelId(java.lang.String)
sendBatch
protected void sendBatch()
- Specified by:
sendBatch
in class AbstractClientSession
- See Also:
AbstractClientSession.sendBatch()
getServerSession
public ServerSession getServerSession()
- Specified by:
getServerSession
in interface LocalSession
handshake
public void handshake()
- Specified by:
handshake
in interface ClientSession
handshake
public void handshake(java.util.Map<java.lang.String,java.lang.Object> template)
- Specified by:
handshake
in interface ClientSession
disconnect
public void disconnect()
- Specified by:
disconnect
in interface Session
getId
public java.lang.String getId()
- Specified by:
getId
in interface Session
isConnected
public boolean isConnected()
- Specified by:
isConnected
in interface Session
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
send
protected void send(ServerSessionImpl session,
ServerMessage.Mutable message)
- Send a message (to the server).
This method will either batch the message or call doSend(ServerSessionImpl, org.cometd.bayeux.server.ServerMessage.Mutable)
- Parameters:
session
- The ServerSession to send as. This normally the current server session, but during handshake it is a proposed server session.message
- The message to send.
doSend
protected void doSend(ServerSessionImpl session,
ServerMessage.Mutable message)
- Send a message (to the server).
Extends and sends the message without batching.
- Parameters:
session
- The ServerSession to send as. This normally the current server session, but during handshake it is a proposed server session.message
- The message to send.
dump
protected void dump(java.lang.StringBuilder b,
java.lang.String indent)
Copyright © 2010 Dojo Foundation. All Rights Reserved.