Class SseEventOutputImpl
java.lang.Object
jakarta.ws.rs.core.GenericType<OutboundSseEvent>
org.jboss.resteasy.plugins.providers.sse.SseEventOutputImpl
- All Implemented Interfaces:
SseEventSink,AutoCloseable
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.SseEventOutputImpl(MessageBodyWriter<OutboundSseEvent> writer, ResteasyProviderFactory providerFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidclose()Close theSseEventSinkinstance and release all associated resources.protected voidclose(boolean flushBeforeClose) Deprecated.booleanprotected voidinthashCode()booleanisClosed()Check if the stream has been closed already.send(OutboundSseEvent event) Send an outbound Server-sent event to this sink.protected CompletionStage<Void>writeEvent(OutboundSseEvent event) Deprecated.Methods inherited from class jakarta.ws.rs.core.GenericType
forInstance, getRawType, getType, toString
-
Constructor Details
-
SseEventOutputImpl
Deprecated. -
SseEventOutputImpl
public SseEventOutputImpl(MessageBodyWriter<OutboundSseEvent> writer, ResteasyProviderFactory providerFactory)
-
-
Method Details
-
close
public void close()Description copied from interface:SseEventSinkClose theSseEventSinkinstance and release all associated resources.Subsequent calls have no effect and are ignored. Once the
SseEventSinkis closed, invoking any method other than this one andSseEventSink.isClosed()would result in anIllegalStateExceptionbeing thrown.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceSseEventSink
-
close
Deprecated. -
clearContextData
public void clearContextData() -
flushResponseToClient
protected void flushResponseToClient() -
isClosed
public boolean isClosed()Description copied from interface:SseEventSinkCheck if the stream has been closed already.Please note that the client connection represented by this
SseServerSinkcan be closed by the client side when a client decides to close connection and disconnect from the server.- Specified by:
isClosedin interfaceSseEventSink- Returns:
truewhen closed,falseotherwise.
-
send
Description copied from interface:SseEventSinkSend an outbound Server-sent event to this sink.Event will be serialized and sent to the client.
- Specified by:
sendin interfaceSseEventSink- Parameters:
event- event to be written.- Returns:
- completion stage that completes when the event has been sent. If there is a problem during sending of an event, completion stage will be completed exceptionally.
-
writeEvent
Deprecated. -
equals
- Overrides:
equalsin classGenericType<OutboundSseEvent>
-
hashCode
public int hashCode()- Overrides:
hashCodein classGenericType<OutboundSseEvent>
-