|
Project JXTA | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This class defines the API to the JXTA Pipe Service.
Pipes are the core mechanism for exchanging messages between two JXTA applications or services.
Pipes are uniquely identified by a PipeAdvertisement which is associated with each pipe. Creating the advertisement of a Pipe must be done only once in the lifetime of a Pipe. In fact, a PipeAdvertisement represents the pipe on the JXTA network.
Several types of Pipe can be used:
PipeAdvertisement,
InputPipe,
OutputPipe,
Message| Field Summary | |
static java.lang.String |
PropagateType
Propagated, unsecure and unreliable type of Pipe |
static java.lang.String |
UnicastSecureType
Unicast and secure type of Pipe |
static java.lang.String |
UnicastType
Unicast, unreliable and unsecure type of Pipe |
| Method Summary | |
InputPipe |
createInputPipe(PipeAdvertisement adv)
create an InputPipe from a pipe Advertisement |
InputPipe |
createInputPipe(PipeAdvertisement adv,
PipeMsgListener listener)
create an InputPipe from a pipe Advertisement |
Message |
createMessage()
Creates a new Message |
OutputPipe |
createOutputPipe(PipeAdvertisement adv,
java.util.Enumeration peers,
long timeout)
create an OutputPipe from the pipe Advertisement giving a PeerId(s) where the corresponding InputPipe is supposed to be. |
OutputPipe |
createOutputPipe(PipeAdvertisement adv,
long timeout)
create an OutputPipe from the pipe Advertisement |
void |
createOutputPipe(PipeAdvertisement adv,
OutputPipeListener listener)
registers a listener for a NetPipe. |
OutputPipeListener |
removeOutputPipeListener(java.lang.String pipeID,
OutputPipeListener listener)
remove a Output pipe listener |
| Methods inherited from interface net.jxta.service.Service |
getImplAdvertisement, getInterface |
| Methods inherited from interface net.jxta.platform.Module |
init, startApp, stopApp |
| Field Detail |
public static final java.lang.String UnicastType
public static final java.lang.String PropagateType
public static final java.lang.String UnicastSecureType
| Method Detail |
public InputPipe createInputPipe(PipeAdvertisement adv)
throws java.io.IOException
adv - is the advertisement of the PipeService.java.io.IOException - error creating input pipe
public InputPipe createInputPipe(PipeAdvertisement adv,
PipeMsgListener listener)
throws java.io.IOException
adv - is the advertisement of the PipeService.listener - PipeMsgListener to receive msgs.java.io.IOException - error creating input pipe
public OutputPipe createOutputPipe(PipeAdvertisement adv,
long timeout)
throws java.io.IOException
adv - is the advertisement of the PipeService.timeout - time createOutputPipe will block: -1 means indefinitely,
otherwise, timeout in millisecondjava.io.IOException - error creating output pipe
public void createOutputPipe(PipeAdvertisement adv,
OutputPipeListener listener)
throws java.io.IOException
adv - is the advertisement of the PipeService.type - is an int and contains the name of the diffusion mode for
this OutputPipe (NonBlocking, HandChecking, Propagate).OutPutPipeListener - listener to be called back when a pipe is resolvedjava.io.IOException - error creating a listener for the type of output pipe
public OutputPipe createOutputPipe(PipeAdvertisement adv,
java.util.Enumeration peers,
long timeout)
throws java.io.IOException
adv - is the advertisement of the NetPipe.peers - is an enumeration of the PeerId of the peers where to look for the
corresponding Pipestimeout - time createOutputPipe will block: -1 means
indefinitely, otherwise, timeout in millisecondjava.io.IOException - if none of the peers in the enumeration has
the corresponding OutputPipepublic Message createMessage()
public OutputPipeListener removeOutputPipeListener(java.lang.String pipeID,
OutputPipeListener listener)
OutputPipeListener - listener to remove
|
Project JXTA | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||