org.apache.synapse.transport.nhttp

## Class NHttpConfiguration

- java.lang.Object
- - org.apache.synapse.transport.nhttp.NHttpConfiguration

-     public final class NHttpConfiguration
      extends java.lang.Object

  Store and manage properties that tune the nhttp transport

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `BLOCK_SERVICE_LIST` Comma separated list of blocked uris
    `static java.lang.String` | `BLOCK_SERVICE_LIST_DEFAULT` Default value for BLOCK_SERVICE_LIST
    `static int` | `DEFAULT_LISTENER_SHUTDOWN_WAIT_TIME`
    `static int` | `MAX_ACTIVE_CON`
    `static java.lang.String` | `MESSAGE_SIZE_VALIDATION`
    `static java.lang.String` | `TRANSPORT_LISTENER_SHUTDOWN_WAIT_TIME`
    `static java.lang.String` | `VALID_MAX_MESSAGE_SIZE`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addPreserveHeader(java.lang.String header)`
    `boolean` | `getBooleanValue(java.lang.String name, boolean def)` Get properties that tune nhttp transport.
    `int` | `getBufferSize()`
    `int` | `getClientCoreThreads()`
    `int` | `getClientIOWorkers()`
    `int` | `getClientKeepalive()`
    `int` | `getClientMaxThreads()`
    `int` | `getClientQueueLen()`
    `int` | `getErrorHandlerCoreThreads()`
    `int` | `getErrorHandlerKeepAlive()`
    `int` | `getErrorHandlerQueuelen()`
    `int` | `getErrorHandlerTMaxThreads()`
    `static NHttpConfiguration` | `getInstance()`
    `int` | `getListenerShutdownWaitTime()`
    `int` | `getMaxActiveConnections()`
    `int` | `getMaxMessageSize()`
    `boolean` | `getMessageSizeValidationEnabled()`
    `java.lang.String` | `getNhttpDefaultServiceName()` Get the default synapse service name
    `int` | `getProperty(java.lang.String name, int def)` Get properties that tune nhttp transport.
    `java.lang.String` | `getRESTDispatchService()`
    `java.lang.String` | `getRestUriApiRegex()`
    `java.lang.String` | `getRestUriProxyRegex()`
    `int` | `getServerCoreThreads()`
    `int` | `getServerIOWorkers()`
    `int` | `getServerKeepalive()`
    `int` | `getServerMaxThreads()`
    `int` | `getServerQueueLen()`
    `java.lang.String` | `getStringValue(java.lang.String name, java.lang.String def)` Get properties that tune nhttp transport.
    `boolean` | `isCountConnections()`
    `boolean` | `isErrorHandlerPoolEnabled()`
    `boolean` | `isHttpMethodDisabled(java.lang.String method)`
    `boolean` | `isKeepAliveDisabled()`
    `boolean` | `isLogRotatable()`
    `boolean` | `isPreserveHttpHeader(java.lang.String httpHeader)` Check preserving status of the http header field
    `boolean` | `isReverseProxyMode()` Check for reverse proxy mode
    `java.lang.String` | `isServiceListBlocked()`
    `void` | `removePreserveHeader(java.lang.String header)`

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

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

- - ### Field Detail

    - #### MAX_ACTIVE_CON

          public static final int MAX_ACTIVE_CON

      See Also:
        Constant Field Values

    - #### TRANSPORT_LISTENER_SHUTDOWN_WAIT_TIME

          public static final java.lang.String TRANSPORT_LISTENER_SHUTDOWN_WAIT_TIME

      See Also:
        Constant Field Values

    - #### DEFAULT_LISTENER_SHUTDOWN_WAIT_TIME

          public static final int DEFAULT_LISTENER_SHUTDOWN_WAIT_TIME

      See Also:
        Constant Field Values

    - #### MESSAGE_SIZE_VALIDATION

          public static final java.lang.String MESSAGE_SIZE_VALIDATION

      See Also:
        Constant Field Values

    - #### VALID_MAX_MESSAGE_SIZE

          public static final java.lang.String VALID_MAX_MESSAGE_SIZE

      See Also:
        Constant Field Values

    - #### BLOCK_SERVICE_LIST

          public static final java.lang.String BLOCK_SERVICE_LIST

      Comma separated list of blocked uris
      See Also:
        Constant Field Values

    - #### BLOCK_SERVICE_LIST_DEFAULT

          public static final java.lang.String BLOCK_SERVICE_LIST_DEFAULT

      Default value for BLOCK_SERVICE_LIST
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getInstance

          public static NHttpConfiguration getInstance()

    - #### getServerCoreThreads

          public int getServerCoreThreads()

    - #### addPreserveHeader

          public void addPreserveHeader(java.lang.String header)

    - #### removePreserveHeader

          public void removePreserveHeader(java.lang.String header)

    - #### getServerMaxThreads

          public int getServerMaxThreads()

    - #### getServerKeepalive

          public int getServerKeepalive()

    - #### getServerQueueLen

          public int getServerQueueLen()

    - #### getServerIOWorkers

          public int getServerIOWorkers()

    - #### getClientCoreThreads

          public int getClientCoreThreads()

    - #### getClientMaxThreads

          public int getClientMaxThreads()

    - #### getClientKeepalive

          public int getClientKeepalive()

    - #### getClientQueueLen

          public int getClientQueueLen()

    - #### getClientIOWorkers

          public int getClientIOWorkers()

    - #### getMaxActiveConnections

          public int getMaxActiveConnections()

    - #### getErrorHandlerCoreThreads

          public int getErrorHandlerCoreThreads()

    - #### getErrorHandlerTMaxThreads

          public int getErrorHandlerTMaxThreads()

    - #### getErrorHandlerKeepAlive

          public int getErrorHandlerKeepAlive()

    - #### getErrorHandlerQueuelen

          public int getErrorHandlerQueuelen()

    - #### isErrorHandlerPoolEnabled

          public boolean isErrorHandlerPoolEnabled()

    - #### getBufferSize

          public int getBufferSize()

    - #### isLogRotatable

          public boolean isLogRotatable()

    - #### isKeepAliveDisabled

          public boolean isKeepAliveDisabled()

    - #### isCountConnections

          public boolean isCountConnections()

    - #### isServiceListBlocked

          public java.lang.String isServiceListBlocked()

    - #### getRESTDispatchService

          public java.lang.String getRESTDispatchService()

    - #### getRestUriApiRegex

          public java.lang.String getRestUriApiRegex()

    - #### getRestUriProxyRegex

          public java.lang.String getRestUriProxyRegex()

    - #### getListenerShutdownWaitTime

          public int getListenerShutdownWaitTime()

    - #### getMessageSizeValidationEnabled

          public boolean getMessageSizeValidationEnabled()

    - #### getMaxMessageSize

          public int getMaxMessageSize()

    - #### isPreserveHttpHeader

          public boolean isPreserveHttpHeader(java.lang.String httpHeader)

      Check preserving status of the http header field
      Parameters:
        `httpHeader` - http header name
      Returns:
        return true if preserve else false

    - #### getProperty

          public int getProperty(java.lang.String name,
                                 int def)

      Get properties that tune nhttp transport. Preference to system properties
      Parameters:
        `name` - name of the system/config property
        `def` - default value to return if the property is not set
      Returns:
        the value of the property to be used

    - #### getBooleanValue

          public boolean getBooleanValue(java.lang.String name,
                                         boolean def)

      Get properties that tune nhttp transport. Preference to system properties
      Parameters:
        `name` - name of the system/config property
        `def` - default value to return if the property is not set
      Returns:
        the value of the property to be used

    - #### getStringValue

          public java.lang.String getStringValue(java.lang.String name,
                                                 java.lang.String def)

      Get properties that tune nhttp transport. Preference to system properties
      Parameters:
        `name` - name of the system/config property
        `def` - default value to return if the property is not set
      Returns:
        the value of the property to be used

    - #### isHttpMethodDisabled

          public boolean isHttpMethodDisabled(java.lang.String method)

    - #### isReverseProxyMode

          public boolean isReverseProxyMode()

      Check for reverse proxy mode
      Returns:
        whether reverse proxy mode is enabled

    - #### getNhttpDefaultServiceName

          public java.lang.String getNhttpDefaultServiceName()

      Get the default synapse service name
      Returns:
        default synapse service name

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