MessageType - the message type of the message context on which to operatepublic abstract class BaseHttpServletRequestXMLMessageDecoder<MessageType extends XMLObject> extends AbstractHttpServletRequestMessageDecoder<MessageType>
HttpServletRequest.| Modifier and Type | Field and Description |
|---|---|
private org.slf4j.Logger |
log
Class logger.
|
private ParserPool |
parserPool
Parser pool used to deserialize the message.
|
private org.slf4j.Logger |
protocolMessageLog
Used to log protocol messages.
|
| Constructor and Description |
|---|
BaseHttpServletRequestXMLMessageDecoder()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
decode()
Decode message data from the source and store it so that it may be retrieved via
MessageDecoder.getMessageContext(). |
protected void |
doDestroy() |
protected void |
doInitialize() |
protected XMLObject |
getMessageToLog()
Get the XMLObject which will be logged as the protocol message.
|
ParserPool |
getParserPool()
Gets the parser pool used to deserialize incoming messages.
|
protected void |
logDecodedMessage()
Log the decoded message to the protocol message logger.
|
void |
setParserPool(ParserPool pool)
Sets the parser pool used to deserialize incoming messages.
|
protected XMLObject |
unmarshallMessage(InputStream messageStream)
Helper method that deserializes and unmarshalls the message from the given stream.
|
protected void |
validateHttpRequest(javax.servlet.http.HttpServletRequest request)
Perform optional validation of the inbound
HttpServletRequest. |
getHttpServletRequest, setHttpServletRequestdoDecode, getMessageContext, setMessageContextdestroy, initialize, isDestroyed, isInitializedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetMessageContextinitialize, isInitializeddestroy, isDestroyedprivate org.slf4j.Logger protocolMessageLog
private final org.slf4j.Logger log
private ParserPool parserPool
public BaseHttpServletRequestXMLMessageDecoder()
public void decode()
throws MessageDecodingException
MessageDecoder.getMessageContext().decode in interface MessageDecoder<MessageType extends XMLObject>decode in class AbstractHttpServletRequestMessageDecoder<MessageType extends XMLObject>MessageDecodingException - if there is a problem decoding the message context@Nonnull public ParserPool getParserPool()
public void setParserPool(@Nonnull ParserPool pool)
pool - parser pool used to deserialize incoming messagesprotected void doDestroy()
doDestroy in class AbstractHttpServletRequestMessageDecoder<MessageType extends XMLObject>protected void doInitialize()
throws ComponentInitializationException
doInitialize in class AbstractHttpServletRequestMessageDecoder<MessageType extends XMLObject>ComponentInitializationExceptionprotected void logDecodedMessage()
protected XMLObject getMessageToLog()
protected XMLObject unmarshallMessage(InputStream messageStream) throws MessageDecodingException
messageStream - input stream containing the messageMessageDecodingException - thrown if there is a problem deserializing and unmarshalling the messageprotected void validateHttpRequest(javax.servlet.http.HttpServletRequest request)
throws MessageDecodingException
HttpServletRequest.
This method is called before the main MessageDecoder.decode() logic}.
The default behavior is a no-op. Subclasses may override with specific constraints.
request - the HTTP request being validateMessageDecodingException - if request is not considered validCopyright © 1999–2019 Shibboleth Consortium. All rights reserved.