org.granite.client.messaging.transport
Class AbstractTransport<C>

java.lang.Object
  extended by org.granite.client.messaging.transport.AbstractTransport<C>
All Implemented Interfaces:
Transport
Direct Known Subclasses:
ApacheAsyncTransport, JettyWebSocketTransport

public abstract class AbstractTransport<C>
extends Object
implements Transport

Author:
Franck WOLFF

Field Summary
protected  List<TransportStopListener> stopListeners
           
 
Constructor Summary
AbstractTransport()
           
 
Method Summary
 void addStopListener(TransportStopListener listener)
           
 Configuration getConfiguration()
           
 C getContext()
           
 TransportStatusHandler getStatusHandler()
           
 boolean removeStopListener(TransportStopListener listener)
           
 void setConfiguration(Configuration config)
           
 void setContext(Object context)
           
 void setStatusHandler(TransportStatusHandler statusHandler)
           
 void stop()
           
 
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.transport.Transport
isStarted, poll, send, start
 

Field Detail

stopListeners

protected final List<TransportStopListener> stopListeners
Constructor Detail

AbstractTransport

public AbstractTransport()
Method Detail

setContext

public void setContext(Object context)
Specified by:
setContext in interface Transport

getContext

public C getContext()
Specified by:
getContext in interface Transport

setConfiguration

public void setConfiguration(Configuration config)
Specified by:
setConfiguration in interface Transport

getConfiguration

public Configuration getConfiguration()
Specified by:
getConfiguration in interface Transport

setStatusHandler

public void setStatusHandler(TransportStatusHandler statusHandler)
Specified by:
setStatusHandler in interface Transport

getStatusHandler

public TransportStatusHandler getStatusHandler()
Specified by:
getStatusHandler in interface Transport

addStopListener

public void addStopListener(TransportStopListener listener)
Specified by:
addStopListener in interface Transport

removeStopListener

public boolean removeStopListener(TransportStopListener listener)
Specified by:
removeStopListener in interface Transport

stop

public void stop()
Specified by:
stop in interface Transport