XNIO version 1.2.0.GA

org.jboss.xnio
Class FinishedFutureConnection<A,T extends BoundChannel<A>>

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

public class FinishedFutureConnection<A,T extends BoundChannel<A>>
extends FinishedIoFuture<T>
implements FutureConnection<A,T>

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

Since:
1.2

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.xnio.IoFuture
IoFuture.HandlingNotifier<T,A>, IoFuture.Notifier<T,A>, IoFuture.Status
 
Constructor Summary
FinishedFutureConnection(T result)
          Create an instance.
 
Method Summary
 FutureConnection<A,T> cancel()
          Cancel the operation.
 A getLocalAddress()
          The local address of the future channel.
 
Methods inherited from class org.jboss.xnio.AbstractIoFuture
addNotifier, await, await, awaitInterruptibly, awaitInterruptibly, finishCancel, get, getException, getInterruptibly, getNotifierExecutor, getStatus, runNotifier, setException, setResult
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.xnio.IoFuture
addNotifier, await, await, awaitInterruptibly, awaitInterruptibly, get, getException, getInterruptibly, getStatus
 

Constructor Detail

FinishedFutureConnection

public FinishedFutureConnection(T result)
Create an instance.

Parameters:
result - the operation result
Method Detail

getLocalAddress

public A getLocalAddress()
The local address of the future channel.

Specified by:
getLocalAddress in interface FutureConnection<A,T extends BoundChannel<A>>
Returns:
the local address
See Also:
BoundChannel.getLocalAddress()

cancel

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

Specified by:
cancel in interface FutureConnection<A,T extends BoundChannel<A>>
Specified by:
cancel in interface IoFuture<T extends BoundChannel<A>>
Overrides:
cancel in class FinishedIoFuture<T extends BoundChannel<A>>
Returns:
this instance

XNIO version 1.2.0.GA

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