org.granite.client.messaging.channel.amf
Class AMFMessagingChannel
java.lang.Object
org.granite.client.messaging.channel.AbstractChannel<Transport>
org.granite.client.messaging.channel.AbstractHTTPChannel
org.granite.client.messaging.channel.amf.AbstractAMFChannel
org.granite.client.messaging.channel.amf.AMFMessagingChannel
- All Implemented Interfaces:
- Runnable, Channel, MessagingChannel, SessionAwareChannel, TransportStopListener
- Direct Known Subclasses:
- JMFAMFMessagingChannel
public class AMFMessagingChannel
- extends AbstractAMFChannel
- implements MessagingChannel
- Author:
- Franck WOLFF
| Methods inherited from class org.granite.client.messaging.channel.AbstractHTTPChannel |
getMaxConcurrentRequests, getRequest, isAuthenticated, isStarted, logout, onCancelled, onMessage, onStop, run, schedule, send, start, 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.channel.Channel |
getClientId, getCredentials, getId, getTransport, getTransportData, getUri, isAuthenticated, isStarted, logout, onCancelled, onMessage, send, setCredentials, setTransportData, start, stop |
codec
protected final MessagingCodec<flex.messaging.messages.Message[]> codec
sessionId
protected String sessionId
consumersMap
protected final ConcurrentMap<String,Consumer> consumersMap
connectMessageId
protected final AtomicReference<String> connectMessageId
reconnectTimerTask
protected final AtomicReference<org.granite.client.messaging.channel.amf.AMFMessagingChannel.ReconnectTimerTask> reconnectTimerTask
reconnectIntervalMillis
protected volatile long reconnectIntervalMillis
reconnectMaxAttempts
protected volatile long reconnectMaxAttempts
reconnectAttempts
protected volatile long reconnectAttempts
AMFMessagingChannel
public AMFMessagingChannel(Transport transport,
String id,
URI uri)
AMFMessagingChannel
public AMFMessagingChannel(Transport transport,
Configuration configuration,
String id,
URI uri)
newMessagingCodec
protected MessagingCodec<flex.messaging.messages.Message[]> newMessagingCodec(Configuration configuration)
setSessionId
public void setSessionId(String sessionId)
- Specified by:
setSessionId in interface MessagingChannel- Specified by:
setSessionId in interface SessionAwareChannel
connect
protected boolean connect()
addConsumer
public void addConsumer(Consumer consumer)
- Specified by:
addConsumer in interface MessagingChannel
removeConsumer
public boolean removeConsumer(Consumer consumer)
- Specified by:
removeConsumer in interface MessagingChannel
disconnect
public ResponseMessageFuture disconnect(ResponseListener... listeners)
- Specified by:
disconnect in interface MessagingChannel
createTransportMessage
protected TransportMessage createTransportMessage(AsyncToken token)
throws UnsupportedEncodingException
- Specified by:
createTransportMessage in class AbstractHTTPChannel
- Throws:
UnsupportedEncodingException
decodeResponse
protected ResponseMessage decodeResponse(InputStream is)
throws IOException
- Specified by:
decodeResponse in class AbstractHTTPChannel
- Throws:
IOException
onError
public void onError(TransportMessage message,
Exception e)
- Specified by:
onError in interface Channel- Overrides:
onError in class AbstractHTTPChannel
cancelReconnectTimerTask
protected void cancelReconnectTimerTask()
scheduleReconnectTimerTask
protected void scheduleReconnectTimerTask()