Package net.sf.ehcache.config
Class ManagementRESTServiceConfiguration
- java.lang.Object
-
- net.sf.ehcache.config.ManagementRESTServiceConfiguration
-
public class ManagementRESTServiceConfiguration extends java.lang.ObjectConfiguration class of management REST services.- Author:
- Ludovic Orban
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringAUTO_LOCATIONSynthetic security service location used when it should be auto-discovered.static java.lang.StringDEFAULT_BINDDefault bind value.static intDEFAULT_SECURITY_SVC_TIMEOUTDefault timeout for the connection to the configured security servicestatic java.lang.StringNO_BINDSynthetic bind value used when no server must be bound.
-
Constructor Summary
Constructors Constructor Description ManagementRESTServiceConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetBind()Get the host:port pair to which the REST server should be bound.java.lang.StringgetHost()Get the host part of the host:port pair to which the REST server should be bound.intgetPort()Get the port part of the host:port pair to which the REST server should be bound.intgetSampleHistorySize()Returns the sample history size to be applied to theSampledCounterConfigfor sampled statisticsintgetSampleIntervalSeconds()Returns the sample interval in seconds to be applied to theSampledCounterConfigfor sampled statisticsintgetSampleSearchIntervalSeconds()Returns the sample search interval in seconds to be applied to theSampledRateCounterConfigfor sampled statisticsjava.lang.StringgetSecurityServiceLocation()Returns the security service location required for trusted identity assertion to the embedded REST management service.intgetSecurityServiceTimeout()Returns the connection/read timeout value for the security service in milliseconds.booleanisEnabled()Check if the REST services should be enabled or not.booleanisNeedClientAuth()Indicates whether or not the embedded agent should require ssl client certificate authorization.booleanisSslEnabled()Indicates whether or not the embedded agent should enabled ssl.SampledCounterConfigmakeSampledCounterConfig()A factory method forSampledCounterConfigbased on the global settings defined on this objectSampledRateCounterConfigmakeSampledGetRateCounterConfig()A factory method forSampledCounterConfigbased on the global settings defined on this objectSampledRateCounterConfigmakeSampledSearchRateCounterConfig()A factory method forSampledCounterConfigbased on the global settings defined on this objectvoidsetBind(java.lang.String bind)Set the host:port pair to which the REST server should be bound.voidsetEnabled(boolean enabled)Set that the REST services should be enabled or disabled.voidsetNeedClientAuth(boolean needClientAuth)Set ssl client certificate authorization required setting.voidsetSampleHistorySize(int sampleHistorySize)Sets the sample history size to be applied to theSampledCounterConfigfor sampled statisticsvoidsetSampleIntervalSeconds(int sampleIntervalSeconds)Sets the sample interval in seconds to be applied to theSampledCounterConfigfor sampled statisticsvoidsetSampleSearchIntervalSeconds(int sampleSearchInterval)Sets the sample search interval in seconds to be applied to theSampledCounterConfigfor sampled statisticsvoidsetSecurityServiceLocation(java.lang.String securityServiceURL)Sets the security service location required for trusted identity assertion to the embedded REST management service.voidsetSecurityServiceTimeout(int securityServiceTimeout)Sets the connection/read timeout value for the security service in milliseconds.voidsetSslEnabled(boolean sslEnabled)Set ssl indicator for this embedded agent.java.lang.StringtoString()
-
-
-
Field Detail
-
DEFAULT_BIND
public static final java.lang.String DEFAULT_BIND
Default bind value.- See Also:
- Constant Field Values
-
NO_BIND
public static final java.lang.String NO_BIND
Synthetic bind value used when no server must be bound.- See Also:
- Constant Field Values
-
AUTO_LOCATION
public static final java.lang.String AUTO_LOCATION
Synthetic security service location used when it should be auto-discovered.- See Also:
- Constant Field Values
-
DEFAULT_SECURITY_SVC_TIMEOUT
public static final int DEFAULT_SECURITY_SVC_TIMEOUT
Default timeout for the connection to the configured security service- See Also:
- Constant Field Values
-
-
Method Detail
-
isEnabled
public boolean isEnabled()
Check if the REST services should be enabled or not.- Returns:
- true if REST services should be enabled.
-
setEnabled
public void setEnabled(boolean enabled)
Set that the REST services should be enabled or disabled.- Parameters:
enabled- true if the REST services should be enabled.
-
getSecurityServiceLocation
public java.lang.String getSecurityServiceLocation()
Returns the security service location required for trusted identity assertion to the embedded REST management service. This feature is only available with an enterprise license.If this value is set, then this service will require secure dialog with the TMS or other 3rd party REST client implementations. The service furnished by the enterprise version of the TMC is located is provided at /api/assertIdentity.
- Returns:
- a string representing the URL of the security service.
-
setSecurityServiceLocation
public void setSecurityServiceLocation(java.lang.String securityServiceURL)
Sets the security service location required for trusted identity assertion to the embedded REST management service. This feature is only available with an enterprise license.If this value is set, then this service will require secure dialog with the TMS or other 3rd party REST client implementations. The service furnished by the enterprise version of the TMC is located is provided at /api/assertIdentity.
- Parameters:
securityServiceURL- a string representing the URL of the security service.
-
getSecurityServiceTimeout
public int getSecurityServiceTimeout()
Returns the connection/read timeout value for the security service in milliseconds.- Returns:
- security service timeout
-
setSecurityServiceTimeout
public void setSecurityServiceTimeout(int securityServiceTimeout)
Sets the connection/read timeout value for the security service in milliseconds.- Parameters:
securityServiceTimeout- milliseconds to timeout
-
getBind
public java.lang.String getBind()
Get the host:port pair to which the REST server should be bound. Format is: [IP address|host name]:[port number]- Returns:
- the host:port pair to which the REST server should be bound.
-
getHost
public java.lang.String getHost()
Get the host part of the host:port pair to which the REST server should be bound.- Returns:
- the host part of the host:port pair to which the REST server should be bound.
-
getPort
public int getPort()
Get the port part of the host:port pair to which the REST server should be bound.- Returns:
- the port part of the host:port pair to which the REST server should be bound.
-
isSslEnabled
public boolean isSslEnabled()
Indicates whether or not the embedded agent should enabled ssl.- Returns:
- true if ssl should be enabled, false if not.
-
setSslEnabled
public void setSslEnabled(boolean sslEnabled)
Set ssl indicator for this embedded agent.- Parameters:
sslEnabled- boolean to indicate ssl status.
-
isNeedClientAuth
public boolean isNeedClientAuth()
Indicates whether or not the embedded agent should require ssl client certificate authorization. This configuration setting is only relevant if ssl is enabled.- Returns:
- true if ssl client certificate authorization should be required, false if not.
- See Also:
isSslEnabled()
-
setNeedClientAuth
public void setNeedClientAuth(boolean needClientAuth)
Set ssl client certificate authorization required setting. This configuration setting is only relevant if ssl is enabled.- Parameters:
needClientAuth-- See Also:
setSslEnabled(boolean)
-
setBind
public void setBind(java.lang.String bind)
Set the host:port pair to which the REST server should be bound.- Parameters:
bind- host:port pair to which the REST server should be bound.
-
getSampleHistorySize
public int getSampleHistorySize()
Returns the sample history size to be applied to theSampledCounterConfigfor sampled statistics- Returns:
- the sample history size
-
setSampleHistorySize
public void setSampleHistorySize(int sampleHistorySize)
Sets the sample history size to be applied to theSampledCounterConfigfor sampled statistics- Parameters:
sampleHistorySize- to set
-
getSampleIntervalSeconds
public int getSampleIntervalSeconds()
Returns the sample interval in seconds to be applied to theSampledCounterConfigfor sampled statistics- Returns:
- the sample interval in seconds
-
setSampleIntervalSeconds
public void setSampleIntervalSeconds(int sampleIntervalSeconds)
Sets the sample interval in seconds to be applied to theSampledCounterConfigfor sampled statistics- Parameters:
sampleIntervalSeconds- to set
-
getSampleSearchIntervalSeconds
public int getSampleSearchIntervalSeconds()
Returns the sample search interval in seconds to be applied to theSampledRateCounterConfigfor sampled statistics- Returns:
- the sample search interval in seconds
-
setSampleSearchIntervalSeconds
public void setSampleSearchIntervalSeconds(int sampleSearchInterval)
Sets the sample search interval in seconds to be applied to theSampledCounterConfigfor sampled statistics- Parameters:
sampleSearchInterval- to set
-
makeSampledCounterConfig
public SampledCounterConfig makeSampledCounterConfig()
A factory method forSampledCounterConfigbased on the global settings defined on this object- Returns:
- a
SampledCounterConfig - See Also:
getSampleIntervalSeconds(),getSampleHistorySize()
-
makeSampledGetRateCounterConfig
public SampledRateCounterConfig makeSampledGetRateCounterConfig()
A factory method forSampledCounterConfigbased on the global settings defined on this object- Returns:
- a
SampledCounterConfig - See Also:
getSampleIntervalSeconds(),getSampleHistorySize()
-
makeSampledSearchRateCounterConfig
public SampledRateCounterConfig makeSampledSearchRateCounterConfig()
A factory method forSampledCounterConfigbased on the global settings defined on this object- Returns:
- a
SampledCounterConfig - See Also:
getSampleSearchIntervalSeconds(),getSampleHistorySize()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-