public class ServerSessionImpl extends Object implements ServerSession
ServerSession.DeQueueListener, ServerSession.Extension, ServerSession.MaxQueueListener, ServerSession.MessageListener, ServerSession.QueueListener, ServerSession.RemoveListener, ServerSession.ServerSessionListener| Modifier | Constructor and Description |
|---|---|
protected |
ServerSessionImpl(BayeuxServerImpl bayeux) |
protected |
ServerSessionImpl(BayeuxServerImpl bayeux,
LocalSessionImpl localSession,
String idHint) |
protected ServerSessionImpl(BayeuxServerImpl bayeux)
protected ServerSessionImpl(BayeuxServerImpl bayeux, LocalSessionImpl localSession, String idHint)
public String getUserAgent()
getUserAgent in interface ServerSessionpublic void setUserAgent(String userAgent)
userAgent - the remote user agentprotected void sweep(long now)
public Set<ServerChannel> getSubscriptions()
getSubscriptions in interface ServerSessionpublic void addExtension(ServerSession.Extension extension)
addExtension in interface ServerSessionpublic void removeExtension(ServerSession.Extension extension)
removeExtension in interface ServerSessionpublic List<ServerSession.Extension> getExtensions()
getExtensions in interface ServerSessionpublic void deliver(Session sender, ServerMessage.Mutable message)
deliver in interface ServerSessionpublic void deliver(Session sender, String channelId, Object data)
deliver in interface ServerSessionprotected void doDeliver(ServerSession sender, ServerMessage.Mutable mutable)
protected void handshake()
protected void connected()
public void disconnect()
disconnect in interface Sessionpublic LocalSession getLocalSession()
getLocalSession in interface ServerSessionpublic boolean isLocalSession()
isLocalSession in interface ServerSessionpublic void startBatch()
startBatch in interface Sessionpublic void addListener(ServerSession.ServerSessionListener listener)
addListener in interface ServerSessionpublic Object getLock()
public Queue<ServerMessage> getQueue()
public boolean hasNonLazyMessages()
protected void addMessage(ServerMessage message)
public List<ServerMessage> takeQueue()
public void removeListener(ServerSession.ServerSessionListener listener)
removeListener in interface ServerSessionpublic void setScheduler(AbstractServerTransport.Scheduler newScheduler)
public void flush()
public void cancelSchedule()
public void cancelIntervalTimeout()
public void startIntervalTimeout(long defaultInterval)
protected long getMaxInterval()
public Object getAttribute(String name)
getAttribute in interface Sessionpublic Set<String> getAttributeNames()
getAttributeNames in interface Sessionpublic Object removeAttribute(String name)
removeAttribute in interface Sessionpublic void setAttribute(String name, Object value)
setAttribute in interface Sessionpublic boolean isHandshook()
isHandshook in interface Sessionpublic boolean isConnected()
isConnected in interface Sessionpublic boolean isDisconnected()
protected boolean extendRecv(ServerMessage.Mutable message)
protected boolean extendSendMeta(ServerMessage.Mutable message)
protected ServerMessage.Mutable extendSendMessage(ServerMessage.Mutable message)
public void reAdvise()
public Map<String,Object> takeAdvice(ServerTransport transport)
public long getTimeout()
getTimeout in interface ServerSessionpublic long getInterval()
getInterval in interface ServerSessionpublic void setTimeout(long timeoutMS)
setTimeout in interface ServerSessionpublic void setInterval(long intervalMS)
setInterval in interface ServerSessionpublic boolean isBroadcastToPublisher()
public void setBroadcastToPublisher(boolean value)
protected boolean removed(boolean timedOut)
timedOut - whether the session has been timed outpublic void setMetaConnectDeliveryOnly(boolean meta)
public boolean isMetaConnectDeliveryOnly()
protected void subscribedTo(ServerChannelImpl channel)
protected void unsubscribedFrom(ServerChannelImpl channel)
protected void dump(StringBuilder b, String indent)
public long calculateTimeout(long defaultTimeout)
public long calculateInterval(long defaultInterval)
public void updateTransientTimeout(long timeout)
timeout - the value to update the timeout toupdateTransientInterval(long)public void updateTransientInterval(long interval)
interval - the value to update the interval toupdateTransientTimeout(long)Copyright © 2008–2015 Dojo Foundation. All rights reserved.