org.cometd.bayeux.client
Interface ClientSession

All Superinterfaces:
Session
All Known Subinterfaces:
LocalSession

public interface ClientSession
extends Session

Client Bayeux Session. This interface represents the client side Bayeux session, which is the entity that can subscribe and publish to channels.


Nested Class Summary
static interface ClientSession.Extension
          Extension API for client session.
 
Method Summary
 void addExtension(ClientSession.Extension extension)
          Add and extension to this session.
 SessionChannel getChannel(java.lang.String channelName)
          Get a channel scoped by this session.
 void handshake()
          Initiates the bayeux protocol handshake with the server(s).
 void handshake(java.util.Map<java.lang.String,java.lang.Object> template)
          Initiates the bayeux protocol handshake with the server(s).
 
Methods inherited from interface org.cometd.bayeux.Session
batch, disconnect, endBatch, getAttribute, getAttributeNames, getId, isConnected, removeAttribute, setAttribute, startBatch
 

Method Detail

addExtension

void addExtension(ClientSession.Extension extension)
Add and extension to this session.

Parameters:
extension -

handshake

void handshake()
               throws java.io.IOException

Initiates the bayeux protocol handshake with the server(s). This is an asynchronous handshake and does not wait for the handshake response

Throws:
java.io.IOException
See Also:
org.cometd.client.BayeuxClient#onConnectException(Throwable)}, org.cometd.client.BayeuxClient#onException(Throwable)}, org.cometd.client.BayeuxClient#onExpire()}, org.cometd.client.BayeuxClient#handshake(int time,java.util.concurrent.TimeUnit unit)}

handshake

void handshake(java.util.Map<java.lang.String,java.lang.Object> template)
               throws java.io.IOException

Initiates the bayeux protocol handshake with the server(s). This is an asynchronous handshake and does not wait for the handshake response

Parameters:
template - Template to use for handshake message
Throws:
java.io.IOException
See Also:
org.cometd.client.BayeuxClient#onConnectException(Throwable)}, org.cometd.client.BayeuxClient#onException(Throwable)}, org.cometd.client.BayeuxClient#onExpire()}, org.cometd.client.BayeuxClient#handshake(int time,java.util.concurrent.TimeUnit unit)}

getChannel

SessionChannel getChannel(java.lang.String channelName)
Get a channel scoped by this session.

Get a channel representation scoped to this session. The SessionChannel may be for a specific channel (eg /foo/bar) or for a wild channel (eg /meta/** or /foo/* ).

Parameters:
channelName - absolute or wild channel name.
Returns:
a channel scoped by this session.


Copyright © 2010 Dojo Foundation. All Rights Reserved.