Class DefaultOutboundServicesConfiguration

java.lang.Object
de.hybris.platform.integrationservices.config.BaseIntegrationServicesConfiguration
de.hybris.platform.outboundservices.config.DefaultOutboundServicesConfiguration
All Implemented Interfaces:
MonitoringConfiguration, OutboundServicesConfiguration

public class DefaultOutboundServicesConfiguration extends BaseIntegrationServicesConfiguration implements OutboundServicesConfiguration
Provides access methods to configurations related to the Outbound Services
  • Constructor Details

    • DefaultOutboundServicesConfiguration

      public DefaultOutboundServicesConfiguration()
  • Method Details

    • isPayloadRetentionForSuccessEnabled

      public boolean isPayloadRetentionForSuccessEnabled()
      Description copied from interface: MonitoringConfiguration
      Determines current setting of payload retention for successful requests.
      Specified by:
      isPayloadRetentionForSuccessEnabled in interface MonitoringConfiguration
      Returns:
      true or false depending if the property is enabled or not.
    • isPayloadRetentionForErrorEnabled

      public boolean isPayloadRetentionForErrorEnabled()
      Description copied from interface: MonitoringConfiguration
      Determines current setting of payload retention for non successful requests.
      Specified by:
      isPayloadRetentionForErrorEnabled in interface MonitoringConfiguration
      Returns:
      true or false depending if the property is enabled or not.
    • isMonitoringEnabled

      public boolean isMonitoringEnabled()
      Description copied from interface: MonitoringConfiguration
      Determines if monitoring is enabled
      Specified by:
      isMonitoringEnabled in interface MonitoringConfiguration
      Returns:
      true if monitoring is enabled, false otherwise
    • getMaximumResponsePayloadSize

      public int getMaximumResponsePayloadSize()
      Description copied from interface: OutboundServicesConfiguration
      Retrieves the maximum response payload size
      Specified by:
      getMaximumResponsePayloadSize in interface OutboundServicesConfiguration
      Returns:
      the maximum payload size
    • setMaximumResponsePayloadSize

      public void setMaximumResponsePayloadSize(int maxPayloadSize)
      Sets the value of the maximum payload size accepted in outbound responses.
      Parameters:
      maxPayloadSize - Number of bytes allowed in the response payload
    • getRequestExecutionTimeout

      public long getRequestExecutionTimeout()
      Description copied from interface: OutboundServicesConfiguration
      Gets the outbound request timeout in milliseconds
      Specified by:
      getRequestExecutionTimeout in interface OutboundServicesConfiguration
      Returns:
      timeout value
    • setRequestExecutionTimeout

      public void setRequestExecutionTimeout(long timeout)
      Sets the outbound request timeout in milliseconds
      Parameters:
      timeout - The number of milliseconds the outbound request can execute before timing out
    • getMaxConnectionPoolSize

      public int getMaxConnectionPoolSize()
      Description copied from interface: OutboundServicesConfiguration
      Retrieves maximum number of connections in a connection pool for outbound communications.
      Specified by:
      getMaxConnectionPoolSize in interface OutboundServicesConfiguration
      Returns:
      configured value for the max connection pool size or 5, if the max connection pool size is not configured or the value cannot be parsed.
    • setMaxConnectionPoolSize

      public void setMaxConnectionPoolSize(int value)
      Changes configuration for the maximum connection pool size. Changing this value does not guarantee being applied to the already existing connections pools. However, it should affect new pools created by services using this configuration.
      Parameters:
      value - new maximum number of connections in the pool.
    • getConnectionKeepAlive

      public Duration getConnectionKeepAlive()
      Description copied from interface: OutboundServicesConfiguration
      Retrieves duration for keeping outbound connection alive. Read Connection Keep-Alive for more information.
      Specified by:
      getConnectionKeepAlive in interface OutboundServicesConfiguration
      Returns:
      configured value for keeping the connections alive or duration of half second, if the duration is not configured or cannot be parsed.
    • setConnectionKeepAlive

      public void setConnectionKeepAlive(Duration d)
      Configures period of time to keep outbound connections alive.
      Parameters:
      d - duration to keep the connections alive. null value resets the configuration to default.
      See Also:
    • setConnectionKeepAlive

      public void setConnectionKeepAlive(long millisec)
      Configures period of time to keep outbound connections alive.
      Parameters:
      millisec - number of milliseconds to keep the connections alive. A negative value resets the configuration to default.
      See Also:
    • getConnectionTimeout

      public Duration getConnectionTimeout()
      Description copied from interface: OutboundServicesConfiguration
      Retrieves timeout for establishing an outbound connection.
      Specified by:
      getConnectionTimeout in interface OutboundServicesConfiguration
      Returns:
      configured value for the connection timeout or duration of 3 second, if the timeout value is not configured or cannot be parsed.
    • setConnectionTimeout

      public void setConnectionTimeout(Duration d)
      Configures timeout for establishing an outbound connection.
      Parameters:
      d - time to wait for a connection can be established. null value resets the configuration to default.
    • setConnectionTimeout

      public void setConnectionTimeout(long millisec)
      Configures timeout for establishing an outbound connection.
      Parameters:
      millisec - number of milliseconds to wait for a connection to be established. A negative value resets the configuration to default.
    • getIdleConnectionValidityPeriod

      public Duration getIdleConnectionValidityPeriod()
      Description copied from interface: OutboundServicesConfiguration
      Retrieves period of time, during which an idle connection in a connection pool is considered to be valid. Once that period is over, the connection may be validated before leasing it from the pool.
      Specified by:
      getIdleConnectionValidityPeriod in interface OutboundServicesConfiguration
      Returns:
      configured value for the connection validity period or duration of half second, if the value is not configured or cannot be parsed.
    • setIdleConnectionValidityPeriod

      public void setIdleConnectionValidityPeriod(Duration d)
      Configures a time period, during which an idle connection in a pool is considered valid.
      Parameters:
      d - time, during which an idle connection is valid. null value resets the configuration to default.
      See Also:
    • setIdleConnectionValidityPeriod

      public void setIdleConnectionValidityPeriod(long millisec)
      Configures a time period, during which an idle outbound connection in a connection pools is considered to be valid.
      Parameters:
      millisec - number of milliseconds an idle connection should be valid. A negative value resets the configuration to default.