Package org.opensaml.soap.client.http
Class PipelineFactoryHttpSOAPClient
java.lang.Object
net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
org.opensaml.soap.client.http.AbstractPipelineHttpSOAPClient
org.opensaml.soap.client.http.PipelineFactoryHttpSOAPClient
- All Implemented Interfaces:
Component
,DestructableComponent
,InitializableComponent
,SOAPClient
@ThreadSafe public class PipelineFactoryHttpSOAPClient extends AbstractPipelineHttpSOAPClient
SOAP client that is based on
HttpClientMessagePipeline
, produced at runtime from an instance of
HttpClientMessagePipelineFactory
.-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PipelineFactoryHttpSOAPClient.DefaultPipelineNameStrategy
Default strategy for resolving SOAP client message pipeline name from theSOAPClientContext.getPipelineName()
which is a direct child of the input operation context.Nested classes/interfaces inherited from interface org.opensaml.soap.client.SOAPClient
SOAPClient.SOAPRequestParameters
-
Field Summary
Fields Modifier and Type Field Description private org.slf4j.Logger
log
Logger.private HttpClientMessagePipelineFactory
pipelineFactory
Factory for the client message pipeline.private Function<InOutOperationContext,String>
pipelineNameStrategy
Strategy function used to resolve the pipeline name to execute. -
Constructor Summary
Constructors Constructor Description PipelineFactoryHttpSOAPClient()
-
Method Summary
Modifier and Type Method Description protected void
doDestroy()
protected void
doInitialize()
protected HttpClientMessagePipeline
newPipeline()
Get a new instance of theHttpClientMessagePipeline
to be processed.protected HttpClientMessagePipeline
newPipeline(String name)
Get a new instance of theHttpClientMessagePipeline
to be processed.protected HttpClientMessagePipeline
resolvePipeline(InOutOperationContext operationContext)
Resolve and return a new instance of theHttpClientMessagePipeline
to be processed.protected String
resolvePipelineName(InOutOperationContext operationContext)
Resolve the name of the pipeline to use.void
setPipelineFactory(HttpClientMessagePipelineFactory factory)
Set the message pipeline factory.void
setPipelineNameStrategy(Function<InOutOperationContext,String> function)
Set the strategy function used to resolve the name of the pipeline to use.Methods inherited from class org.opensaml.soap.client.http.AbstractPipelineHttpSOAPClient
buildHttpContext, buildHttpRequest, buildTLSCriteriaSet, getHttpClient, getHttpClientSecurityParameters, getTLSCriteriaSetStrategy, resolveClientContext, resolveContextSecurityParameters, send, setHttpClient, setHttpClientSecurityParameters, setTLSCriteriaSetStrategy
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, initialize, isDestroyed, isInitialized
-
Field Details
-
log
private org.slf4j.Logger logLogger. -
pipelineFactory
Factory for the client message pipeline. -
pipelineNameStrategy
Strategy function used to resolve the pipeline name to execute.
-
-
Constructor Details
-
PipelineFactoryHttpSOAPClient
public PipelineFactoryHttpSOAPClient()
-
-
Method Details
-
setPipelineFactory
Set the message pipeline factory.- Parameters:
factory
- the message pipeline factory
-
setPipelineNameStrategy
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
- Overrides:
doInitialize
in classAbstractPipelineHttpSOAPClient
- Throws:
ComponentInitializationException
-
doDestroy
protected void doDestroy()- Overrides:
doDestroy
in classAbstractPipelineHttpSOAPClient
-
resolvePipeline
@Nonnull protected HttpClientMessagePipeline resolvePipeline(InOutOperationContext operationContext) throws SOAPExceptionResolve and return a new instance of theHttpClientMessagePipeline
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
. SeeresolvePipelineName(InOutOperationContext)
andnewPipeline(String)
.- Overrides:
resolvePipeline
in classAbstractPipelineHttpSOAPClient
- Parameters:
operationContext
- the current operation context- Returns:
- a new pipeline instance
- Throws:
SOAPException
- if there is an error obtaining a new pipeline instance
-
newPipeline
Get a new instance of theHttpClientMessagePipeline
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 classAbstractPipelineHttpSOAPClient
- Returns:
- the new pipeline instance
- Throws:
SOAPException
- if there is an error obtaining a new pipeline instance
-
newPipeline
@Nullable protected HttpClientMessagePipeline newPipeline(@Nullable String name) throws SOAPExceptionGet a new instance of theHttpClientMessagePipeline
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
Resolve the name of the pipeline to use.- Parameters:
operationContext
- the current operation context- Returns:
- the pipeline name, may be null
-