com.sun.enterprise.mgmt.transport
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 default MulticastMessageSender's implementation and extends AbstractMulticastMessageSender
This uses MulticastSocket which is based on Blocking I/O
- Author:
- Bongjae Chang
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
start
public void start()
throws IOException
-
- Specified by:
start in interface ShoalMessageSender- Overrides:
start in class AbstractMulticastMessageSender
- Throws:
IOException
stop
public void stop()
throws IOException
-
- Specified by:
stop in interface ShoalMessageSender- Overrides:
stop in class AbstractMulticastMessageSender
- Throws:
IOException
run
public void run()
- Specified by:
run in interface Runnable
doBroadcast
protected boolean doBroadcast(Message message)
throws IOException
- Broadcasts or Multicasts the given
Message to all members
- Specified by:
doBroadcast in class AbstractMulticastMessageSender
- 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
Copyright © 2012. All Rights Reserved.