XNIO version 1.1.0.GA

org.jboss.xnio
Class FinishedIoFuture<T>

java.lang.Object
  extended by org.jboss.xnio.AbstractIoFuture<T>
      extended by org.jboss.xnio.FinishedIoFuture<T>
Type Parameters:
T - the type of result that this operation produces
All Implemented Interfaces:
IoFuture<T>

public class FinishedIoFuture<T>
extends AbstractIoFuture<T>

An implementation of IoFuture that represents an immediately-successful operation.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.xnio.IoFuture
IoFuture.HandlingNotifier<T>, IoFuture.Notifier<T>, IoFuture.Status
 
Constructor Summary
FinishedIoFuture(T result)
          Create an instance.
 
Method Summary
 IoFuture<T> cancel()
          Cancel the operation.
protected  void runNotifier(IoFuture.Notifier<T> notifier)
          Run a notifier.
 
Methods inherited from class org.jboss.xnio.AbstractIoFuture
addNotifier, await, await, awaitInterruptibly, awaitInterruptibly, finishCancel, get, getException, getInterruptibly, getNotifierExecutor, getStatus, setException, setResult
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FinishedIoFuture

public FinishedIoFuture(T result)
Create an instance.

Parameters:
result - the operation result
Method Detail

runNotifier

protected void runNotifier(IoFuture.Notifier<T> notifier)
Run a notifier. The base implemenation runs the notifier in the current thread, always.

Overrides:
runNotifier in class AbstractIoFuture<T>
Parameters:
notifier - the notifier to run

cancel

public IoFuture<T> cancel()
Cancel the operation. Since this operation is always complete, this is a no-op.

Specified by:
cancel in interface IoFuture<T>
Specified by:
cancel in class AbstractIoFuture<T>
Returns:
this instance

XNIO version 1.1.0.GA

Copyright © 2008 JBoss, a division of Red Hat, Inc.