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 java.lang.Object

  This class has common configurations for both sender and receiver.

- - ### Field Summary

    Fields
    Modifier and Type | Field and 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 java.util.List<java.lang.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 and 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 and 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()`
    `java.util.List<java.lang.String>` | `getPreserveHttpHeaders()`
    `org.apache.axis2.transport.base.threads.WorkerPool` | `getWorkerPool()`
    `org.apache.axis2.transport.base.threads.WorkerPool` | `getWorkerPool(int workerPoolCoreSize, int workerPoolMaxSize, int workerThreadKeepaliveSec, int workerPoolQueuLen, java.lang.String threadGroupName, java.lang.String threadgroupID)`
    `java.lang.Boolean` | `isCorrelationLoggingEnabled()`
    `boolean` | `isPreserveHttpHeader(java.lang.String headerName)` Check preserving status of the given http header name
    `protected void` | `populatePreserveHttpHeaders(java.lang.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 java.util.List<java.lang.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,
                                                                                  java.lang.String threadGroupName,
                                                                                  java.lang.String threadgroupID)

    - #### getIOBufferSize

          public int getIOBufferSize()

    - #### getWorkerPool

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

    - #### 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 java.lang.Boolean isCorrelationLoggingEnabled()

    - #### isPreserveHttpHeader

          public boolean isPreserveHttpHeader(java.lang.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 java.util.List<java.lang.String> getPreserveHttpHeaders()

    - #### populatePreserveHttpHeaders

          protected void populatePreserveHttpHeaders(java.lang.String preserveHeaders)

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

Copyright © 2005-2021 Apache Software Foundation. All Rights Reserved.