public interface PgChannel extends ReadStream<String>
LISTEN/UNLISTEN commands.
When paused the channel discards the messages.| Modifier and Type | Method and Description |
|---|---|
PgChannel |
endHandler(Handler<Void> endHandler)
Set an handler to be called when no more notifications will be received.
|
PgChannel |
exceptionHandler(Handler<Throwable> handler)
Set an exception handler on the read stream.
|
PgChannel |
handler(Handler<String> handler)
Set or unset an handler to be called when a the channel is notified by Postgres.
|
PgChannel |
pause()
Pause the channel, all notifications are discarded.
|
PgChannel |
resume()
Resume the channel.
|
PgChannel |
subscribeHandler(Handler<Void> handler)
Set an handler called when the the channel get subscribed.
|
fetch, pipe, pipeTo, pipeToPgChannel subscribeHandler(Handler<Void> handler)
handler - the handlerPgChannel handler(Handler<String> handler)
LISTEN command if neededUNLISTEN command if neededhandler in interface ReadStream<String>handler - the handlerPgChannel pause()
pause in interface ReadStream<String>PgChannel resume()
resume in interface ReadStream<String>PgChannel endHandler(Handler<Void> endHandler)
endHandler in interface ReadStream<String>endHandler - the handlerPgChannel exceptionHandler(Handler<Throwable> handler)
ReadStreamexceptionHandler in interface ReadStream<String>exceptionHandler in interface StreamBasehandler - the exception handlerCopyright © 2021 Eclipse. All rights reserved.