Name
InputPipe
Synopsis
Input pipes are used to read messages
sent by another peer. The waitForMessage( )
method
is equivalent to calling poll( )
with an infinite
time-out; either one will block until a message is available (or the
time-out has expired). Each call returns only one message object,
even if more are available.
Input pipes are created by passing a
pipe advertisement to the createInputPipe( )
method of the pipe service. Pipe advertisements can be located by the
discovery service or created by the
AdvertisementFactory
class.
public interface InputPipe { // Public Instance Methods public abstract void close(); public abstract net.jxta.endpoint.Message poll(int timeout) throws InterruptedException; public abstract net.jxta.endpoint.Message waitForMessage() throws InterruptedException; }
Returned By
PipeService.createInputPipe()
Get JXTA in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.