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
-
Field Summary
Fields inherited from class de.hybris.platform.integrationservices.config.BaseIntegrationServicesConfiguration
FALLBACK_MESSAGEFields inherited from interface de.hybris.platform.outboundservices.config.OutboundServicesConfiguration
DEFAULT_CONNECTION_KEEP_ALIVE, DEFAULT_CONNECTION_TIMEOUT, DEFAULT_CONNECTION_VALID_PERIOD, DEFAULT_MAX_POOL_CONNECTIONS, DEFAULT_MAX_RESPONSE_PAYLOAD_SIZE, DEFAULT_REQUEST_EXECUTION_TIMEOUT_MS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRetrieves duration for keeping outbound connection alive.Retrieves timeout for establishing an outbound connection.Retrieves period of time, during which an idle connection in a connection pool is considered to be valid.intRetrieves maximum number of connections in a connection pool for outbound communications.intRetrieves the maximum response payload sizelongGets the outbound request timeout in millisecondsbooleanDetermines if monitoring is enabledbooleanDetermines current setting of payload retention for non successful requests.booleanDetermines current setting of payload retention for successful requests.voidsetConnectionKeepAlive(long millisec) Configures period of time to keep outbound connections alive.voidConfigures period of time to keep outbound connections alive.voidsetConnectionTimeout(long millisec) Configures timeout for establishing an outbound connection.voidConfigures timeout for establishing an outbound connection.voidsetIdleConnectionValidityPeriod(long millisec) Configures a time period, during which an idle outbound connection in a connection pools is considered to be valid.voidConfigures a time period, during which an idle connection in a pool is considered valid.voidsetMaxConnectionPoolSize(int value) Changes configuration for the maximum connection pool size.voidsetMaximumResponsePayloadSize(int maxPayloadSize) Sets the value of the maximum payload size accepted in outbound responses.voidsetRequestExecutionTimeout(long timeout) Sets the outbound request timeout in millisecondsMethods inherited from class de.hybris.platform.integrationservices.config.BaseIntegrationServicesConfiguration
getBooleanProperty, getConfigurationService, getIntegerProperty, getLongProperty, getStringProperty, setConfigurationService, setProperty, setProperty, setProperty
-
Constructor Details
-
DefaultOutboundServicesConfiguration
public DefaultOutboundServicesConfiguration()
-
-
Method Details
-
isPayloadRetentionForSuccessEnabled
public boolean isPayloadRetentionForSuccessEnabled()Description copied from interface:MonitoringConfigurationDetermines current setting of payload retention for successful requests.- Specified by:
isPayloadRetentionForSuccessEnabledin interfaceMonitoringConfiguration- Returns:
- true or false depending if the property is enabled or not.
-
isPayloadRetentionForErrorEnabled
public boolean isPayloadRetentionForErrorEnabled()Description copied from interface:MonitoringConfigurationDetermines current setting of payload retention for non successful requests.- Specified by:
isPayloadRetentionForErrorEnabledin interfaceMonitoringConfiguration- Returns:
- true or false depending if the property is enabled or not.
-
isMonitoringEnabled
public boolean isMonitoringEnabled()Description copied from interface:MonitoringConfigurationDetermines if monitoring is enabled- Specified by:
isMonitoringEnabledin interfaceMonitoringConfiguration- Returns:
- true if monitoring is enabled, false otherwise
-
getMaximumResponsePayloadSize
public int getMaximumResponsePayloadSize()Description copied from interface:OutboundServicesConfigurationRetrieves the maximum response payload size- Specified by:
getMaximumResponsePayloadSizein interfaceOutboundServicesConfiguration- 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:OutboundServicesConfigurationGets the outbound request timeout in milliseconds- Specified by:
getRequestExecutionTimeoutin interfaceOutboundServicesConfiguration- 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:OutboundServicesConfigurationRetrieves maximum number of connections in a connection pool for outbound communications.- Specified by:
getMaxConnectionPoolSizein interfaceOutboundServicesConfiguration- 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
Description copied from interface:OutboundServicesConfigurationRetrieves duration for keeping outbound connection alive. Read Connection Keep-Alive for more information.- Specified by:
getConnectionKeepAlivein interfaceOutboundServicesConfiguration- Returns:
- configured value for keeping the connections alive or duration of half second, if the duration is not configured or cannot be parsed.
-
setConnectionKeepAlive
Configures period of time to keep outbound connections alive.- Parameters:
d- duration to keep the connections alive.nullvalue 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
Description copied from interface:OutboundServicesConfigurationRetrieves timeout for establishing an outbound connection.- Specified by:
getConnectionTimeoutin interfaceOutboundServicesConfiguration- Returns:
- configured value for the connection timeout or duration of 3 second, if the timeout value is not configured or cannot be parsed.
-
setConnectionTimeout
Configures timeout for establishing an outbound connection.- Parameters:
d- time to wait for a connection can be established.nullvalue 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
Description copied from interface:OutboundServicesConfigurationRetrieves 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:
getIdleConnectionValidityPeriodin interfaceOutboundServicesConfiguration- Returns:
- configured value for the connection validity period or duration of half second, if the value is not configured or cannot be parsed.
-
setIdleConnectionValidityPeriod
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.nullvalue 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.
-