org.granite.client.messaging.channel
Class AbstractChannel<T extends Transport>

java.lang.Object
  extended by org.granite.client.messaging.channel.AbstractChannel<T>
All Implemented Interfaces:
Channel
Direct Known Subclasses:
AbstractHTTPChannel

public abstract class AbstractChannel<T extends Transport>
extends Object
implements Channel

Author:
Franck WOLFF

Field Summary
protected  String clientId
           
protected  Credentials credentials
           
protected  String id
           
protected  T transport
           
protected  Object transportData
           
protected  URI uri
           
 
Fields inherited from interface org.granite.client.messaging.channel.Channel
BYTEARRAY_BODY_HEADER, DEFAULT_TIME_TO_LIVE, RECONNECT_INTERVAL_MS_KEY, RECONNECT_MAX_ATTEMPTS_KEY
 
Constructor Summary
AbstractChannel(T transport, String id, URI uri)
           
 
Method Summary
 String getClientId()
           
 Credentials getCredentials()
           
 String getId()
           
 T getTransport()
           
<D> D
getTransportData()
           
 URI getUri()
           
 void setCredentials(Credentials credentials)
           
 void setTransportData(Object data)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.granite.client.messaging.channel.Channel
getDefaultTimeToLive, isAuthenticated, isStarted, logout, onCancelled, onError, onMessage, send, setDefaultTimeToLive, start, stop
 

Field Detail

transport

protected final T extends Transport transport

id

protected final String id

uri

protected final URI uri

clientId

protected volatile String clientId

credentials

protected volatile Credentials credentials

transportData

protected volatile Object transportData
Constructor Detail

AbstractChannel

public AbstractChannel(T transport,
                       String id,
                       URI uri)
Method Detail

getTransport

public T getTransport()
Specified by:
getTransport in interface Channel

getId

public String getId()
Specified by:
getId in interface Channel

getUri

public URI getUri()
Specified by:
getUri in interface Channel

getClientId

public String getClientId()
Specified by:
getClientId in interface Channel

setCredentials

public void setCredentials(Credentials credentials)
Specified by:
setCredentials in interface Channel

getCredentials

public Credentials getCredentials()
Specified by:
getCredentials in interface Channel

getTransportData

public <D> D getTransportData()
Specified by:
getTransportData in interface Channel

setTransportData

public void setTransportData(Object data)
Specified by:
setTransportData in interface Channel