org.xnio.channels
Interface AcceptingChannel<C extends ConnectedChannel>
- Type Parameters:
C
- the channel type
- All Superinterfaces:
- BoundChannel, Channel, Closeable, CloseableChannel, Configurable, InterruptibleChannel, SimpleAcceptingChannel<C>, SuspendableAcceptChannel
public interface AcceptingChannel<C extends ConnectedChannel>
- extends BoundChannel, SimpleAcceptingChannel<C>
A channel which can accept inbound connections from remote endpoints.
- Author:
- David M. Lloyd
Methods inherited from interface java.nio.channels.Channel |
isOpen |
accept
C accept()
throws IOException
- Attempt to accept a connection.
- Specified by:
accept
in interface SimpleAcceptingChannel<C extends ConnectedChannel>
- Returns:
- the new connection, or
null
if none is available
- Throws:
IOException
- if an I/O error occurs
getAcceptSetter
ChannelListener.Setter<? extends AcceptingChannel<C>> getAcceptSetter()
- Get the setter which can be used to change the accept listener for this channel.
- Specified by:
getAcceptSetter
in interface SimpleAcceptingChannel<C extends ConnectedChannel>
- Specified by:
getAcceptSetter
in interface SuspendableAcceptChannel
- Returns:
- the setter
getCloseSetter
ChannelListener.Setter<? extends AcceptingChannel<C>> getCloseSetter()
- Get the setter which can be used to change the close listener for this channel. If the channel is already
closed, then the listener will not be called.
- Specified by:
getCloseSetter
in interface BoundChannel
- Specified by:
getCloseSetter
in interface CloseableChannel
- Specified by:
getCloseSetter
in interface SimpleAcceptingChannel<C extends ConnectedChannel>
- Specified by:
getCloseSetter
in interface SuspendableAcceptChannel
- Returns:
- the setter
Copyright © 2010 JBoss, a division of Red Hat, Inc.