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.AbstractSessionChannel| Constructor and Description |
|---|
LocalSessionImpl(BayeuxServerImpl bayeux,
String idHint) |
| Modifier and Type | Method and Description |
|---|---|
void |
disconnect(org.cometd.bayeux.client.ClientSession.MessageListener callback) |
String |
getId() |
ServerSession |
getServerSession() |
void |
handshake(Map<String,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(String channelId) |
protected ServerMessage.Mutable |
newMessage() |
void |
receive(org.cometd.bayeux.Message.Mutable message,
org.cometd.bayeux.Promise<Void> promise) |
protected void |
send(org.cometd.bayeux.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, extendIncoming, extendOutgoing, getAttribute, getAttributeNames, getChannel, getChannel, getChannels, getExtensions, isBatching, newMessageId, notifyCallback, notifyListeners, registerCallback, registerSubscriber, remoteCall, removeAttribute, removeExtension, resetSubscriptions, setAttribute, startBatch, unregisterCallback, unregisterSubscriberclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddExtension, disconnect, getChannel, getExtensions, handshake, handshake, remoteCall, removeExtensionpublic LocalSessionImpl(BayeuxServerImpl bayeux, String idHint)
public void receive(org.cometd.bayeux.Message.Mutable message,
org.cometd.bayeux.Promise<Void> promise)
receive in class AbstractClientSessionprotected AbstractClientSession.AbstractSessionChannel newChannel(org.cometd.bayeux.ChannelId channelId)
newChannel in class AbstractClientSessionprotected org.cometd.bayeux.ChannelId newChannelId(String channelId)
newChannelId in class AbstractClientSessionprotected void sendBatch()
sendBatch in class AbstractClientSessionpublic ServerSession getServerSession()
getServerSession in interface LocalSessionpublic void handshake(Map<String,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 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.Sessionprotected void send(org.cometd.bayeux.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 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 ServerMessage.Mutable newMessage()
newMessage in class AbstractClientSessionCopyright © 2008–2022 The CometD Project. All rights reserved.