public class ServerSessionImpl extends Object implements org.cometd.bayeux.server.ServerSession, TransportServerSession
ServerSession
implementation.org.cometd.bayeux.server.ServerSession.DeQueueListener, org.cometd.bayeux.server.ServerSession.Extension, org.cometd.bayeux.server.ServerSession.MaxQueueListener, org.cometd.bayeux.server.ServerSession.MessageListener, org.cometd.bayeux.server.ServerSession.RemoveListener, org.cometd.bayeux.server.ServerSession.ServerSessionListener
Constructor and Description |
---|
ServerSessionImpl(String id,
BayeuxServerImpl server)
Initiate.
|
Modifier and Type | Method and Description |
---|---|
void |
addExtension(org.cometd.bayeux.server.ServerSession.Extension extension) |
void |
addListener(org.cometd.bayeux.server.ServerSession.ServerSessionListener listener) |
void |
batch(Runnable batch) |
void |
deliver(org.cometd.bayeux.Session from,
org.cometd.bayeux.server.ServerMessage.Mutable message) |
void |
deliver(org.cometd.bayeux.Session from,
String channel,
Object data,
String id) |
void |
disconnect() |
boolean |
endBatch() |
Object |
getAttribute(String name) |
Set<String> |
getAttributeNames() |
List<org.cometd.bayeux.server.ServerSession.Extension> |
getExtensions() |
String |
getId() |
long |
getInterval() |
org.cometd.bayeux.server.LocalSession |
getLocalSession() |
Set<org.cometd.bayeux.server.ServerChannel> |
getSubscriptions() |
long |
getTimeout() |
String |
getUserAgent() |
boolean |
isConnected() |
boolean |
isHandshook() |
boolean |
isLocalSession() |
Object |
removeAttribute(String name) |
void |
removeExtension(org.cometd.bayeux.server.ServerSession.Extension extension) |
void |
removeListener(org.cometd.bayeux.server.ServerSession.ServerSessionListener listener) |
void |
setAttribute(String name,
Object value) |
void |
setInterval(long interval) |
void |
setTimeout(long timeout) |
void |
startBatch() |
public ServerSessionImpl(String id, BayeuxServerImpl server)
id
- Identifier of this ServerSession
.server
- BayeuxServerImpl
.public String getId()
getId
in interface org.cometd.bayeux.Session
public boolean isConnected()
isConnected
in interface org.cometd.bayeux.Session
public boolean isHandshook()
isHandshook
in interface org.cometd.bayeux.Session
public void disconnect()
disconnect
in interface org.cometd.bayeux.Session
public void setAttribute(String name, Object value)
setAttribute
in interface org.cometd.bayeux.Session
public Object getAttribute(String name)
getAttribute
in interface org.cometd.bayeux.Session
public Set<String> getAttributeNames()
getAttributeNames
in interface org.cometd.bayeux.Session
public Object removeAttribute(String name)
removeAttribute
in interface org.cometd.bayeux.Session
public void batch(Runnable batch)
batch
in interface org.cometd.bayeux.Session
public void startBatch()
startBatch
in interface org.cometd.bayeux.Session
public boolean endBatch()
endBatch
in interface org.cometd.bayeux.Session
public void addExtension(org.cometd.bayeux.server.ServerSession.Extension extension)
addExtension
in interface org.cometd.bayeux.server.ServerSession
public void removeExtension(org.cometd.bayeux.server.ServerSession.Extension extension)
removeExtension
in interface org.cometd.bayeux.server.ServerSession
public List<org.cometd.bayeux.server.ServerSession.Extension> getExtensions()
getExtensions
in interface org.cometd.bayeux.server.ServerSession
public void addListener(org.cometd.bayeux.server.ServerSession.ServerSessionListener listener)
addListener
in interface org.cometd.bayeux.server.ServerSession
public void removeListener(org.cometd.bayeux.server.ServerSession.ServerSessionListener listener)
removeListener
in interface org.cometd.bayeux.server.ServerSession
public boolean isLocalSession()
isLocalSession
in interface org.cometd.bayeux.server.ServerSession
public org.cometd.bayeux.server.LocalSession getLocalSession()
getLocalSession
in interface org.cometd.bayeux.server.ServerSession
public void deliver(org.cometd.bayeux.Session from, org.cometd.bayeux.server.ServerMessage.Mutable message)
deliver
in interface org.cometd.bayeux.server.ServerSession
public void deliver(org.cometd.bayeux.Session from, String channel, Object data, String id)
deliver
in interface org.cometd.bayeux.server.ServerSession
public Set<org.cometd.bayeux.server.ServerChannel> getSubscriptions()
getSubscriptions
in interface org.cometd.bayeux.server.ServerSession
public String getUserAgent()
getUserAgent
in interface org.cometd.bayeux.server.ServerSession
public long getInterval()
getInterval
in interface org.cometd.bayeux.server.ServerSession
public void setInterval(long interval)
setInterval
in interface org.cometd.bayeux.server.ServerSession
public long getTimeout()
getTimeout
in interface org.cometd.bayeux.server.ServerSession
public void setTimeout(long timeout)
setTimeout
in interface org.cometd.bayeux.server.ServerSession
Copyright © 2005–2016. All rights reserved.