com.sun.grizzly.async
Class AsyncQueueFuture<E>

java.lang.Object
  extended by com.sun.grizzly.async.AsyncQueueFuture<E>
All Implemented Interfaces:
Future<E>

public class AsyncQueueFuture<E>
extends Object
implements Future<E>

Async queue Future implementation

Author:
Alexey Stashok

Constructor Summary
AsyncQueueFuture()
           
 
Method Summary
 boolean cancel(boolean mayInterruptIfRunning)
           
 E get()
           
 E get(long timeout, TimeUnit unit)
           
 Throwable getException()
           
 E getResult()
           
 boolean isCancelled()
           
 boolean isDone()
           
protected  void notifyResult()
           
 void setException(Throwable exception)
           
 void setResult(E result)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsyncQueueFuture

public AsyncQueueFuture()
Method Detail

cancel

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

isCancelled

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

isDone

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

get

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

get

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

getResult

public E getResult()

setResult

public void setResult(E result)

getException

public Throwable getException()

setException

public void setException(Throwable exception)

notifyResult

protected void notifyResult()


Copyright © 2008 SUN Microsystems. All Rights Reserved.