org.atmosphere.wasync
Interface Transport

All Known Implementing Classes:
LongPollingTransport, SSETransport, StreamTransport, WebSocketTransport

public interface Transport

Define a supported Transport. Default are websocket, streaming, server-side events and long-polling. Use this interface only if you want to define another transport. New transport can be registered using the Options class.

Author:
Jeanfrancois Arcand

Method Summary
 void close()
          Close the underlying transport}
 void connectedFuture(Future f)
          Set the Future, which will unlock the Socket.fire(java.lang.Object) method once the connection has been fully established.
 void error(java.lang.Throwable e)
          Set a Throwable
 boolean errorHandled()
          Error handled by a Function
 void future(Future f)
          Set the Future, which can be used to clone the connection.
 Request.TRANSPORT name()
          The transport name
 void onThrowable(java.lang.Throwable t)
          Called when an unexpected exception ocurred.
 Transport registerF(FunctionWrapper function)
          Register a new FunctionResolver
 Socket.STATUS status()
          Return the current Socket.STATUS
 

Method Detail

name

Request.TRANSPORT name()
The transport name

Returns:
transport name

registerF

Transport registerF(FunctionWrapper function)
Register a new FunctionResolver

Parameters:
function - FunctionResolver
Returns:
this;

onThrowable

void onThrowable(java.lang.Throwable t)
Called when an unexpected exception ocurred.

Parameters:
t - a Throwable

close

void close()
Close the underlying transport}


status

Socket.STATUS status()
Return the current Socket.STATUS


errorHandled

boolean errorHandled()
Error handled by a Function


error

void error(java.lang.Throwable e)
Set a Throwable

Parameters:
e - Throwable

future

void future(Future f)
Set the Future, which can be used to clone the connection.

Parameters:
f - Future

connectedFuture

void connectedFuture(Future f)
Set the Future, which will unlock the Socket.fire(java.lang.Object) method once the connection has been fully established.

Parameters:
f - Future


Copyright © 2014. All Rights Reserved.