Class ShellMessageHeaderAccessor
java.lang.Object
org.springframework.messaging.support.MessageHeaderAccessor
org.springframework.shell.component.message.ShellMessageHeaderAccessor
public class ShellMessageHeaderAccessor
extends org.springframework.messaging.support.MessageHeaderAccessor
Adds standard shell Headers.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Raw source message.static final String
static final String
Raw source message.static final String
Fields inherited from class org.springframework.messaging.support.MessageHeaderAccessor
DEFAULT_CHARSET
-
Constructor Summary
ConstructorDescriptionShellMessageHeaderAccessor
(org.springframework.messaging.Message<?> message) -
Method Summary
Modifier and TypeMethodDescriptionGet aEventLoop.Type
header if present.<T> T
reactor.util.context.ContextView
Get aContextView
header if present.getView()
boolean
isReadOnly
(String headerName) void
setReadOnlyHeaders
(String... readOnlyHeaders) Specify a list of headers which should be considered as read only and prohibited from being populated in the message.toMap()
protected void
verifyType
(String headerName, Object headerValue) Methods inherited from class org.springframework.messaging.support.MessageHeaderAccessor
copyHeaders, copyHeadersIfAbsent, createAccessor, getAccessor, getAccessor, getAccessor, getContentType, getDetailedLogMessage, getDetailedPayloadLogMessage, getErrorChannel, getHeader, getId, getMessageHeaders, getMutableAccessor, getReplyChannel, getShortLogMessage, getShortPayloadLogMessage, getTimestamp, isModified, isMutable, isReadableContentType, removeHeader, removeHeaders, setContentType, setErrorChannel, setErrorChannelName, setHeader, setHeaderIfAbsent, setImmutable, setLeaveMutable, setModified, setReplyChannel, setReplyChannelName, toMessageHeaders, toString
-
Field Details
-
PRIORITY
- See Also:
-
VIEW
- See Also:
-
REACTOR_CONTEXT
Raw source message.- See Also:
-
EVENT_TYPE
Raw source message.- See Also:
-
-
Constructor Details
-
ShellMessageHeaderAccessor
public ShellMessageHeaderAccessor(@Nullable org.springframework.messaging.Message<?> message)
-
-
Method Details
-
setReadOnlyHeaders
Specify a list of headers which should be considered as read only and prohibited from being populated in the message.- Parameters:
readOnlyHeaders
- the list of headers forreadOnly
mode. Defaults toMessageHeaders.ID
andMessageHeaders.TIMESTAMP
.- See Also:
-
getPriority
-
getView
-
getReactorContext
@Nullable public reactor.util.context.ContextView getReactorContext()Get aContextView
header if present.- Returns:
- the
ContextView
header if present.
-
getEventType
Get aEventLoop.Type
header if present.- Returns:
- the
EventLoop.Type
header if present.
-
getHeader
-
verifyType
- Overrides:
verifyType
in classorg.springframework.messaging.support.MessageHeaderAccessor
-
isReadOnly
- Overrides:
isReadOnly
in classorg.springframework.messaging.support.MessageHeaderAccessor
-
toMap
- Overrides:
toMap
in classorg.springframework.messaging.support.MessageHeaderAccessor
-