org.atmosphere.wasync.serial
Class SerializedSocket
java.lang.Object
org.atmosphere.wasync.impl.DefaultSocket
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
| Methods inherited from class org.atmosphere.wasync.impl.DefaultSocket |
addFunction, closeRuntime, 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 |
SerializedSocket
public SerializedSocket(SerializedOptions options)
createRuntime
public SocketRuntime createRuntime(DefaultFuture future,
Options options,
java.util.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(java.lang.Object encodedPayload)
throws java.io.IOException
- Throws:
java.io.IOException
close
public void close()
- Close this Socket, asynchronously.
- Specified by:
close in interface Socket- Overrides:
close in class DefaultSocket
Copyright © 2014. All Rights Reserved.