Class SseEventOutputImpl
- java.lang.Object
-
- jakarta.ws.rs.core.GenericType<OutboundSseEvent>
-
- org.jboss.resteasy.plugins.providers.sse.SseEventOutputImpl
-
- All Implemented Interfaces:
SseEventSink,AutoCloseable
public class SseEventOutputImpl extends GenericType<OutboundSseEvent> implements SseEventSink
-
-
Constructor Summary
Constructors Constructor Description SseEventOutputImpl(MessageBodyWriter<OutboundSseEvent> writer)Deprecated.SseEventOutputImpl(MessageBodyWriter<OutboundSseEvent> writer, ResteasyProviderFactory providerFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclearContextData()voidclose()Close theSseEventSinkinstance and release all associated resources.protected voidclose(boolean flushBeforeClose)Deprecated.booleanequals(Object o)protected voidflushResponseToClient()inthashCode()booleanisClosed()Check if the stream has been closed already.CompletionStage<?>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 Detail
-
SseEventOutputImpl
@Deprecated public SseEventOutputImpl(MessageBodyWriter<OutboundSseEvent> writer)
Deprecated.
-
SseEventOutputImpl
public SseEventOutputImpl(MessageBodyWriter<OutboundSseEvent> writer, ResteasyProviderFactory providerFactory)
-
-
Method Detail
-
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 protected void close(boolean flushBeforeClose)
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
public CompletionStage<?> send(OutboundSseEvent event)
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 protected CompletionStage<Void> writeEvent(OutboundSseEvent event)
Deprecated.
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classGenericType<OutboundSseEvent>
-
hashCode
public int hashCode()
- Overrides:
hashCodein classGenericType<OutboundSseEvent>
-
-