public class JxtaPipeManagerWrapper extends AbstractMultiMessageSender implements net.jxta.pipe.PipeMsgListener
JxtaPipeManager and extends AbstractMultiMessageSender
which supports both MulticastMessageSender
and MessageSender transport layer
This stores and caches JxtaPipeManager according to Message's type
This implements Jxta's PipeMsgListener, receives Jxta's PipeMsgEvent, parses Jxta's message,
converts it into Message and forwards it to NetworkManagerlocalPeerIDTCP_TRANSPORT, UDP_TRANSPORT| Constructor and Description |
|---|
JxtaPipeManagerWrapper(JxtaNetworkManager networkManager,
PeerID<net.jxta.peer.PeerID> localPeerID) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearPipeCache() |
protected boolean |
doBroadcast(Message message)
Broadcasts or Multicasts the given
Message to all members |
protected boolean |
doSend(PeerID peerID,
Message message)
Sends the given
Message to the destination |
void |
pipeMsgEvent(net.jxta.pipe.PipeMsgEvent event) |
void |
removePipeFromCache(net.jxta.peer.PeerID peerid)
in the event of a failure or planned shutdown, remove the
pipe from the pipeCache
|
void |
start() |
void |
stop() |
broadcast, sendpublic JxtaPipeManagerWrapper(JxtaNetworkManager networkManager, PeerID<net.jxta.peer.PeerID> localPeerID)
public void start()
throws IOException
start in interface ShoalMessageSenderstart in class AbstractMultiMessageSenderIOExceptionpublic void stop()
throws IOException
stop in interface ShoalMessageSenderstop in class AbstractMultiMessageSenderIOExceptionprotected boolean doBroadcast(Message message) throws IOException
Message to all membersdoBroadcast in class AbstractMultiMessageSendermessage - a message which is sent to all membersIOException - if I/O error occurs or given parameters are not validprotected boolean doSend(PeerID peerID, Message message) throws IOException
Message to the destinationdoSend in class AbstractMultiMessageSenderpeerID - the destination PeerID. null is not allowedmessage - a message which is sent to the peerIOException - if I/O error occurs or given parameters are not validpublic void pipeMsgEvent(net.jxta.pipe.PipeMsgEvent event)
pipeMsgEvent in interface net.jxta.pipe.PipeMsgListenerpublic void removePipeFromCache(net.jxta.peer.PeerID peerid)
peerid - peerIDpublic void clearPipeCache()
Copyright © 2017–2020 Eclipse Foundation. All rights reserved.