public class LocalSessionImpl extends AbstractClientSession implements LocalSession
A LocalSession implementation.
This LocalSession implementation communicates with its
ServerSession counterpart without any serialization.
| Modifier and Type | Class and Description |
|---|---|
protected class |
LocalSessionImpl.LocalChannel
A channel scoped to this local session.
|
AbstractClientSession.AbstractSessionChannelClientSession.Extensionlogger, PUBLISH_CALLBACK_KEY| Modifier | Constructor and Description |
|---|---|
protected |
LocalSessionImpl(BayeuxServerImpl bayeux,
String idHint) |
| Modifier and Type | Method and Description |
|---|---|
void |
disconnect() |
protected void |
doSend(ServerSessionImpl from,
ServerMessage.Mutable message)
Sends a message to the server.
|
String |
getId() |
ServerSession |
getServerSession() |
void |
handshake() |
void |
handshake(Map<String,Object> template) |
boolean |
isConnected() |
boolean |
isHandshook() |
protected AbstractClientSession.AbstractSessionChannel |
newChannel(ChannelId channelId) |
protected ChannelId |
newChannelId(String channelId) |
protected void |
notifyListeners(Message.Mutable message) |
void |
receive(Message.Mutable message) |
protected void |
send(ServerSessionImpl session,
ServerMessage.Mutable message)
Enqueues or sends a message to the server.
|
protected void |
sendBatch() |
String |
toString() |
addExtension, batch, dump, endBatch, extendRcv, extendSend, getAttribute, getAttributeNames, getChannel, getChannels, getExtensions, isBatching, newMessageId, notifyListener, removeAttribute, removeExtension, resetSubscriptions, setAttribute, startBatchclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddExtension, getChannel, getExtensions, removeExtensionbatch, endBatch, getAttribute, getAttributeNames, removeAttribute, setAttribute, startBatchprotected LocalSessionImpl(BayeuxServerImpl bayeux, String idHint)
public void receive(Message.Mutable message)
receive in class AbstractClientSessionprotected void notifyListeners(Message.Mutable message)
notifyListeners in class AbstractClientSessionprotected AbstractClientSession.AbstractSessionChannel newChannel(ChannelId channelId)
newChannel in class AbstractClientSessionprotected ChannelId newChannelId(String channelId)
newChannelId in class AbstractClientSessionprotected void sendBatch()
sendBatch in class AbstractClientSessionpublic ServerSession getServerSession()
getServerSession in interface LocalSessionpublic void handshake()
handshake in interface ClientSessionpublic void handshake(Map<String,Object> template)
handshake in interface ClientSessionpublic void disconnect()
disconnect in interface Sessionpublic boolean isConnected()
isConnected in interface Sessionpublic boolean isHandshook()
isHandshook in interface Sessionprotected void send(ServerSessionImpl session, ServerMessage.Mutable message)
Enqueues or sends a message to the server.
This method will either enqueue the message, if this session is batching,
or perform the actual send by calling doSend(ServerSessionImpl, ServerMessage.Mutable).
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.protected void doSend(ServerSessionImpl from, ServerMessage.Mutable message)
Sends a message to the server.
from - 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.Copyright © 2008-2013 Dojo Foundation. All Rights Reserved.