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 LocalSession.
|
AbstractClientSession.AbstractSessionChannelClientSession.Extension, ClientSession.MessageListener| Constructor and Description |
|---|
LocalSessionImpl(BayeuxServerImpl bayeux,
java.lang.String idHint) |
| Modifier and Type | Method and Description |
|---|---|
void |
disconnect() |
void |
disconnect(ClientSessionChannel.MessageListener callback) |
protected void |
doSend(ServerSessionImpl from,
ServerMessage.Mutable message)
Sends a message to the server.
|
java.lang.String |
getId() |
ServerSession |
getServerSession() |
void |
handshake() |
void |
handshake(java.util.Map<java.lang.String,java.lang.Object> template) |
void |
handshake(java.util.Map<java.lang.String,java.lang.Object> template,
ClientSessionChannel.MessageListener callback) |
boolean |
isConnected() |
boolean |
isHandshook() |
protected AbstractClientSession.AbstractSessionChannel |
newChannel(ChannelId channelId) |
protected ChannelId |
newChannelId(java.lang.String channelId) |
protected ServerMessage.Mutable |
newMessage() |
void |
receive(Message.Mutable message) |
protected void |
send(Message.Mutable message) |
protected void |
send(ServerSessionImpl session,
ServerMessage.Mutable message)
Enqueues or sends a message to the server.
|
protected void |
sendBatch() |
java.lang.String |
toString() |
addExtension, batch, dump, dump, endBatch, extendRcv, extendSend, getAttribute, getAttributeNames, getChannel, getChannel, getChannels, getExtensions, isBatching, newMessageId, notifyListener, notifyListeners, registerCallback, registerSubscriber, remoteCall, removeAttribute, removeExtension, resetSubscriptions, setAttribute, startBatch, unregisterCallback, unregisterSubscriberclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddExtension, getChannel, getExtensions, remoteCall, removeExtensionbatch, endBatch, getAttribute, getAttributeNames, removeAttribute, setAttribute, startBatchpublic LocalSessionImpl(BayeuxServerImpl bayeux, java.lang.String idHint)
public void receive(Message.Mutable message)
receive in class AbstractClientSessionprotected AbstractClientSession.AbstractSessionChannel newChannel(ChannelId channelId)
newChannel in class AbstractClientSessionprotected ChannelId newChannelId(java.lang.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(java.util.Map<java.lang.String,java.lang.Object> template)
handshake in interface ClientSessionpublic void handshake(java.util.Map<java.lang.String,java.lang.Object> template,
ClientSessionChannel.MessageListener callback)
handshake in interface ClientSessionpublic void disconnect()
disconnect in interface Sessionpublic void disconnect(ClientSessionChannel.MessageListener callback)
disconnect in interface ClientSessionpublic boolean isConnected()
isConnected in interface Sessionpublic boolean isHandshook()
isHandshook in interface Sessionpublic java.lang.String toString()
toString in class java.lang.Objectprotected void send(Message.Mutable message)
send in class AbstractClientSessionprotected 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.protected ServerMessage.Mutable newMessage()
newMessage in class AbstractClientSessionCopyright © 2008–2019 The CometD Project. All rights reserved.