org.cometd.bayeux.client.ClientSession, org.cometd.bayeux.server.LocalSession, org.cometd.bayeux.Sessionpublic class LocalSessionImpl extends AbstractClientSession implements org.cometd.bayeux.server.LocalSession
A LocalSession implementation.
This LocalSession implementation communicates with its
ServerSession counterpart without any serialization.
| Modifier and Type | Class | Description |
|---|---|---|
protected class |
LocalSessionImpl.LocalChannel |
A channel scoped to this LocalSession.
|
AbstractClientSession.AbstractSessionChannel| Modifier | Constructor | Description |
|---|---|---|
protected |
LocalSessionImpl(BayeuxServerImpl bayeux,
java.lang.String idHint) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
disconnect(org.cometd.bayeux.client.ClientSession.MessageListener callback) |
|
java.lang.String |
getId() |
|
org.cometd.bayeux.server.ServerSession |
getServerSession() |
|
void |
handshake(java.util.Map<java.lang.String,java.lang.Object> template,
org.cometd.bayeux.client.ClientSession.MessageListener callback) |
|
boolean |
isConnected() |
|
boolean |
isHandshook() |
|
protected AbstractClientSession.AbstractSessionChannel |
newChannel(org.cometd.bayeux.ChannelId channelId) |
|
protected org.cometd.bayeux.ChannelId |
newChannelId(java.lang.String channelId) |
|
protected org.cometd.bayeux.server.ServerMessage.Mutable |
newMessage() |
|
void |
receive(org.cometd.bayeux.Message.Mutable message,
org.cometd.bayeux.Promise<java.lang.Void> promise) |
|
protected void |
send(org.cometd.bayeux.Message.Mutable message) |
|
protected void |
send(ServerSessionImpl session,
org.cometd.bayeux.server.ServerMessage.Mutable message) |
Enqueues or sends a message to the server.
|
protected void |
sendBatch() |
|
java.lang.String |
toString() |
addExtension, batch, dump, dump, endBatch, extendIncoming, extendOutgoing, extendRcv, extendSend, getAttribute, getAttributeNames, getChannel, getChannel, getChannels, getExtensions, isBatching, newMessageId, notifyCallback, notifyListeners, registerCallback, registerSubscriber, remoteCall, removeAttribute, removeExtension, resetSubscriptions, setAttribute, startBatch, unregisterCallback, unregisterSubscriberaddExtension, disconnect, disconnect, getChannel, getExtensions, handshake, handshake, handshake, remoteCall, removeExtensionprotected LocalSessionImpl(BayeuxServerImpl bayeux, java.lang.String idHint)
public void receive(org.cometd.bayeux.Message.Mutable message,
org.cometd.bayeux.Promise<java.lang.Void> promise)
receive in class AbstractClientSessionprotected AbstractClientSession.AbstractSessionChannel newChannel(org.cometd.bayeux.ChannelId channelId)
newChannel in class AbstractClientSessionprotected org.cometd.bayeux.ChannelId newChannelId(java.lang.String channelId)
newChannelId in class AbstractClientSessionprotected void sendBatch()
sendBatch in class AbstractClientSessionpublic org.cometd.bayeux.server.ServerSession getServerSession()
getServerSession in interface org.cometd.bayeux.server.LocalSessionpublic void handshake(java.util.Map<java.lang.String,java.lang.Object> template,
org.cometd.bayeux.client.ClientSession.MessageListener callback)
handshake in interface org.cometd.bayeux.client.ClientSessionpublic void disconnect(org.cometd.bayeux.client.ClientSession.MessageListener callback)
disconnect in interface org.cometd.bayeux.client.ClientSessionpublic java.lang.String getId()
getId in interface org.cometd.bayeux.Sessionpublic boolean isConnected()
isConnected in interface org.cometd.bayeux.Sessionpublic boolean isHandshook()
isHandshook in interface org.cometd.bayeux.Sessionpublic java.lang.String toString()
toString in class java.lang.Objectprotected void send(org.cometd.bayeux.Message.Mutable message)
send in class AbstractClientSessionprotected void send(ServerSessionImpl session, org.cometd.bayeux.server.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 send immediately.
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 org.cometd.bayeux.server.ServerMessage.Mutable newMessage()
newMessage in class AbstractClientSessionCopyright © 2008–2017 The CometD Project. All rights reserved.