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
SOAP client that is based on
HttpClientMessagePipeline
, produced at runtime from an instance of
HttpClientMessagePipelineFactory
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
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
FieldsModifier and TypeFieldDescriptionprivate org.slf4j.Logger
Logger.private HttpClientMessagePipelineFactory
Factory for the client message pipeline.private Function<InOutOperationContext,
String> Strategy function used to resolve the pipeline name to execute. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
protected HttpClientMessagePipeline
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
Set the message pipeline factory.void
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 SOAPException Resolve 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 SOAPException 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
.- 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
-