Package jakarta.ws.rs.sse
Interface InboundSseEvent
- All Superinterfaces:
- SseEvent
public interface InboundSseEvent extends SseEvent
Inbound Server-sent event.
 
Used on the client side, when accepting incoming Server-sent events.
- Since:
- 2.1
- Author:
- Marek Potociar
- 
Field Summary
- 
Method SummaryModifier and Type Method Description booleanisEmpty()Check if the event is empty (i.e.StringreadData()Get the original event data asString.<T> TreadData(GenericType<T> type)Read event data as a given generic type.<T> TreadData(GenericType<T> type, MediaType mediaType)Read event data as a given generic type.<T> TreadData(Class<T> type)Read event data as a given Java type.<T> TreadData(Class<T> messageType, MediaType mediaType)Read event data as a given Java type.Methods inherited from interface jakarta.ws.rs.sse.SseEventgetComment, getId, getName, getReconnectDelay, isReconnectDelaySet
- 
Method Details- 
isEmptyboolean isEmpty()Check if the event is empty (i.e. does not contain any data).- Returns:
- trueif current instance does not contain any data,- falseotherwise.
 
- 
readDataString readData()Get the original event data asString.- Returns:
- event data de-serialized into a string.
- Throws:
- ProcessingException- when provided type can't be read. The thrown exception wraps the original cause.
 
- 
readDataRead event data as a given Java type.- Type Parameters:
- T- generic event data type
- Parameters:
- type- Java type to be used for event data de-serialization.
- Returns:
- event data de-serialized as an instance of a given type.
- Throws:
- ProcessingException- when provided type can't be read. The thrown exception wraps the original cause.
 
- 
readDataRead event data as a given generic type.- Type Parameters:
- T- generic event data type
- Parameters:
- type- generic type to be used for event data de-serialization.
- Returns:
- event data de-serialized as an instance of a given type.
- Throws:
- ProcessingException- when provided type can't be read. The thrown exception wraps the original cause.
 
- 
readDataRead event data as a given Java type.- Type Parameters:
- T- generic event data type
- Parameters:
- messageType- Java type to be used for event data de-serialization.
- mediaType-- media typeto be used for event data de-serialization.
- Returns:
- event data de-serialized as an instance of a given type.
- Throws:
- ProcessingException- when provided type can't be read. The thrown exception wraps the original cause.
 
- 
readDataRead event data as a given generic type.- Type Parameters:
- T- generic event data type
- Parameters:
- type- generic type to be used for event data de-serialization.
- mediaType-- media typeto be used for event data de-serialization.
- Returns:
- event data de-serialized as an instance of a given type.
- Throws:
- ProcessingException- when provided type can't be read. The thrown exception wraps the original cause.
 
 
-