public class RestletCloudService extends Service
loadConfiguration()
method.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONFIGURATION_FILE_SYSTEM_PROPERTY_KEY
The system property key for agent configuration file.
|
static java.lang.String |
DEFAULT_AGENT_SERVICE_URL
The URL of the remote service used by default.
|
protected static java.util.logging.Logger |
LOGGER
Internal logger.
|
Constructor and Description |
---|
RestletCloudService()
Default constructor.
|
RestletCloudService(java.lang.String agentLogin,
char[] agentPassword,
java.lang.Integer agentCellId,
java.lang.Integer agentCellVersion,
boolean reverseProxyEnabled,
java.lang.String reverseProxyTargetUrl)
Constructor using the default Restlet Cloud service url.
|
RestletCloudService(java.lang.String agentServiceUrl,
java.lang.String agentLogin,
char[] agentPassword,
java.lang.Integer agentCellId,
java.lang.Integer agentCellVersion,
boolean reverseProxyEnabled,
java.lang.String reverseProxyTargetUrl)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Filter |
createInboundFilter(Context context) |
Filter |
createOutboundFilter(Context context) |
int |
getAgentAnalyticsBufferSize()
Returns the agent Analytics module buffer size.
|
long |
getAgentAnalyticsPostPeriodInSecond()
Returns the agent Analytics module post period.
|
java.lang.Integer |
getAgentCellId()
Returns the identifier of the cell configured on the Restlet Cloud platform
for your application.
|
java.lang.Integer |
getAgentCellVersion()
Returns the identifier of the cell version configured on the Restlet Cloud
platform for your application.
|
java.lang.String |
getAgentLogin()
Returns the login used to connect to the Restlet Cloud platform.
|
java.lang.String |
getAgentPassword()
Returns the password used to connect to the Restlet Cloud platform.
|
long |
getAgentRefreshPeriodInSecond()
Returns the agent refresh period in seconds
|
java.lang.String |
getAgentServiceUrl()
Returns the url of the Restlet Cloud service.
|
FirewallConfig |
getFirewallConfig() |
java.lang.String |
getReverseProxyTargetUrl()
Returns the redirection URL.
|
boolean |
isAgentEnabled()
Indicates if the Restlet Cloud agent is enabled.
|
boolean |
isFirewallEnabled()
Indicates if the firewall is enabled.
|
boolean |
isReverseProxyEnabled()
Indicates if the request redirection is enabled.
|
void |
loadConfiguration()
Load the agent configuration from the file set by the system property
'apiSparkServiceConfig'.
|
void |
loadConfiguration(java.io.File configurationFile)
Load the agent configuration from the file.
|
void |
loadConfiguration(java.io.InputStream inputStream)
Load the agent configuration from the input stream.
|
void |
setAgentAnalyticsBufferSize(int agentAnalyticsBufferSize)
Sets the agent Analytics module buffer size.
|
void |
setAgentAnalyticsPostPeriodInSecond(long agentAnalyticsPostPeriodInSecond)
Sets the agent Analytics module post period.
|
void |
setAgentCellId(java.lang.Integer agentCellId)
Sets the identifier of the cell configured on the Restlet Cloud platform for
your application.
|
void |
setAgentCellVersion(java.lang.Integer agentCellVersion)
Sets the identifier of the cell version configured on the Restlet Cloud
platform for your application.
|
void |
setAgentEnabled(boolean agentEnabled)
Indicates if the Restlet Cloud agent is enabled.
|
void |
setAgentLogin(java.lang.String agentLogin)
Sets the login used to connect to the Restlet Cloud platform.
|
void |
setAgentPassword(java.lang.String agentPassword)
Sets the password used to connect to the Restlet Cloud platform.
|
void |
setAgentRefreshPeriodInSecond(long agentRefreshPeriodInSecond)
Sets the agent refresh period
|
void |
setAgentServiceUrl(java.lang.String agentServiceUrl)
Sets the url of the Restlet Cloud agent service.
|
void |
setFirewallEnabled(boolean firewallEnabled)
Indicates if the firewall is enabled.
|
void |
setReverseProxyEnabled(boolean reverseProxyEnabled)
Indicates if the reverse proxy is enabled.
|
void |
setReverseProxyTargetUrl(java.lang.String reverseProxyTargetUrl)
Set the target URL of the reverse proxy.
|
void |
stop()
Stops the service and its timer
|
getContext, isEnabled, isStarted, isStopped, setContext, setEnabled, start
protected static java.util.logging.Logger LOGGER
public static final java.lang.String DEFAULT_AGENT_SERVICE_URL
public static final java.lang.String CONFIGURATION_FILE_SYSTEM_PROPERTY_KEY
public RestletCloudService()
public RestletCloudService(java.lang.String agentLogin, char[] agentPassword, java.lang.Integer agentCellId, java.lang.Integer agentCellVersion, boolean reverseProxyEnabled, java.lang.String reverseProxyTargetUrl)
agentLogin
- The login used to connect to the Restlet Cloud platform.agentPassword
- The password used to connect to the Restlet Cloud platform.agentCellId
- The identifier of the cell configured on the Restlet Cloud platform
for your application.agentCellVersion
- The identifier of the cell version configured on the Restlet Cloud
platform for your application.reverseProxyEnabled
- Indicates if the request redirection is enabled.reverseProxyTargetUrl
- The redirection URL.public RestletCloudService(java.lang.String agentServiceUrl, java.lang.String agentLogin, char[] agentPassword, java.lang.Integer agentCellId, java.lang.Integer agentCellVersion, boolean reverseProxyEnabled, java.lang.String reverseProxyTargetUrl)
agentServiceUrl
- The url of the Restlet Cloud service.agentLogin
- The login used to connect to the Restlet Cloud platform.agentPassword
- The password used to connect to the Restlet Cloud platform.agentCellId
- The identifier of the cell configured on the Restlet Cloud platform
for your application.agentCellVersion
- The identifier of the cell version configured on the Restlet Cloud
platform for your application.reverseProxyEnabled
- Indicates if the request redirection is enabled.reverseProxyTargetUrl
- The redirection URL.public Filter createInboundFilter(Context context)
createInboundFilter
in class Service
public Filter createOutboundFilter(Context context)
createOutboundFilter
in class Service
public int getAgentAnalyticsBufferSize()
public long getAgentAnalyticsPostPeriodInSecond()
public java.lang.String getAgentPassword()
public java.lang.String getAgentServiceUrl()
public long getAgentRefreshPeriodInSecond()
public java.lang.String getAgentLogin()
public java.lang.Integer getAgentCellId()
public java.lang.Integer getAgentCellVersion()
public FirewallConfig getFirewallConfig()
public java.lang.String getReverseProxyTargetUrl()
isReverseProxyEnabled()
returns true.public boolean isAgentEnabled()
public boolean isFirewallEnabled()
firewallConfig
.public boolean isReverseProxyEnabled()
setReverseProxyTargetUrl(String)
.public void loadConfiguration()
CONFIGURATION_FILE_SYSTEM_PROPERTY_KEY
public void loadConfiguration(java.io.File configurationFile)
configurationFile
- The configuration file.public void loadConfiguration(java.io.InputStream inputStream)
inputStream
- The input stream of the configuration file.public void setAgentAnalyticsBufferSize(int agentAnalyticsBufferSize)
agentAnalyticsBufferSize
- The agent Analytics module buffer size.public void setAgentAnalyticsPostPeriodInSecond(long agentAnalyticsPostPeriodInSecond)
agentAnalyticsPostPeriodInSecond
- The agent Analytics module post period.public void setAgentPassword(java.lang.String agentPassword)
agentPassword
- The password used to connect to the Restlet Cloud platform.public void setAgentServiceUrl(java.lang.String agentServiceUrl)
agentServiceUrl
- The url of the Restlet Cloud agent service.public void setAgentRefreshPeriodInSecond(long agentRefreshPeriodInSecond)
agentRefreshPeriodInSecond
- The agent refresh period in secondspublic void setAgentLogin(java.lang.String agentLogin)
agentLogin
- The login used to connect to the Restlet Cloud platform.public void setAgentCellId(java.lang.Integer agentCellId)
agentCellId
- The identifier of the cell configured on the Restlet Cloud platform
for your application.public void setAgentCellVersion(java.lang.Integer agentCellVersion)
agentCellVersion
- The version of the cell configured on the Restlet Cloud platform
for your application.public void setAgentEnabled(boolean agentEnabled)
agentEnabled
- True if the Restlet Cloud agent is enabled.public void setFirewallEnabled(boolean firewallEnabled)
firewallEnabled
- True if the firewall is enabled.public void setReverseProxyEnabled(boolean reverseProxyEnabled)
setReverseProxyTargetUrl(String)
.reverseProxyEnabled
- True if the reverse proxy is enabled.public void setReverseProxyTargetUrl(java.lang.String reverseProxyTargetUrl)
isReverseProxyEnabled()
is true.reverseProxyTargetUrl
- The target URL.Copyright © 2005-2020 Restlet.