|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Session
A Bayeux Session
A bayeux session represents a connection between a bayeux client and
a bayeux server. Previously this interface was called "Client", but this
resulted in confusion between the various representation of the server-side
elements of a "Client". Thus this entity has been renamed "Session", but
for backwards compatibility with the wire protocol, it is identified by
a clientID field withing the messages (see Message.getClientId()
).
This interface is the common base interface for both server side and client side representations of a session. Note that on the client side a local session may have representations of both serverside and client sides for the same session.
Method Summary | |
---|---|
void |
batch(java.lang.Runnable batch)
Run a Runnable in a batch. |
void |
disconnect()
Disconnect the session |
void |
endBatch()
Deprecated. use batch(Runnable) |
java.lang.Object |
getAttribute(java.lang.String name)
Get a named attribute |
java.util.Set<java.lang.String> |
getAttributeNames()
Get Attribute names. |
java.lang.String |
getId()
The ClientId of the session. |
boolean |
isConnected()
|
java.lang.Object |
removeAttribute(java.lang.String name)
Remove a session attribute |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Set a session attribute. |
void |
startBatch()
Deprecated. use batch(Runnable) |
Method Detail |
---|
java.lang.String getId()
This would more correctly be called a "sessionId", but for backwards compatibility with the bayeux protocol, it is a clientId that identifies a session.
boolean isConnected()
void disconnect()
void setAttribute(java.lang.String name, java.lang.Object value)
Session attributes are convenience data that allows arbitrary application data to be associated with a session.
name
- The attribute namevalue
- The attribute valuejava.lang.Object getAttribute(java.lang.String name)
name
- The name of the attribute
java.util.Set<java.lang.String> getAttributeNames()
java.lang.Object removeAttribute(java.lang.String name)
name
- The name of the attribute
void batch(java.lang.Runnable batch)
batch
- the Runnable to run as a batchvoid endBatch()
batch(Runnable)
void startBatch()
batch(Runnable)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |