org.atmosphere.wasync
Interface Future

All Superinterfaces:
java.util.concurrent.Future<Socket>

public interface Future
extends java.util.concurrent.Future<Socket>

An internal Future implementation used by Transport to notify Socket when the transport has connected and available.

Author:
Jeanfrancois Arcand

Method Summary
 void close()
          Close the underlying Socket
 void done()
          Mark this instance as done.
 Future finishOrThrowException()
          Mark the future done.
 Future fire(java.lang.Object message)
          Send data to the remote Server.
 Future ioException(java.io.IOException t)
          If an exception occurs, the Transport will set it using this method.
 
Methods inherited from interface java.util.concurrent.Future
cancel, get, get, isCancelled, isDone
 

Method Detail

fire

Future fire(java.lang.Object message)
            throws java.io.IOException
Send data to the remote Server.

Parameters:
message - the message to fire
Returns:
a Future
Throws:
java.io.IOException

finishOrThrowException

Future finishOrThrowException()
                              throws java.io.IOException
Mark the future done. If an exception occurred, this method will throw it.

Returns:
a Future
Throws:
java.io.IOException

ioException

Future ioException(java.io.IOException t)
If an exception occurs, the Transport will set it using this method. An application can also use that method to interrupt a blocking Socket.open(Request) operation. This operation must unlock the current blocked thread.

Parameters:
t - a IOException
Returns:
a Future

done

void done()
Mark this instance as done.


close

void close()
Close the underlying Socket



Copyright © 2014. All Rights Reserved.