org.jboss.xnio
Interface IoHandler<T extends Channel>
- Type Parameters:
T
- the type of channel that the handler can handle
- All Superinterfaces:
- IoReadHandler<T>, IoWriteHandler<T>
- All Known Implementing Classes:
- DelegatingIoHandler
public interface IoHandler<T extends Channel>
- extends IoReadHandler<T>, IoWriteHandler<T>
A channel I/O handler. Implementations of this interface handle traffic over a Channel
.
handleOpened
void handleOpened(T channel)
- Handle channel open. This method is called exactly once per channel. When a channel is opened, both reads and
writes are suspended initially, and must be resumed manually. If this method fails by throwing an exception,
the channel open is aborted and the underlying channel is terminated without invoking the
handleClosed(java.nio.channels.Channel)
method.
- Parameters:
channel
- the channel that was opened
handleClosed
void handleClosed(T channel)
- Handle channel close. This method is called exactly once when the channel is closed. If the channel's
Channel.close()
method is called again, this method is not invoked.
- Parameters:
channel
- the channel that was closed
Copyright © 2008 JBoss, a division of Red Hat, Inc.