Package org.opensaml.soap.client.http
Class PipelineFactoryHttpSOAPClient
java.lang.Object
net.shibboleth.shared.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 classDefault 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.LoggerLogger.private HttpClientMessagePipelineFactoryFactory 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 voidprotected HttpClientMessagePipelineGet 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.voidSet the message pipeline factory.voidSet 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, setTLSCriteriaSetStrategyMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitialized
-
Field Details
-
log
@Nonnull 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:
doInitializein classAbstractPipelineHttpSOAPClient- Throws:
ComponentInitializationException
-
resolvePipeline
@Nonnull protected HttpClientMessagePipeline resolvePipeline(@Nonnull 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
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
@Nonnull 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
Resolve the name of the pipeline to use.- Parameters:
operationContext- the current operation context- Returns:
- the pipeline name, may be null
-