org.atmosphere.wasync.serial
Class SerializedSocket

java.lang.Object
  extended by org.atmosphere.wasync.impl.DefaultSocket
      extended by org.atmosphere.wasync.serial.SerializedSocket
All Implemented Interfaces:
Socket

public class SerializedSocket
extends DefaultSocket

SerializedSocket is a Socket implementation that guarantees ordered message delivery of Socket.fire(Object) calls, by serializing fire calls over a SerializedFireStage.

SerializedSocket guarantees to use only one underlying connection at any moment in time, while still providing an asynchronous fire interface to clients.

Author:
Christian Bach, Christian Bach

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.atmosphere.wasync.Socket
Socket.STATUS
 
Field Summary
 
Fields inherited from class org.atmosphere.wasync.impl.DefaultSocket
functions, options, request, socketRuntime, transportInUse
 
Constructor Summary
SerializedSocket(SerializedOptions options)
           
 
Method Summary
 SocketRuntime createRuntime(DefaultFuture future, Options options, List<FunctionWrapper> functions)
           
 com.ning.http.client.ListenableFuture<com.ning.http.client.Response> directWrite(Object encodedPayload)
           
 SerializedFireStage getSerializedFireStage()
           
 
Methods inherited from class org.atmosphere.wasync.impl.DefaultSocket
addFunction, close, closeRuntime, connect, connect, fire, getTransport, internalSocket, on, on, on, open, open, request, status
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SerializedSocket

public SerializedSocket(SerializedOptions options)
Method Detail

createRuntime

public SocketRuntime createRuntime(DefaultFuture future,
                                   Options options,
                                   List<FunctionWrapper> functions)
Overrides:
createRuntime in class DefaultSocket

getSerializedFireStage

public SerializedFireStage getSerializedFireStage()

directWrite

public com.ning.http.client.ListenableFuture<com.ning.http.client.Response> directWrite(Object encodedPayload)
                                                                                 throws IOException
Throws:
IOException


Copyright © 2013. All Rights Reserved.