p2ps.imp.pipe
Class ReplyPipe

java.lang.Object
  extended byp2ps.imp.pipe.ReplyPipe
All Implemented Interfaces:
OutputPipe

public class ReplyPipe
extends java.lang.Object
implements OutputPipe

A pipe that can be used to reply to received messages.

Version:
$Revision: 295 $
Author:
Ian Wang

Constructor Summary
ReplyPipe(Endpoint outpoint)
           
ReplyPipe(InputPipe parent, Endpoint outpoint)
           
ReplyPipe(java.lang.String sendid, InputPipe parent, Endpoint outpoint)
           
 
Method Summary
 void close()
          Closes the pipe
 Endpoint[] getEndpoints()
           
 java.lang.String getPipeID()
           
 java.lang.String getPipeName()
           
 java.net.URI getSendID()
           
 java.net.URI getSendURI()
           
 boolean isClosed()
           
 java.lang.String send(byte[] message)
          Sends a message from the pipe
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReplyPipe

public ReplyPipe(java.lang.String sendid,
                 InputPipe parent,
                 Endpoint outpoint)

ReplyPipe

public ReplyPipe(InputPipe parent,
                 Endpoint outpoint)

ReplyPipe

public ReplyPipe(Endpoint outpoint)
Method Detail

getPipeID

public java.lang.String getPipeID()
Specified by:
getPipeID in interface OutputPipe
Returns:
the id of the pipe

getPipeName

public java.lang.String getPipeName()
Specified by:
getPipeName in interface OutputPipe
Returns:
the name of the pipe

getEndpoints

public Endpoint[] getEndpoints()
Specified by:
getEndpoints in interface OutputPipe
Returns:
the endpoints for the pipe

getSendURI

public java.net.URI getSendURI()
Specified by:
getSendURI in interface OutputPipe
Returns:
the uri sent to by this pipe (null if unknown)

getSendID

public java.net.URI getSendID()
Returns:
the send id for this pipe

send

public java.lang.String send(byte[] message)
                      throws java.io.IOException
Sends a message from the pipe

Specified by:
send in interface OutputPipe
Returns:
the send id for the message (possibly null).
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Closes the pipe

Specified by:
close in interface OutputPipe
Throws:
java.io.IOException

isClosed

public boolean isClosed()
Specified by:
isClosed in interface OutputPipe
Returns:
true if the pipe is closed