Class PipelineFactoryHttpSOAPClient

  • All Implemented Interfaces:
    net.shibboleth.utilities.java.support.component.Component, net.shibboleth.utilities.java.support.component.DestructableComponent, net.shibboleth.utilities.java.support.component.InitializableComponent, SOAPClient

    @ThreadSafe
    public class PipelineFactoryHttpSOAPClient
    extends AbstractPipelineHttpSOAPClient
    SOAP client that is based on HttpClientMessagePipeline, produced at runtime from an instance of HttpClientMessagePipelineFactory.
    • Field Detail

      • log

        private Logger log
        Logger.
      • pipelineFactory

        private org.opensaml.messaging.pipeline.httpclient.HttpClientMessagePipelineFactory pipelineFactory
        Factory for the client message pipeline.
      • pipelineNameStrategy

        private Function<org.opensaml.messaging.context.InOutOperationContext,​String> pipelineNameStrategy
        Strategy function used to resolve the pipeline name to execute.
    • Constructor Detail

      • PipelineFactoryHttpSOAPClient

        public PipelineFactoryHttpSOAPClient()
    • Method Detail

      • setPipelineFactory

        public void setPipelineFactory​(@Nonnull
                                       org.opensaml.messaging.pipeline.httpclient.HttpClientMessagePipelineFactory factory)
        Set the message pipeline factory.
        Parameters:
        factory - the message pipeline factory
      • setPipelineNameStrategy

        public void setPipelineNameStrategy​(@Nullable
                                            Function<org.opensaml.messaging.context.InOutOperationContext,​String> function)
        Set the strategy function used to resolve the name of the pipeline to use. Null may be specified.
        Parameters:
        function - the strategy function, or null
      • doInitialize

        protected void doInitialize()
                             throws net.shibboleth.utilities.java.support.component.ComponentInitializationException
        Overrides:
        doInitialize in class AbstractPipelineHttpSOAPClient
        Throws:
        net.shibboleth.utilities.java.support.component.ComponentInitializationException
      • resolvePipeline

        @Nonnull
        protected org.opensaml.messaging.pipeline.httpclient.HttpClientMessagePipeline resolvePipeline​(org.opensaml.messaging.context.InOutOperationContext operationContext)
                                                                                                throws SOAPException
        Resolve and return a new instance of the HttpClientMessagePipeline to be processed.

        Each call to this (factory) method MUST produce a new instance of the pipeline.

        The behavior of this subclass specialization is to use a factory strategy using a configured instance of HttpClientMessagePipeline. See resolvePipelineName(InOutOperationContext) and newPipeline(String).

        Overrides:
        resolvePipeline in class AbstractPipelineHttpSOAPClient
        Parameters:
        operationContext - the current operation context
        Returns:
        a new pipeline instance
        Throws:
        SOAPException - if there is an error obtaining a new pipeline instance
      • newPipeline

        @Nonnull
        protected org.opensaml.messaging.pipeline.httpclient.HttpClientMessagePipeline newPipeline()
                                                                                            throws SOAPException
        Get a new instance of the HttpClientMessagePipeline to be processed.

        Each call to this (factory) method MUST produce a new instance of the pipeline.

        The behavior of this subclass specialization is to use a factory strategy using a configured instance of HttpClientMessagePipeline.

        Specified by:
        newPipeline in class AbstractPipelineHttpSOAPClient
        Returns:
        the new pipeline instance
        Throws:
        SOAPException - if there is an error obtaining a new pipeline instance
      • newPipeline

        @Nullable
        protected org.opensaml.messaging.pipeline.httpclient.HttpClientMessagePipeline newPipeline​(@Nullable
                                                                                                   String name)
                                                                                            throws SOAPException
        Get a new instance of the HttpClientMessagePipeline to be processed.

        Each call to this (factory) method MUST produce a new instance of the pipeline.

        The behavior of this subclass specialization is to use a factory strategy using a configured instance of HttpClientMessagePipeline.

        Parameters:
        name - the name of pipeline to return
        Returns:
        the new pipeline instance
        Throws:
        SOAPException - if there is an error obtaining a new pipeline instance
      • resolvePipelineName

        @Nullable
        protected String resolvePipelineName​(@Nonnull
                                             org.opensaml.messaging.context.InOutOperationContext operationContext)
        Resolve the name of the pipeline to use.
        Parameters:
        operationContext - the current operation context
        Returns:
        the pipeline name, may be null