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 BufferFactorybufferFactoryprotected PassThroughConfigurationconfprotected org.apache.axis2.context.ConfigurationContextconfigurationContextThe Axis2 ConfigurationContextprotected org.apache.http.params.HttpParamshttpParamsDefault http parametersprotected org.apache.http.impl.nio.reactor.IOReactorConfigioReactorConfigprotected org.apache.axis2.description.ParameterIncludeparametersConfigurations given by axis2.xmlprotected List<String>preserveHttpHeadersHttp headers which should be preservedprotected booleanpreserveServerHeaderWeather Server header coming from server should be preservedprotected booleanpreserveUserAgentHeaderWeather 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 voidbuild()protected org.apache.http.params.HttpParamsbuildHttpParams()protected org.apache.http.impl.nio.reactor.IOReactorConfigbuildIOReactorConfig()BufferFactorygetBufferFactory()org.apache.axis2.context.ConfigurationContextgetConfigurationContext()intgetIOBufferSize()PassThroughTransportMetricsCollectorgetMetrics()List<String>getPreserveHttpHeaders()org.apache.axis2.transport.base.threads.WorkerPoolgetSecondaryWorkerPool()org.apache.axis2.transport.base.threads.WorkerPoolgetWorkerPool()org.apache.axis2.transport.base.threads.WorkerPoolgetWorkerPool(int workerPoolCoreSize, int workerPoolMaxSize, int workerThreadKeepaliveSec, int workerPoolQueuLen, String threadGroupName, String threadgroupID)BooleanisCorrelationLoggingEnabled()booleanisPreserveHttpHeader(String headerName)Check preserving status of the given http header nameprotected voidpopulatePreserveHttpHeaders(String preserveHeaders)Populate preserve http headers from comma separate string
-
-
-
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
-
populatePreserveHttpHeaders
protected void populatePreserveHttpHeaders(String preserveHeaders)
Populate preserve http headers from comma separate string- Parameters:
preserveHeaders- Comma separated preserve enable http headers
-
-