org.xnio.channels
Interface MulticastMessageChannel
- All Superinterfaces:
- BoundChannel, BoundMultipointMessageChannel, Channel, Closeable, CloseableChannel, Configurable, InterruptibleChannel, MultipointMessageChannel, ReadableMultipointMessageChannel, SuspendableChannel, SuspendableReadChannel, SuspendableWriteChannel, WritableMultipointMessageChannel
public interface MulticastMessageChannel
- extends BoundMultipointMessageChannel
A multicast-capable point-to-multipoint channel. UDP channels are multipoint datagram channels which support multicast registration.
| Methods inherited from interface java.nio.channels.Channel |
isOpen |
join
MulticastMessageChannel.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(InetAddress) method denies access to the group
join
MulticastMessageChannel.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(InetAddress) method denies access to the group
UnsupportedOperationException - if the implementation does not support source filtering
getReadSetter
ChannelListener.Setter<? extends MulticastMessageChannel> getReadSetter()
- Get the setter which can be used to change the read listener for this channel. When the listener is called,
additional notifications are automatically suspended.
- Specified by:
getReadSetter in interface BoundMultipointMessageChannel- Specified by:
getReadSetter in interface MultipointMessageChannel- Specified by:
getReadSetter in interface ReadableMultipointMessageChannel- Specified by:
getReadSetter in interface SuspendableChannel- Specified by:
getReadSetter in interface SuspendableReadChannel
- Returns:
- the setter
getCloseSetter
ChannelListener.Setter<? extends MulticastMessageChannel> 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 BoundMultipointMessageChannel- Specified by:
getCloseSetter in interface CloseableChannel- Specified by:
getCloseSetter in interface MultipointMessageChannel- Specified by:
getCloseSetter in interface ReadableMultipointMessageChannel- Specified by:
getCloseSetter in interface SuspendableChannel- Specified by:
getCloseSetter in interface SuspendableReadChannel- Specified by:
getCloseSetter in interface SuspendableWriteChannel- Specified by:
getCloseSetter in interface WritableMultipointMessageChannel
- Returns:
- the setter
getWriteSetter
ChannelListener.Setter<? extends MulticastMessageChannel> getWriteSetter()
- Get the setter which can be used to change the write listener for this channel. When the listener is called,
additional notifications are automatically suspended.
- Specified by:
getWriteSetter in interface BoundMultipointMessageChannel- Specified by:
getWriteSetter in interface MultipointMessageChannel- Specified by:
getWriteSetter in interface SuspendableChannel- Specified by:
getWriteSetter in interface SuspendableWriteChannel- Specified by:
getWriteSetter in interface WritableMultipointMessageChannel
- Returns:
- the setter
Copyright © 2010 JBoss, a division of Red Hat, Inc.