public class SignalServiceMessagePipe
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
SignalServiceMessagePipe.MessagePipeCallback
For receiving a callback when a new message has been
received.
|
| Modifier and Type | Method and Description |
|---|---|
SignalServiceEnvelope |
read(long timeout,
java.util.concurrent.TimeUnit unit)
A blocking call that reads a message off the pipe.
|
SignalServiceEnvelope |
read(long timeout,
java.util.concurrent.TimeUnit unit,
SignalServiceMessagePipe.MessagePipeCallback callback)
A blocking call that reads a message off the pipe (see
read(long, java.util.concurrent.TimeUnit)
Unlike read(long, java.util.concurrent.TimeUnit), this method allows you
to specify a callback that will be called before the received message is acknowledged. |
void |
shutdown()
Close this connection to the server.
|
public SignalServiceEnvelope read(long timeout, java.util.concurrent.TimeUnit unit) throws org.whispersystems.libsignal.InvalidVersionException, java.io.IOException, java.util.concurrent.TimeoutException
timeout - The timeout to wait for.unit - The timeout time unit.org.whispersystems.libsignal.InvalidVersionExceptionjava.io.IOExceptionjava.util.concurrent.TimeoutExceptionpublic SignalServiceEnvelope read(long timeout, java.util.concurrent.TimeUnit unit, SignalServiceMessagePipe.MessagePipeCallback callback) throws java.util.concurrent.TimeoutException, java.io.IOException, org.whispersystems.libsignal.InvalidVersionException
read(long, java.util.concurrent.TimeUnit)
Unlike read(long, java.util.concurrent.TimeUnit), this method allows you
to specify a callback that will be called before the received message is acknowledged.
This allows you to write the received message to durable storage before acknowledging
receipt of it to the server.timeout - The timeout to wait for.unit - The timeout time unit.callback - A callback that will be called before the message receipt is
acknowledged to the server.java.util.concurrent.TimeoutExceptionjava.io.IOExceptionorg.whispersystems.libsignal.InvalidVersionExceptionpublic void shutdown()