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 onHttpClientMessagePipeline, produced at runtime from an instance ofHttpClientMessagePipelineFactory.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPipelineFactoryHttpSOAPClient.DefaultPipelineNameStrategyDefault 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.LoggerlogLogger.private HttpClientMessagePipelineFactorypipelineFactoryFactory for the client message pipeline.private Function<InOutOperationContext,String>pipelineNameStrategyStrategy function used to resolve the pipeline name to execute.
-
Constructor Summary
Constructors Constructor Description PipelineFactoryHttpSOAPClient()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoDestroy()protected voiddoInitialize()protected HttpClientMessagePipelinenewPipeline()Get a new instance of theHttpClientMessagePipelineto be processed.protected HttpClientMessagePipelinenewPipeline(String name)Get a new instance of theHttpClientMessagePipelineto be processed.protected HttpClientMessagePipelineresolvePipeline(InOutOperationContext operationContext)Resolve and return a new instance of theHttpClientMessagePipelineto be processed.protected StringresolvePipelineName(InOutOperationContext operationContext)Resolve the name of the pipeline to use.voidsetPipelineFactory(HttpClientMessagePipelineFactory factory)Set the message pipeline factory.voidsetPipelineNameStrategy(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 Detail
-
log
private org.slf4j.Logger log
Logger.
-
pipelineFactory
private HttpClientMessagePipelineFactory pipelineFactory
Factory for the client message pipeline.
-
pipelineNameStrategy
private Function<InOutOperationContext,String> pipelineNameStrategy
Strategy function used to resolve the pipeline name to execute.
-
-
Method Detail
-
setPipelineFactory
public void setPipelineFactory(@Nonnull HttpClientMessagePipelineFactory factory)Set the message pipeline factory.- Parameters:
factory- the message pipeline factory
-
setPipelineNameStrategy
public void setPipelineNameStrategy(@Nullable Function<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 ComponentInitializationException- Overrides:
doInitializein classAbstractPipelineHttpSOAPClient- Throws:
ComponentInitializationException
-
doDestroy
protected void doDestroy()
- Overrides:
doDestroyin classAbstractPipelineHttpSOAPClient
-
resolvePipeline
@Nonnull protected HttpClientMessagePipeline resolvePipeline(InOutOperationContext operationContext) throws SOAPException
Resolve and return a new instance of theHttpClientMessagePipelineto 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:
resolvePipelinein 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
@Nonnull protected HttpClientMessagePipeline newPipeline() throws SOAPException
Get a new instance of theHttpClientMessagePipelineto 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:
newPipelinein 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 SOAPException
Get a new instance of theHttpClientMessagePipelineto 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 InOutOperationContext operationContext)
Resolve the name of the pipeline to use.- Parameters:
operationContext- the current operation context- Returns:
- the pipeline name, may be null
-
-