net.jxta.impl.pipe
Class SecureOutputPipe
java.lang.Object
net.jxta.impl.pipe.NonBlockingOutputPipe
net.jxta.impl.pipe.SecureOutputPipe
- All Implemented Interfaces:
- Runnable, EventListener, PipeResolver.Listener, OutputPipe
class SecureOutputPipe
- extends NonBlockingOutputPipe
This class implements the Secure non blocking Output Pipe
Method Summary |
protected EndpointAddress |
mkAddress(ID destPeer,
ID pipeID)
Convenience method for constructing a peer endpoint address from its
peer id |
boolean |
send(Message msg)
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. |
SecureOutputPipe
public SecureOutputPipe(PeerGroup group,
PipeResolver resolver,
PipeAdvertisement pipeAdv,
ID destPeer,
Set<? extends ID> peers)
throws IOException
- Throws:
IOException
send
public boolean send(Message msg)
throws IOException
- 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. Concurrent modification of messages will produce unexpected result.
We can't fail to send a message. Secure pipes are expected to be
reliable and ordered.
- Specified by:
send
in interface OutputPipe
- Overrides:
send
in class NonBlockingOutputPipe
- Parameters:
msg
- is the PipeMessage to be sent.
- Returns:
- boolean
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.
- Throws:
IOException
- output pipe error
mkAddress
protected EndpointAddress mkAddress(ID destPeer,
ID pipeID)
- Convenience method for constructing a peer endpoint address from its
peer id
- Overrides:
mkAddress
in class NonBlockingOutputPipe
- Parameters:
destPeer
- the desitnation peerpipeID
- the pipe to put in the param field.
- Returns:
- the pipe endpoint address.