Class BlockingIOMulticastSender
- java.lang.Object
-
- com.sun.enterprise.mgmt.transport.AbstractMulticastMessageSender
-
- com.sun.enterprise.mgmt.transport.BlockingIOMulticastSender
-
- All Implemented Interfaces:
MulticastMessageSender,ShoalMessageSender,Runnable
public class BlockingIOMulticastSender extends AbstractMulticastMessageSender implements Runnable
This class is a defaultMulticastMessageSender's implementation and extendsAbstractMulticastMessageSenderThis usesMulticastSocketwhich is based on Blocking I/O- Author:
- Bongjae Chang
-
-
Field Summary
-
Fields inherited from class com.sun.enterprise.mgmt.transport.AbstractMulticastMessageSender
localPeerID
-
Fields inherited from interface com.sun.enterprise.mgmt.transport.ShoalMessageSender
TCP_TRANSPORT, UDP_TRANSPORT
-
-
Constructor Summary
Constructors Constructor Description BlockingIOMulticastSender(String host, String multicastAddress, int multicastPort, String networkInterfaceName, int multicastPacketSize, PeerID localPeerID, Executor executor, int multicastTimeToLive, NetworkManager networkManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleandoBroadcast(Message message)Broadcasts or Multicasts the givenMessageto all membersvoidrun()voidstart()voidstop()-
Methods inherited from class com.sun.enterprise.mgmt.transport.AbstractMulticastMessageSender
broadcast
-
-
-
-
Constructor Detail
-
BlockingIOMulticastSender
public BlockingIOMulticastSender(String host, String multicastAddress, int multicastPort, String networkInterfaceName, int multicastPacketSize, PeerID localPeerID, Executor executor, int multicastTimeToLive, NetworkManager networkManager) throws IOException
- Throws:
IOException
-
-
Method Detail
-
start
public void start() throws IOException- Specified by:
startin interfaceShoalMessageSender- Overrides:
startin classAbstractMulticastMessageSender- Throws:
IOException
-
stop
public void stop() throws IOException- Specified by:
stopin interfaceShoalMessageSender- Overrides:
stopin classAbstractMulticastMessageSender- Throws:
IOException
-
doBroadcast
protected boolean doBroadcast(Message message) throws IOException
Broadcasts or Multicasts the givenMessageto all members- Specified by:
doBroadcastin classAbstractMulticastMessageSender- Parameters:
message- a message which is sent to all members- Returns:
- true if the message is sent to all members successfully, otherwise false
- Throws:
IOException- if I/O error occurs or given parameters are not valid
-
-