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`

@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 the `SOAPClientContext.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`
`doInitialize()`
`protected HttpClientMessagePipeline`
`newPipeline()`
Get a new instance of the `HttpClientMessagePipeline` to be processed.
`protected HttpClientMessagePipeline`
`newPipeline(String name)`
Get a new instance of the `HttpClientMessagePipeline` to be processed.
`protected HttpClientMessagePipeline`
`resolvePipeline(InOutOperationContext operationContext)`
Resolve and return a new instance of the `HttpClientMessagePipeline` 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.shared.component.AbstractInitializableComponent

`checkComponentActive, checkSetterPreconditions, destroy, doDestroy, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitialized`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### log

@Nonnull private org.slf4j.Logger log
Logger.

### pipelineFactory

@NonnullAfterInit private HttpClientMessagePipelineFactory pipelineFactory
Factory for the client message pipeline.

### pipelineNameStrategy

@NonnullAfterInit private Function<InOutOperationContext,String> pipelineNameStrategy
Strategy function used to resolve the pipeline name to execute.

## Constructor Details

### PipelineFactoryHttpSOAPClient

public PipelineFactoryHttpSOAPClient()

## Method Details

### 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:
  `doInitialize` in class `AbstractPipelineHttpSOAPClient`
Throws:
  `ComponentInitializationException`

### resolvePipeline

@Nonnull protected HttpClientMessagePipeline resolvePipeline(@Nonnull 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 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

@Nonnull protected 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 InOutOperationContext operationContext)
Resolve the name of the pipeline to use.

Parameters:
  `operationContext` - the current operation context
Returns:
  the pipeline name, may be null