-
- All Known Subinterfaces:
MessageBodyContext.ErrorEvent
- Enclosing class:
- MessageBodyContext
public static interface MessageBodyContext.Event
Message body content subscription event contract.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default MessageBodyContext.ErrorEvent
asErrorEvent()
Fluent helper method to cast this event as aMessageBodyContext.ErrorEvent
.Optional<GenericType<?>>
entityType()
Get the type requested for conversion.MessageBodyContext.EventType
eventType()
Get the event type of this event.
-
-
-
Method Detail
-
eventType
MessageBodyContext.EventType eventType()
Get the event type of this event.- Returns:
- EVENT_TYPE
-
entityType
Optional<GenericType<?>> entityType()
Get the type requested for conversion.- Returns:
- never
null
-
asErrorEvent
default MessageBodyContext.ErrorEvent asErrorEvent()
Fluent helper method to cast this event as aMessageBodyContext.ErrorEvent
. This is safe to do wheneventType()
returnsMessageBodyContext.EventType.BEFORE_ONERROR
orMessageBodyContext.EventType.AFTER_ONERROR
- Returns:
- ErrorEvent
- Throws:
IllegalStateException
- if this event is not an instance ofMessageBodyContext.ErrorEvent
-
-