Package org.apache.synapse.transport.passthru.config

## Class BaseConfiguration

- java.lang.Object
- - org.apache.synapse.transport.passthru.config.BaseConfiguration

- Direct Known Subclasses:
    `SourceConfiguration`, `TargetConfiguration`

      public abstract class BaseConfiguration
      extends Object

  This class has common configurations for both sender and receiver.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected BufferFactory` | `bufferFactory` |
    `protected PassThroughConfiguration` | `conf` |
    `protected org.apache.axis2.context.ConfigurationContext` | `configurationContext` | The Axis2 ConfigurationContext
    `protected org.apache.http.params.HttpParams` | `httpParams` | Default http parameters
    `protected org.apache.http.impl.nio.reactor.IOReactorConfig` | `ioReactorConfig` |
    `protected org.apache.axis2.description.ParameterInclude` | `parameters` | Configurations given by axis2.xml
    `protected List<String>` | `preserveHttpHeaders` | Http headers which should be preserved
    `protected boolean` | `preserveServerHeader` | Weather Server header coming from server should be preserved
    `protected boolean` | `preserveUserAgentHeader` | Weather User-Agent header coming from client should be preserved

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `BaseConfiguration​(org.apache.axis2.context.ConfigurationContext configurationContext, org.apache.axis2.description.ParameterInclude parameters, org.apache.axis2.transport.base.threads.WorkerPool workerPool, PassThroughTransportMetricsCollector metrics)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `build()` |
    `protected org.apache.http.params.HttpParams` | `buildHttpParams()` |
    `protected org.apache.http.impl.nio.reactor.IOReactorConfig` | `buildIOReactorConfig()` |
    `BufferFactory` | `getBufferFactory()` |
    `org.apache.axis2.context.ConfigurationContext` | `getConfigurationContext()` |
    `int` | `getIOBufferSize()` |
    `PassThroughTransportMetricsCollector` | `getMetrics()` |
    `List<String>` | `getPreserveHttpHeaders()` |
    `org.apache.axis2.transport.base.threads.WorkerPool` | `getSecondaryWorkerPool()` |
    `org.apache.axis2.transport.base.threads.WorkerPool` | `getWorkerPool()` |
    `org.apache.axis2.transport.base.threads.WorkerPool` | `getWorkerPool​(int workerPoolCoreSize, int workerPoolMaxSize, int workerThreadKeepaliveSec, int workerPoolQueuLen, String threadGroupName, String threadgroupID)` |
    `Boolean` | `isCorrelationLoggingEnabled()` |
    `boolean` | `isPreserveHttpHeader​(String headerName)` | Check preserving status of the given http header name
    `protected void` | `populatePreserveHttpHeaders​(String preserveHeaders)` | Populate preserve http headers from comma separate string

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

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

- - ### Field Detail

    - #### parameters

          protected org.apache.axis2.description.ParameterInclude parameters

      Configurations given by axis2.xml

    - #### configurationContext

          protected org.apache.axis2.context.ConfigurationContext configurationContext

      The Axis2 ConfigurationContext

    - #### httpParams

          protected org.apache.http.params.HttpParams httpParams

      Default http parameters

    - #### ioReactorConfig

          protected org.apache.http.impl.nio.reactor.IOReactorConfig ioReactorConfig

    - #### bufferFactory

          protected BufferFactory bufferFactory

    - #### preserveUserAgentHeader

          protected boolean preserveUserAgentHeader

      Weather User-Agent header coming from client should be preserved

    - #### preserveServerHeader

          protected boolean preserveServerHeader

      Weather Server header coming from server should be preserved

    - #### preserveHttpHeaders

          protected List<String> preserveHttpHeaders

      Http headers which should be preserved

    - #### conf

          protected PassThroughConfiguration conf

  - ### Constructor Detail

    - #### BaseConfiguration

          public BaseConfiguration​(org.apache.axis2.context.ConfigurationContext configurationContext,
                                   org.apache.axis2.description.ParameterInclude parameters,
                                   org.apache.axis2.transport.base.threads.WorkerPool workerPool,
                                   PassThroughTransportMetricsCollector metrics)

  - ### Method Detail

    - #### build

          public void build()
                     throws org.apache.axis2.AxisFault

      Throws:
        `org.apache.axis2.AxisFault`

    - #### getWorkerPool

          public org.apache.axis2.transport.base.threads.WorkerPool getWorkerPool​(int workerPoolCoreSize,
                                                                                  int workerPoolMaxSize,
                                                                                  int workerThreadKeepaliveSec,
                                                                                  int workerPoolQueuLen,
                                                                                  String threadGroupName,
                                                                                  String threadgroupID)

    - #### getIOBufferSize

          public int getIOBufferSize()

    - #### getWorkerPool

          public org.apache.axis2.transport.base.threads.WorkerPool getWorkerPool()

    - #### getSecondaryWorkerPool

          public org.apache.axis2.transport.base.threads.WorkerPool getSecondaryWorkerPool()

    - #### getConfigurationContext

          public org.apache.axis2.context.ConfigurationContext getConfigurationContext()

    - #### buildHttpParams

          protected org.apache.http.params.HttpParams buildHttpParams()

    - #### buildIOReactorConfig

          protected org.apache.http.impl.nio.reactor.IOReactorConfig buildIOReactorConfig()

    - #### getBufferFactory

          public BufferFactory getBufferFactory()

    - #### getMetrics

          public PassThroughTransportMetricsCollector getMetrics()

    - #### isCorrelationLoggingEnabled

          public Boolean isCorrelationLoggingEnabled()

    - #### isPreserveHttpHeader

          public boolean isPreserveHttpHeader​(String headerName)

      Check preserving status of the given http header name
      Parameters:
        `headerName` - http header name which need to check preserving status
      Returns:
        preserving status of the given http header

    - #### getPreserveHttpHeaders

          public List<String> getPreserveHttpHeaders()

    - #### populatePreserveHttpHeaders

          protected void populatePreserveHttpHeaders​(String preserveHeaders)

      Populate preserve http headers from comma separate string
      Parameters:
        `preserveHeaders` - Comma separated preserve enable http headers