public interface MessageContext
Defines the functions that allow message classifiers and transformations to inspect the the context in which an inbound message was delivered.
See MessageContextProvider for notes about using the
message context in message classification and transformation.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
HTTP
The protocol name for HTTP or HTTPS.
|
static java.lang.String |
JMS
The protocol name for JMS messaging.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getBindingName()
Returns the name of the inbound binding.
|
java.lang.String |
getContextPath()
Returns the part of the URL that indicates the context of the request.
|
java.lang.String |
getEndpointName()
Returns the name of the inbound endpoint.
|
java.lang.String |
getHeader(java.lang.String name)
Returns the value of the named protocol header or
message property.
|
java.lang.String |
getHeaderName(int index)
Returns the name of a protocol header or message property
from its index in the result of
getHeaderNames(). |
int |
getHeaderNameCount()
Returns the number of protocol header or message property
names included with the message.
|
java.util.List<java.lang.String> |
getHeaderNames()
Returns the names of the protocol headers or
message properties included with the message.
|
java.util.List<java.lang.String> |
getHeaders(java.lang.String name)
Returns all the values of the named protocol header or
message property.
|
java.lang.String |
getJMSCorrelationID()
Returns the JMS correlation ID, if applicable.
|
java.lang.String |
getJMSMessageID()
Returns the JMS message ID, if applicable.
|
java.lang.String |
getJMSType()
Returns the JMS message type, if applicable.
|
long |
getMessageReceivedTimestamp()
Returns the approximate system time at which
the message was received by inbound connectivity
as a long value.
|
java.lang.String |
getMessageReceivedTimestampISO8601()
Returns the approximate system time at which
the message was received by inbound connectivity
using ISO 8601 with the solution default time zone.
|
java.lang.String |
getMessageReceivedTimestampISO8601(java.lang.String zoneID)
Returns the approximate system time at which
the message was received by inbound connectivity
using ISO 8601 with the specified time zone.
|
long |
getMessageTimestamp()
Returns the timestamp associated with the message
as a long value, if applicable.
|
java.lang.String |
getMessageTimestampISO8601()
Returns the timestamp associated with the message
using ISO 8601 with the solution default time zone.
|
java.lang.String |
getMessageTimestampISO8601(java.lang.String zoneID)
Returns the timestamp associated with the message
using ISO 8601 with the specified time zone.
|
java.lang.String |
getPathInfo()
Returns the part of the URL that follows the servlet path.
|
java.lang.String |
getProtocol()
Returns the name of the protocol by which the message is
received.
|
java.lang.String |
getQueryString()
Returns the part of the URL that contains the query string.
|
java.lang.String |
getRequestURL()
Returns the URL that the client used to send the
message, if applicable.
|
java.lang.String |
getServletPath()
Returns the part of the URL that follows the context path and
indicates the servlet that handled the request.
|
java.lang.String |
getSolutionName()
Returns the name of the solution.
|
java.lang.String |
getSolutionVersion()
Returns the version of the solution.
|
static final java.lang.String HTTP
The protocol name for HTTP or HTTPS.
static final java.lang.String JMS
The protocol name for JMS messaging.
java.lang.String getProtocol()
Returns the name of the protocol by which the message is received.
java.lang.String getSolutionName()
Returns the name of the solution.
java.lang.String getSolutionVersion()
Returns the version of the solution.
java.lang.String getBindingName()
Returns the name of the inbound binding.
java.lang.String getEndpointName()
Returns the name of the inbound endpoint.
long getMessageTimestamp()
Returns the timestamp associated with the message as a long value, if applicable.
Returns 0 if the timestamp cannot be determined or is not provided.
java.lang.String getMessageTimestampISO8601()
Returns the timestamp associated with the message using ISO 8601 with the solution default time zone.
Returns the empty string if the timestamp cannot be determined or is not provided.
java.lang.String getMessageTimestampISO8601(java.lang.String zoneID)
Returns the timestamp associated with the message using ISO 8601 with the specified time zone.
Returns the empty string if the timestamp cannot be determined or is not provided.
zoneId - time zone name (null or empty string for the solution default)long getMessageReceivedTimestamp()
Returns the approximate system time at which the message was received by inbound connectivity as a long value.
java.lang.String getMessageReceivedTimestampISO8601()
Returns the approximate system time at which the message was received by inbound connectivity using ISO 8601 with the solution default time zone.
java.lang.String getMessageReceivedTimestampISO8601(java.lang.String zoneID)
Returns the approximate system time at which the message was received by inbound connectivity using ISO 8601 with the specified time zone.
zoneId - time zone name (null or empty string for the solution default)java.lang.String getJMSType()
Returns the JMS message type, if applicable.
Returns the empty string if the value cannot be determined.
java.lang.String getJMSMessageID()
Returns the JMS message ID, if applicable.
Returns the empty string if the value cannot be determined.
java.lang.String getJMSCorrelationID()
Returns the JMS correlation ID, if applicable.
Returns the empty string if the value cannot be determined.
java.util.List<java.lang.String> getHeaderNames()
Returns the names of the protocol headers or message properties included with the message.
int getHeaderNameCount()
Returns the number of protocol header or message property
names included with the message. This is the size of the
result of getHeaderNames().
java.lang.String getHeaderName(int index)
Returns the name of a protocol header or message property
from its index in the result of getHeaderNames().
index - the index of the name to retrieve;
0 <= index < getHeaderNameCount()java.lang.String getHeader(java.lang.String name)
Returns the value of the named protocol header or message property.
Returns the empty string if the value cannot be determined or is not provided.
name - the name of the header or property.java.util.List<java.lang.String> getHeaders(java.lang.String name)
Returns all the values of the named protocol header or message property.
Returns the empty list if the value cannot be determined or is not provided.
name - the name of the header or property.java.lang.String getRequestURL()
Returns the URL that the client used to send the message, if applicable.
Returns the empty string if the value cannot be determined.
java.lang.String getContextPath()
Returns the part of the URL that indicates the context of the request.
Returns the empty string if the value cannot be determined.
java.lang.String getServletPath()
Returns the part of the URL that follows the context path and indicates the servlet that handled the request.
Returns the empty string if the value cannot be determined.
java.lang.String getPathInfo()
Returns the part of the URL that follows the servlet path.
Returns the empty string if the value cannot be determined.
java.lang.String getQueryString()
Returns the part of the URL that contains the query string.
Returns the empty string if the value cannot be determined.
© Copyright IBM 2017