|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.enterprise.mgmt.transport.AbstractMultiMessageSender
public abstract class AbstractMultiMessageSender
This class implements both a common MulticastMessageSender and MessageSender logic simply
in order to help the specific transport layer to be implemented easily
Mainly, this stores both source's PeerID and target's PeerID
before sending the message to the peer or broadcasting the message to all members
| Field Summary | |
|---|---|
protected PeerID |
localPeerID
Represents local PeerID. |
| Fields inherited from interface com.sun.enterprise.mgmt.transport.ShoalMessageSender |
|---|
TCP_TRANSPORT, UDP_TRANSPORT |
| Constructor Summary | |
|---|---|
AbstractMultiMessageSender()
|
|
| Method Summary | |
|---|---|
boolean |
broadcast(Message message)
Broadcasts or Multicasts the given Message to all members |
protected abstract boolean |
doBroadcast(Message message)
Broadcasts or Multicasts the given Message to all members |
protected abstract boolean |
doSend(PeerID peerID,
Message message)
Sends the given Message to the destination |
boolean |
send(PeerID peerID,
Message message)
Sends the given Message to the destination |
void |
start()
|
void |
stop()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected PeerID localPeerID
PeerID.
This value should be assigned in real MessageSender's implementation correspoinding to the specific transport layer
| Constructor Detail |
|---|
public AbstractMultiMessageSender()
| Method Detail |
|---|
public boolean broadcast(Message message)
throws IOException
Message to all members
broadcast in interface MulticastMessageSendermessage - a message which is sent to all members
IOException - if I/O error occurs or given parameters are not valid
public boolean send(PeerID peerID,
Message message)
throws IOException
Message to the destination
send in interface MessageSenderpeerID - the destination PeerID. null is not allowedmessage - a message which is sent to the peer
IOException - if I/O error occurs or given parameters are not valid
public void start()
throws IOException
start in interface ShoalMessageSenderIOException
public void stop()
throws IOException
stop in interface ShoalMessageSenderIOException
protected abstract boolean doBroadcast(Message message)
throws IOException
Message to all members
message - a message which is sent to all members
IOException - if I/O error occurs or given parameters are not valid
protected abstract boolean doSend(PeerID peerID,
Message message)
throws IOException
Message to the destination
peerID - the destination PeerID. null is not allowedmessage - a message which is sent to the peer
IOException - if I/O error occurs or given parameters are not valid
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||