Package io.hekate.messaging.intercept
Interface ServerSendContext<T>
-
- Type Parameters:
T
- Message type.
public interface ServerSendContext<T>
Server's outbound message context.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
hasMetaData()
Returnstrue
if this message has meta-data.ServerInboundContext<T>
inboundContext()
Returns the inbound context.MessageMetaData
metaData()
Returns the message's meta-data.void
overrideMessage(T msg)
Overrides the message to be sent with the specified one.T
payload()
Returns the outbound message.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 outbound message.- Returns:
- Outbound message.
-
inboundContext
ServerInboundContext<T> inboundContext()
Returns the inbound context.- Returns:
- Inbound context.
-
overrideMessage
void overrideMessage(T msg)
Overrides the message to be sent with the specified one.- Parameters:
msg
- New message that should be sent instead of the original one.
-
hasMetaData
boolean hasMetaData()
Returnstrue
if this message has meta-data.- Returns:
true
if this message has meta-data.- See Also:
metaData()
-
metaData
MessageMetaData metaData()
Returns the message's meta-data.- Returns:
- Message meta-data.
- See Also:
hasMetaData()
-
-