|
Project JXTA | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.jxta.impl.pipe.WirePipe
public class WirePipe
This class implements the JXTA-WIRE pipe.
| Constructor Summary | |
|---|---|
WirePipe(PeerGroup g,
PipeResolver pipeResolver,
WirePipeImpl pipeService,
PipeAdvertisement adv)
Constructor |
|
| Method Summary | |
|---|---|
void |
close()
|
(package private) String |
createMsgId()
Create a unique (mostly) identifier for this message |
protected void |
finalize()
Closes the pipe. |
boolean |
forget(InputPipe wireinputpipe)
This peer is no longer listening on the specified pipe. |
PipeAdvertisement |
getAdvertisement()
|
String |
getName()
|
ID |
getPipeID()
|
String |
getType()
|
Message |
poll(int timeout)
|
void |
processIncomingMessage(Message message,
EndpointAddress srcAddr,
EndpointAddress dstAddr)
|
(package private) void |
processIncomingMessage(Message message,
WireHeader header,
EndpointAddress srcAddr,
EndpointAddress dstAddr)
local version with the wire header already parsed. |
boolean |
register(InputPipe wireinputpipe)
Register that this peer is an InputPipe for the specified Pipe ID. |
(package private) void |
repropagate(Message message,
WireHeader header)
Repropagate a message. |
(package private) void |
sendMessage(Message msg,
Set peers)
Send the message |
Message |
waitForMessage()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WirePipe(PeerGroup g,
PipeResolver pipeResolver,
WirePipeImpl pipeService,
PipeAdvertisement adv)
g - The Group associated with this servicepipeResolver - the associated pipe resolverpipeService - The pipe service associated with this pipeadv - pipe advertisement| Method Detail |
|---|
protected void finalize()
finalize in class Objectpublic boolean register(InputPipe wireinputpipe)
register in interface PipeRegistrarwireinputpipe - the pipe objectpublic boolean forget(InputPipe wireinputpipe)
forget in interface PipeRegistrar
public Message waitForMessage()
throws InterruptedException
waitForMessage in interface InputPipeInterruptedException
public Message poll(int timeout)
throws InterruptedException
poll in interface InputPipeInterruptedExceptionpublic void close()
close in interface InputPipepublic String getType()
getType in interface InputPipepublic ID getPipeID()
getPipeID in interface InputPipepublic String getName()
getName in interface InputPipepublic PipeAdvertisement getAdvertisement()
getAdvertisement in interface InputPipe
public void processIncomingMessage(Message message,
EndpointAddress srcAddr,
EndpointAddress dstAddr)
processIncomingMessage in interface EndpointListener
void processIncomingMessage(Message message,
WireHeader header,
EndpointAddress srcAddr,
EndpointAddress dstAddr)
void repropagate(Message message,
WireHeader header)
void sendMessage(Message msg,
Set peers)
throws IOException
msg - The message to send.peers - The peers to which the message will be sent. If the
set is empty then the message is sent to all connected peers or via
propagation to the rendezvous.
IOExceptionString createMsgId()
|
JXTA J2SE | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||