Package io.hekate.messaging.intercept
Interface ClientReceiveContext<T>
-
- Type Parameters:
T
- Message type.
public interface ClientReceiveContext<T>
Client's receive context.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ClientOutboundContext<T>
outboundContext()
Returns the outbound context.void
overrideMessage(T msg)
Overrides the received message with the specified one.T
payload()
Returns the inbound message.Optional<MessageMetaData>
readMetaData()
Reads the message's meta-data.InboundType
type()
Type of this response.
-
-
-
Method Detail
-
type
InboundType type()
Type of this response.- Returns:
- Type of this response.
-
payload
T payload()
Returns the inbound message.- Returns:
- Message.
-
outboundContext
ClientOutboundContext<T> outboundContext()
Returns the outbound context.- Returns:
- Outbound context.
-
overrideMessage
void overrideMessage(T msg)
Overrides the received message with the specified one.- Parameters:
msg
- New message that should replace the received one.
-
readMetaData
Optional<MessageMetaData> readMetaData()
Reads the message's meta-data.- Returns:
- Message's meta-data.
-
-