org.atmosphere.wasync.impl
Class DefaultFuture

java.lang.Object
  extended by org.atmosphere.wasync.impl.DefaultFuture
All Implemented Interfaces:
Future<Socket>

public class DefaultFuture
extends Object
implements Future


Constructor Summary
DefaultFuture(Socket socket)
           
 
Method Summary
 boolean cancel(boolean mayInterruptIfRunning)
           
 Future done()
          Mark the future done.
 Future fire(Object data)
          Send data to the remote Server.
 Socket get()
           
 Socket get(long timeout, TimeUnit unit)
           
 boolean isCancelled()
           
 boolean isDone()
           
protected  Socket socket()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultFuture

public DefaultFuture(Socket socket)
Method Detail

cancel

public boolean cancel(boolean mayInterruptIfRunning)
Specified by:
cancel in interface Future<Socket>

isCancelled

public boolean isCancelled()
Specified by:
isCancelled in interface Future<Socket>

isDone

public boolean isDone()
Specified by:
isDone in interface Future<Socket>

done

public Future done()
Description copied from interface: Future
Mark the future done.


get

public Socket get()
           throws InterruptedException,
                  ExecutionException
Specified by:
get in interface Future<Socket>
Throws:
InterruptedException
ExecutionException

get

public Socket get(long timeout,
                  TimeUnit unit)
           throws InterruptedException,
                  ExecutionException,
                  TimeoutException
Specified by:
get in interface Future<Socket>
Throws:
InterruptedException
ExecutionException
TimeoutException

socket

protected Socket socket()

fire

public Future fire(Object data)
            throws IOException
Description copied from interface: Future
Send data to the remote Server.

Returns:
a Future
Throws:
IOException


Copyright © 2012. All Rights Reserved.