Class BaseHttpClientResponseXMLMessageDecoder
- java.lang.Object
-
- net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
-
- org.opensaml.messaging.decoder.AbstractMessageDecoder
-
- org.opensaml.messaging.decoder.httpclient.AbstractHttpClientResponseMessageDecoder
-
- org.opensaml.messaging.decoder.httpclient.BaseHttpClientResponseXMLMessageDecoder
-
- All Implemented Interfaces:
net.shibboleth.utilities.java.support.component.Component,net.shibboleth.utilities.java.support.component.DestructableComponent,net.shibboleth.utilities.java.support.component.InitializableComponent,net.shibboleth.utilities.java.support.component.UnmodifiableComponent,HttpClientResponseMessageDecoder,MessageDecoder
public abstract class BaseHttpClientResponseXMLMessageDecoder extends AbstractHttpClientResponseMessageDecoder
Base class for message decoders which decode XML messages from anHttpResponse.
-
-
Field Summary
Fields Modifier and Type Field Description private org.slf4j.LoggerlogClass logger.private net.shibboleth.utilities.java.support.xml.ParserPoolparserPoolParser pool used to deserialize the message.private org.slf4j.LoggerprotocolMessageLogUsed to log protocol messages.
-
Constructor Summary
Constructors Constructor Description BaseHttpClientResponseXMLMessageDecoder()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddecode()Decode message data from the source and store it so that it may be retrieved viaMessageDecoder.getMessageContext().protected voiddoDestroy()protected voiddoInitialize()protected ObjectgetMessageToLog()Get the XMLObject which will be logged as the protocol message.net.shibboleth.utilities.java.support.xml.ParserPoolgetParserPool()Gets the parser pool used to deserialize incoming messages.protected voidlogDecodedMessage()Log the decoded message to the protocol message logger.voidsetParserPool(net.shibboleth.utilities.java.support.xml.ParserPool pool)Sets the parser pool used to deserialize incoming messages.protected org.opensaml.core.xml.XMLObjectunmarshallMessage(InputStream messageStream)Helper method that deserializes and unmarshalls the message from the given stream.-
Methods inherited from class org.opensaml.messaging.decoder.httpclient.AbstractHttpClientResponseMessageDecoder
getHttpResponse, setHttpResponse
-
Methods inherited from class org.opensaml.messaging.decoder.AbstractMessageDecoder
doDecode, getMessageContext, setMessageContext
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, initialize, isDestroyed, isInitialized
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.shibboleth.utilities.java.support.component.DestructableComponent
destroy, isDestroyed
-
Methods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent
initialize, isInitialized
-
Methods inherited from interface org.opensaml.messaging.decoder.MessageDecoder
getMessageContext
-
-
-
-
Method Detail
-
decode
public void decode() throws MessageDecodingExceptionDecode message data from the source and store it so that it may be retrieved viaMessageDecoder.getMessageContext().- Specified by:
decodein interfaceMessageDecoder- Overrides:
decodein classAbstractHttpClientResponseMessageDecoder- Throws:
MessageDecodingException- if there is a problem decoding the message context
-
getParserPool
@Nonnull public net.shibboleth.utilities.java.support.xml.ParserPool getParserPool()
Gets the parser pool used to deserialize incoming messages.- Returns:
- parser pool used to deserialize incoming messages
-
setParserPool
public void setParserPool(@Nonnull net.shibboleth.utilities.java.support.xml.ParserPool pool)Sets the parser pool used to deserialize incoming messages.- Parameters:
pool- parser pool used to deserialize incoming messages
-
doDestroy
protected void doDestroy()
- Overrides:
doDestroyin classAbstractHttpClientResponseMessageDecoder
-
doInitialize
protected void doInitialize() throws net.shibboleth.utilities.java.support.component.ComponentInitializationException- Overrides:
doInitializein classAbstractHttpClientResponseMessageDecoder- Throws:
net.shibboleth.utilities.java.support.component.ComponentInitializationException
-
logDecodedMessage
protected void logDecodedMessage()
Log the decoded message to the protocol message logger.
-
getMessageToLog
protected Object getMessageToLog()
Get the XMLObject which will be logged as the protocol message.- Returns:
- the XMLObject message considered to be the protocol message for logging purposes
-
unmarshallMessage
protected org.opensaml.core.xml.XMLObject unmarshallMessage(InputStream messageStream) throws MessageDecodingException
Helper method that deserializes and unmarshalls the message from the given stream.- Parameters:
messageStream- input stream containing the message- Returns:
- the inbound message
- Throws:
MessageDecodingException- thrown if there is a problem deserializing and unmarshalling the message
-
-