p2ps.imp.pipe
Class OutputPipeImp
java.lang.Object
p2ps.imp.pipe.OutputPipeImp
- All Implemented Interfaces:
- OutputPipe
- public class OutputPipeImp
- extends java.lang.Object
- implements OutputPipe
An implementation of the output pipe interface.
- Version:
- $Revision: 295 $
- Author:
- Ian Wang
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OutputPipeImp
public OutputPipeImp(PipeAdvertisement pipead,
Endpoint socket)
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)
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
- Description copied from interface:
OutputPipe
- 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 endpoint is closed