org.jboss.netty.channel
Class UnfailingChannelFuture
java.lang.Object
org.jboss.netty.channel.DefaultChannelFuture
org.jboss.netty.channel.UnfailingChannelFuture
- All Implemented Interfaces:
- ChannelFuture
public class UnfailingChannelFuture
- extends DefaultChannelFuture
The ChannelFuture
which can not fail at all. Any attempt to mark
this future as failure, by calling setFailure(Throwable)
will raise
an IllegalStateException
.
- Version:
- $Rev: 1685 $, $Date: 2009-08-28 16:15:49 +0900 (금, 28 8 2009) $
- Author:
- The Netty Project (netty-dev@lists.jboss.org), Trustin Lee (tlee@redhat.com)
Method Summary |
boolean |
setFailure(Throwable cause)
Marks this future as a failure and notifies all
listeners. |
Methods inherited from class org.jboss.netty.channel.DefaultChannelFuture |
addListener, await, await, await, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, cancel, getCause, getChannel, isCancelled, isDone, isSuccess, isUseDeadLockChecker, removeListener, setSuccess, setUseDeadLockChecker |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UnfailingChannelFuture
public UnfailingChannelFuture(Channel channel,
boolean cancellable)
- Creates a new instance.
- Parameters:
channel
- the Channel
associated with this futurecancellable
- true
if and only if this future can be canceled
setFailure
public boolean setFailure(Throwable cause)
- Description copied from interface:
ChannelFuture
- Marks this future as a failure and notifies all
listeners.
- Specified by:
setFailure
in interface ChannelFuture
- Overrides:
setFailure
in class DefaultChannelFuture
- Returns:
true
if and only if successfully marked this future as
a failure. Otherwise false
because this future is
already marked as either a success or a failure.
Copyright © 2008-2009 JBoss, by Red Hat. All Rights Reserved.