XNIO API 2.0.0.GA

org.jboss.xnio.channels
Interface CloseableChannel

All Superinterfaces:
java.nio.channels.Channel, java.io.Closeable, Configurable
All Known Subinterfaces:
AcceptingServer<A,T,C>, BoundChannel<A>, BoundServer<A,T>, ConnectedChannel<A>, ConnectedStreamChannel<A>, DatagramChannel<A>, LocalChannel, LocalServer, MessageChannel, MultipointDatagramChannel<A>, MultipointMessageChannel<A>, MultipointReadableMessageChannel<A>, MultipointWritableMessageChannel<A>, ReadableAllocatedMessageChannel, ReadableMessageChannel, SslChannel, SslTcpChannel, StreamChannel, StreamSinkChannel, StreamSourceChannel, SuspendableChannel, SuspendableReadChannel, SuspendableWriteChannel, TcpChannel, TcpServer, UdpChannel, UdpServer, WritableMessageChannel

public interface CloseableChannel
extends java.nio.channels.Channel, Configurable

A channel which is closable. A handler may be registered which is triggered (only once) on channel close.

Since:
2.0

Method Summary
 ChannelListener.Setter<? extends CloseableChannel> getCloseSetter()
          Get the setter which can be used to change the close handler for this channel.
 
Methods inherited from interface java.nio.channels.Channel
close, isOpen
 
Methods inherited from interface org.jboss.xnio.channels.Configurable
getOption, setOption, supportsOption
 

Method Detail

getCloseSetter

ChannelListener.Setter<? extends CloseableChannel> getCloseSetter()
Get the setter which can be used to change the close handler for this channel. If the channel is already closed, then the handler will not be called.

Returns:
the setter

XNIO API 2.0.0.GA

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