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()
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access