org.jboss.xnio.channels
Interface UdpChannel
- All Superinterfaces:
- BoundChannel<SocketAddress>, Channel, Closeable, Configurable, MultipointDatagramChannel<SocketAddress>, MultipointMessageChannel<SocketAddress>, MultipointReadableMessageChannel<SocketAddress>, MultipointWritableMessageChannel<SocketAddress>, SuspendableChannel, SuspendableReadChannel, SuspendableWriteChannel
public interface UdpChannel
- extends MultipointDatagramChannel<SocketAddress>
A UDP channel. UDP channels are multipoint datagram channels which always use a SocketAddress
and
additionally support multicast registration.
Nested Class Summary |
static interface |
UdpChannel.Key
A registration key for a multicast group. |
join
UdpChannel.Key join(InetAddress group,
NetworkInterface iface)
throws IOException
- Join a multicast group to begin receiving all datagrams sent to the group.
A multicast channel may join several multicast groups, including the same group on more than one interface. An
implementation may impose a limit on the number of groups that may be joined at the same time.
- Parameters:
group
- the multicast address to joiniface
- the network interface to join on
- Returns:
- a new key
- Throws:
IOException
- if an I/O error occurs
IllegalStateException
- if the channel is already a member of the group on this interface
IllegalArgumentException
- if the group
parameters is not a multicast address, or is an unsupported address type
SecurityException
- if a security manager is set, and its SecurityManager.checkMulticast(java.net.InetAddress)
method denies access to the group
join
UdpChannel.Key join(InetAddress group,
NetworkInterface iface,
InetAddress source)
throws IOException
- Join a multicast group to begin receiving all datagrams sent to the group from a given source address.
A multicast channel may join several multicast groups, including the same group on more than one interface. An
implementation may impose a limit on the number of groups that may be joined at the same time.
- Parameters:
group
- the multicast address to joiniface
- the network interface to join onsource
- the source address to listen for
- Returns:
- a new key
- Throws:
IOException
- if an I/O error occurs
IllegalStateException
- if the channel is already a member of the group on this interface
IllegalArgumentException
- if the group
parameters is not a multicast address, or is an unsupported address type
SecurityException
- if a security manager is set, and its SecurityManager.checkMulticast(java.net.InetAddress)
method denies access to the group
UnsupportedOperationException
- if the implementation does not support source filtering
Copyright © 2008 JBoss, a division of Red Hat, Inc.