Package biz.onixs.util.network
Interface IMulticastReceiver
-
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
MulticastFastThreadReceiver,MulticastReceiver,MulticastThreadReceiver
public interface IMulticastReceiver extends Closeable
- Author:
- vmelnyk
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddrop(MulticastGroup feed)Drops (and closes) attached feed.MulticastGroupjoin(String groupId, int port, NetworkInterface nif, MulticastListener listener)Short version of join with default buffer sizeMulticastGroupjoin(String groupId, int port, NetworkInterface nif, MulticastListener listener, int bufferSize)Creates a feed and send a join request.MulticastGroupjoin(InetSocketAddress group, NetworkInterface nif, MulticastListener listener)Short version of join with default buffer sizeMulticastGroupjoin(InetSocketAddress group, NetworkInterface nif, MulticastListener listener, int bufferSize)Creates a feed and send a join request.booleanstep()process one step of receiving.
-
-
-
Method Detail
-
join
MulticastGroup join(String groupId, int port, NetworkInterface nif, MulticastListener listener)
Short version of join with default buffer size
This method is equivalent to:
join(groupId, port, nif, listener, MulticastReceiver.PACKET_MAXSIZE);- Parameters:
groupId- a multicast address to joinport- port number where to receive UDP packetsnif- The network interface on which to join the grouplistener- of the MulticastGroup events.- Returns:
- created MulticastGroup
-
join
MulticastGroup join(String groupId, int port, NetworkInterface nif, MulticastListener listener, int bufferSize)
Creates a feed and send a join request.- Parameters:
groupId- a multicast address to joinport- port number where to receive UDP packetsnif- The network interface on which to join the grouplistener- listener of the MulticastGroup events.bufferSize- max packet size for this multicast group- Returns:
- created MulticastGroup
-
join
MulticastGroup join(InetSocketAddress group, NetworkInterface nif, MulticastListener listener, int bufferSize)
Creates a feed and send a join request.- Parameters:
group- a multicast address to join with UDP port Numbernif- The network interface on which to join the grouplistener- of the MulticastGroup events.bufferSize- buffer size for UDP packets of the corresponded group- Returns:
- created MulticastGroup to receive multicast group messages
-
join
MulticastGroup join(InetSocketAddress group, NetworkInterface nif, MulticastListener listener)
Short version of join with default buffer size
This method is equivalent to:
Creates a feed and send a join request.join(group, nif, listener, MulticastReceiver.PACKET_MAXSIZE);- Parameters:
group- a multicast address to join with UDP port Numbernif- The network interface on which to join the grouplistener- of the MulticastGroup events.- Returns:
- created MulticastGroup to receive multicast group messages
-
drop
void drop(MulticastGroup feed)
Drops (and closes) attached feed. If feed doesn't belong to this Receiver, it will not be dropped.- Parameters:
feed- feed to drop from receiving multicast
-
step
boolean step()
process one step of receiving. It's: 1. Adds all feeds added by join function 2. Drops/removes feeds from drop list 3. Proceeds all opened connections- Returns:
- false if MulticastReceiver cannot work farther and must be closed, true if everything going well
-
-