Class 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 an HttpResponse.
    • Field Detail

      • protocolMessageLog

        private org.slf4j.Logger protocolMessageLog
        Used to log protocol messages.
      • log

        private final org.slf4j.Logger log
        Class logger.
      • parserPool

        private net.shibboleth.utilities.java.support.xml.ParserPool parserPool
        Parser pool used to deserialize the message.
    • Constructor Detail

      • BaseHttpClientResponseXMLMessageDecoder

        public BaseHttpClientResponseXMLMessageDecoder()
        Constructor.
    • Method Detail

      • 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
      • doInitialize

        protected void doInitialize()
                             throws net.shibboleth.utilities.java.support.component.ComponentInitializationException
        Overrides:
        doInitialize in class AbstractHttpClientResponseMessageDecoder
        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