public class SseEventOutputImpl extends GenericType<OutboundSseEvent> implements SseEventSink
| Constructor and Description |
|---|
SseEventOutputImpl(MessageBodyWriter<OutboundSseEvent> writer) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the
SseEventSink instance and release all associated resources. |
protected void |
flushResponseToClient() |
boolean |
isClosed()
Check if the stream has been closed already.
|
CompletionStage<?> |
send(OutboundSseEvent event)
Send an outbound Server-sent event to this sink.
|
protected void |
writeEvent(OutboundSseEvent event) |
equals, forInstance, getRawType, getType, hashCode, toStringpublic SseEventOutputImpl(MessageBodyWriter<OutboundSseEvent> writer)
public void close()
SseEventSinkSseEventSink instance and release all associated resources.
Subsequent calls have no effect and are ignored. Once the SseEventSink is closed,
invoking any method other than this one and SseEventSink.isClosed() would result in
an IllegalStateException being thrown.
close in interface AutoCloseableclose in interface SseEventSinkprotected void flushResponseToClient()
public boolean isClosed()
SseEventSink
Please note that the client connection represented by this SseServerSink can be closed by the
client side when a client decides to close connection and disconnect from the server.
isClosed in interface SseEventSinktrue when closed, false otherwise.public CompletionStage<?> send(OutboundSseEvent event)
SseEventSinkEvent will be serialized and sent to the client.
send in interface SseEventSinkevent - event to be written.protected void writeEvent(OutboundSseEvent event) throws IOException
IOExceptionCopyright © 2019 JBoss by Red Hat. All rights reserved.