XNIO version 1.2.1.GA

org.jboss.xnio
Class FailedFutureConnection<A,T>

java.lang.Object
  extended by org.jboss.xnio.AbstractIoFuture<T>
      extended by org.jboss.xnio.FailedIoFuture<T>
          extended by org.jboss.xnio.FailedFutureConnection<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 FailedFutureConnection<A,T>
extends FailedIoFuture<T>
implements FutureConnection<A,T>

An implementation of FutureConnection that represents an immediately-failed 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
FailedFutureConnection(IOException e, A address)
          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

FailedFutureConnection

public FailedFutureConnection(IOException e,
                              A address)
Create an instance.

Parameters:
e - the failure cause
address - the address to return
Method Detail

getLocalAddress

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

Specified by:
getLocalAddress in interface FutureConnection<A,T>
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>
Specified by:
cancel in interface IoFuture<T>
Overrides:
cancel in class FailedIoFuture<T>
Returns:
this instance

XNIO version 1.2.1.GA

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