public interface ServerCommunicationsServiceMBean extends ServiceContainerMetricsMBean
ServiceContainerMetricsMBean interface. In order to put all of our comm subsystem metrics and configuration
in a single service resource that our plugin can expose, we'll pass through those metrics from that MBean through our
interface, too.| Modifier and Type | Field and Description |
|---|---|
static ObjectName |
OBJECT_NAME
The object name that the MBean service will be registered under.
|
OBJECTNAME_METRICS| Modifier and Type | Method and Description |
|---|---|
void |
addStartedAgent(org.rhq.core.domain.resource.Agent agent)
Given an
agent (which includes its remote endpoint and name), this will see if it is not yet a
known agent and if so, will add it. |
void |
destroyKnownAgentClient(org.rhq.core.domain.resource.Agent agent)
This will stop the client, remove it from the cache and clean up any resources used by the client.
|
List<org.jboss.remoting.InvokerLocator> |
getAllKnownAgents()
This returns a list of all known agents that the server is in communications with.
|
Integer |
getAvailabilityReportConcurrencyLimit()
Gets the concurrency limit for availability reports.
|
ServerConfiguration |
getConfiguration()
Returns the configuration of the server-side communication components.
|
String |
getConfigurationFile()
Returns the location of the configuration file where all preferences are defined for the server-side services.
|
String |
getConfigurationOverridesFile() |
Integer |
getConfigurationUpdateConcurrencyLimit()
Gets the concurrency limit for configuration updates.
|
Integer |
getContentDownloadConcurrencyLimit()
Gets the concurrency limit for content downloads.
|
Integer |
getContentReportConcurrencyLimit()
Gets the concurrency limit for content reports.
|
Integer |
getGlobalConcurrencyLimit()
Gets the global concurrency limit.
|
Integer |
getInventoryReportConcurrencyLimit()
Gets the concurrency limit for inventory reports.
|
Integer |
getInventorySyncConcurrencyLimit()
Gets the concurrency limit for inventory sync requests.
|
AgentClient |
getKnownAgentClient(org.rhq.core.domain.resource.Agent agent)
Given an agent domain object, this will see if that agent is known by looking up its host and port from the list
of all
known agents and returns a client to that agent. |
Boolean |
getMaintenanceModeAtStartup()
Returns
true if the server should always start up in maintenance mode. |
Integer |
getMeasurementReportConcurrencyLimit()
Gets the concurrency limit for measurement reports.
|
Integer |
getMeasurementScheduleRequestConcurrencyLimit()
Gets the concurrency limit for measurement reports.
|
String |
getPreferencesNodeName()
Returns the preferences node name used to identify the configuration set to use.
|
ServiceContainer |
getServiceContainer()
Returns the service container that houses all the server-side communications services.
|
String |
getStartedServerEndpoint()
If the server is currently listening for requests, this will return the endpoint the agents should use to connect
to it.
|
Boolean |
isMaintenanceModeAtStartup()
Same as
getMaintenanceModeAtStartup(). |
boolean |
isStarted() |
boolean |
pingEndpoint(String endpoint,
long timeoutMillis)
This will perform an ad-hoc, low-level ping to the given endpoint.
|
ServerConfiguration |
reloadConfiguration()
This will clear any and all current configuration preferences and then reload the
configuration file. |
void |
removeDownedAgent(String endpoint)
Given an
agent remote endpoint, this will see if it is a known agent and if so,
will remove it. |
ServiceContainer |
safeGetServiceContainer()
Returns the service container that houses all the server-side communications services.
|
void |
setAvailabilityReportConcurrencyLimit(Integer maxConcurrency)
Sets the new concurrency limit for availability reports.
|
void |
setConfigurationFile(String location)
Defines the location of the configuration file where all preferences are defined for the server-side services.
|
void |
setConfigurationOverridesFile(String overridesFile)
This allows you to explicitly override configuration preferences found in the configuration file.
|
void |
setConfigurationUpdateConcurrencyLimit(Integer maxConcurrency)
Sets the new concurrency limit for configuration updates.
|
void |
setContentDownloadConcurrencyLimit(Integer maxConcurrency)
Sets the new concurrency limit for content downloads.
|
void |
setContentReportConcurrencyLimit(Integer maxConcurrency)
Sets the new concurrency limit for content reports.
|
void |
setGlobalConcurrencyLimit(Integer maxConcurrency)
Sets the global concurrency limit.
|
void |
setInventoryReportConcurrencyLimit(Integer maxConcurrency)
Sets the new concurrency limit for inventory reports.
|
void |
setInventorySyncConcurrencyLimit(Integer maxConcurrency)
Sets the new concurrency limit for inventory sync requests.
|
void |
setMaintenanceModeAtStartup(Boolean flag)
Sets the flag to indicate if the server should always start up in maintenance mode.
|
void |
setMeasurementReportConcurrencyLimit(Integer maxConcurrency)
Sets the new concurrency limit for measurement reports.
|
void |
setMeasurementScheduleRequestConcurrencyLimit(Integer maxConcurrency)
Sets the new concurrency limit for measurement schedule requests.
|
void |
setPreferencesNodeName(String node)
Defines the preferences node name used to identify the configuration set to use.
|
void |
startCommunicationServices()
Starts the communications services used by the server to send and receive messages to/from agents.
|
void |
stop()
Stops the service which will stop all server-side services.
|
clear, getAverageExecutionTimeReceived, getCallTimeDataReceived, getNumberDroppedCommandsReceived, getNumberFailedCommandsReceived, getNumberNotProcessedCommandsReceived, getNumberSuccessfulCommandsReceived, getNumberTotalCommandsReceivedstatic final ObjectName OBJECT_NAME
String getConfigurationFile()
void setConfigurationFile(String location)
location - String getPreferencesNodeName()
void setPreferencesNodeName(String node)
If this isn't specified, a suitable default will be used.
node - the name of the Java Preferences node where the server's configuration will or already livesvoid setConfigurationOverridesFile(String overridesFile)
overridesFile - configuration settings file that override the configuration preferences (may benull)String getConfigurationOverridesFile()
ServerConfiguration reloadConfiguration() throws Exception
configuration file.Exception - if failed to clear and reload the configurationServerConfiguration getConfiguration()
null.void startCommunicationServices()
throws Exception
Exception - if failed to start the server-side services successfullyvoid stop()
throws Exception
Exception - if failed to stop the server-side servicesboolean isStarted()
ServiceContainer safeGetServiceContainer()
ServiceContainer getServiceContainer()
null if the serviceContainer has not been initialized. It is possible for this to be non-null
prior to server-side comm services initialization. Use isStarted() as necessary.String getStartedServerEndpoint()
null.AgentClient getKnownAgentClient(org.rhq.core.domain.resource.Agent agent)
known agents and returns a client to that agent. An agent can become known if
it has been auto discovered.agent - the agent whose client is to be returnednull if that agent is not knownvoid destroyKnownAgentClient(org.rhq.core.domain.resource.Agent agent)
agent - the agent whose client is to be destroyedList<org.jboss.remoting.InvokerLocator> getAllKnownAgents()
void addStartedAgent(org.rhq.core.domain.resource.Agent agent)
agent (which includes its remote endpoint and name), this will see if it is not yet a
known agent and if so, will add it. This should be called only when you know an agent has started.agent - the agent (which has the endpoint of the agent that has started and its name)void removeDownedAgent(String endpoint)
agent remote endpoint, this will see if it is a known agent and if so,
will remove it. This should be called only when you know an agent has gone down.endpoint - the endpoint of the agent that has gone downboolean pingEndpoint(String endpoint, long timeoutMillis)
endpoint - the endpoint to pingtimeoutMillis - the timeout, in milliseconds, to wait for the ping to returntrue if connectivity to the given endpoint was verified; false if for some
reason the endpoint could not be pingedInteger getGlobalConcurrencyLimit()
void setGlobalConcurrencyLimit(Integer maxConcurrency)
maxConcurrency - Integer getInventoryReportConcurrencyLimit()
void setInventoryReportConcurrencyLimit(Integer maxConcurrency)
maxConcurrency - Integer getAvailabilityReportConcurrencyLimit()
void setAvailabilityReportConcurrencyLimit(Integer maxConcurrency)
maxConcurrency - Integer getInventorySyncConcurrencyLimit()
void setInventorySyncConcurrencyLimit(Integer maxConcurrency)
maxConcurrency - Integer getContentReportConcurrencyLimit()
void setContentReportConcurrencyLimit(Integer maxConcurrency)
maxConcurrency - Integer getContentDownloadConcurrencyLimit()
void setContentDownloadConcurrencyLimit(Integer maxConcurrency)
maxConcurrency - Integer getMeasurementReportConcurrencyLimit()
void setMeasurementReportConcurrencyLimit(Integer maxConcurrency)
maxConcurrency - Integer getMeasurementScheduleRequestConcurrencyLimit()
void setMeasurementScheduleRequestConcurrencyLimit(Integer maxConcurrency)
maxConcurrency - Integer getConfigurationUpdateConcurrencyLimit()
void setConfigurationUpdateConcurrencyLimit(Integer maxConcurrency)
maxConcurrency - Boolean getMaintenanceModeAtStartup()
true if the server should always start up in maintenance mode.
If false, the server will startup in the same state it was in when it
was shutdown.true if the server should always start up in MMBoolean isMaintenanceModeAtStartup()
getMaintenanceModeAtStartup().true if server starts up in MMvoid setMaintenanceModeAtStartup(Boolean flag)
getMaintenanceModeAtStartup() for more.flag - Copyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.