|
JXTA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jxta.impl.pipe.BlockingWireOutputPipe
public class BlockingWireOutputPipe
This Object is created when a call to PipeService.createOutputPipe(propgateAdv) with a Set containing a single PeerID. This pipe blocks until a valid messeger is created (i.e. resolved and useable). With this object it is possible to detect connection failures during the messenger resolution. Notge, this pipe also avoids utilitizing the rendezvous for propagation, effectively reducing message overhead, resulting in improved performance.
#send is remains asynchronous.
Constructor Summary | |
---|---|
BlockingWireOutputPipe(PeerGroup group,
PipeAdvertisement pAdv,
PeerID peerID)
Create a new blocking output pipe |
|
BlockingWireOutputPipe(PeerGroup group,
PipeAdvertisement pAdv,
PeerID peerID,
RouteAdvertisement route)
Create a new blocking output pipe |
Method Summary | |
---|---|
void |
close()
close the pipe |
PipeAdvertisement |
getAdvertisement()
Gets the pipe advertisement |
String |
getName()
Gets the pipe name |
ID |
getPipeID()
Gets the pipe id |
String |
getType()
Gets the pipe type |
boolean |
isClosed()
Returns true if this pipe is closed and no longer
accepting messages to be sent. |
boolean |
send(Message message)
Send a message through the pipe WARNING: The message object used when sending a pipe message should not be reused or modified after the OutputPipe.send(Message) call is
made. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BlockingWireOutputPipe(PeerGroup group, PipeAdvertisement pAdv, PeerID peerID)
group
- The peergroup context.pAdv
- advertisement for the pipe we are supporting.peerID
- the destination PeerID
.public BlockingWireOutputPipe(PeerGroup group, PipeAdvertisement pAdv, PeerID peerID, RouteAdvertisement route)
group
- The peergroup context.pAdv
- advertisement for the pipe we are supporting.peerID
- the destination PeerID
.route
- the destination route.Method Detail |
---|
public void close()
close
in interface OutputPipe
public boolean isClosed()
true
if this pipe is closed and no longer
accepting messages to be sent. The pipe should be discarded.
isClosed
in interface OutputPipe
true
if this pipe is closed, otherwise
false
.public final String getType()
getType
in interface OutputPipe
public final ID getPipeID()
getPipeID
in interface OutputPipe
public final String getName()
getName
in interface OutputPipe
public final PipeAdvertisement getAdvertisement()
getAdvertisement
in interface OutputPipe
public boolean send(Message message) throws IOException
OutputPipe.send(Message)
call is
made. Concurrent modification of messages will produce unexpected result.
send
in interface OutputPipe
message
- is the PipeMessage to be sent.
true
if the message has been sent otherwise
false
. false
. is commonly returned for
non-error related congestion, meaning that you should be able to send
the message after waiting some amount of time.
IOException
- output pipe error
|
JXSE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |