|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rhq.enterprise.server.core.comm.ServerCommunicationsService
public class ServerCommunicationsService
This is an MBean service that can be used to bootstrap the ServiceContainer. The main purpose for the
existence of this class is to bootstrap the comm services for the Server so remote CLI and Agent clients
can talk to the server.
| Field Summary |
|---|
| Fields inherited from interface org.rhq.enterprise.server.core.comm.ServerCommunicationsServiceMBean |
|---|
OBJECT_NAME |
| Fields inherited from interface org.rhq.enterprise.communications.ServiceContainerMetricsMBean |
|---|
OBJECTNAME_METRICS |
| Constructor Summary | |
|---|---|
ServerCommunicationsService()
|
|
| Method Summary | |
|---|---|
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 |
clear()
|
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. |
long |
getAverageExecutionTimeReceived()
|
Map<String,CommandProcessorMetrics.Calltime> |
getCallTimeDataReceived()
|
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. |
Properties |
getConfigurationOverrides()
Returns a set of properties that will override the configuration preferences. |
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. |
long |
getNumberDroppedCommandsReceived()
|
long |
getNumberFailedCommandsReceived()
|
long |
getNumberNotProcessedCommandsReceived()
|
long |
getNumberSuccessfulCommandsReceived()
|
long |
getNumberTotalCommandsReceived()
|
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 ServerCommunicationsServiceMBean.getMaintenanceModeAtStartup(). |
boolean |
isStarted()
|
boolean |
pingEndpoint(String endpoint,
long timeoutMillis)
This will perform an ad-hoc, low-level ping to the given endpoint. |
void |
postDeregister()
Cleans up the internal state of this service. |
void |
postRegister(Boolean arg0)
This method does nothing - it is a no-op. |
void |
preDeregister()
This method does nothing - it is a no-op. |
ObjectName |
preRegister(MBeanServer mbs,
ObjectName name)
Sets up some internal state. |
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 |
setConfigurationOverrides(Properties overrides)
This allows you to explicitly override configuration preferences found in the configuration file. |
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()
Actually starts the communications services. |
void |
stop()
Synchronized to ensure that the stop operation completes atomically. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ServerCommunicationsService()
| Method Detail |
|---|
public ObjectName preRegister(MBeanServer mbs,
ObjectName name)
throws Exception
preRegister in interface MBeanRegistrationExceptionMBeanRegistration.preRegister(MBeanServer, ObjectName)public void postRegister(Boolean arg0)
postRegister in interface MBeanRegistrationMBeanRegistration.postRegister(java.lang.Boolean)
public void startCommunicationServices()
throws Exception
startCommunicationServices in interface ServerCommunicationsServiceMBeanException - if failed to start the server-side services successfullyServerCommunicationsServiceMBean.startCommunicationServices()public void stop()
stop in interface ServerCommunicationsServiceMBeanServerCommunicationsServiceMBean.stop()public boolean isStarted()
isStarted in interface ServerCommunicationsServiceMBeanServerCommunicationsServiceMBean.isStarted()
public void preDeregister()
throws Exception
preDeregister in interface MBeanRegistrationExceptionMBeanRegistration.preDeregister()public void postDeregister()
postDeregister in interface MBeanRegistrationMBeanRegistration.postDeregister()public String getConfigurationFile()
ServerCommunicationsServiceMBean
getConfigurationFile in interface ServerCommunicationsServiceMBeanpublic void setConfigurationFile(String location)
ServerCommunicationsServiceMBean
setConfigurationFile in interface ServerCommunicationsServiceMBeanpublic String getPreferencesNodeName()
ServerCommunicationsServiceMBean
getPreferencesNodeName in interface ServerCommunicationsServiceMBeanpublic void setPreferencesNodeName(String node)
ServerCommunicationsServiceMBeanIf this isn't specified, a suitable default will be used.
setPreferencesNodeName in interface ServerCommunicationsServiceMBeannode - the name of the Java Preferences node where the server's configuration will or already livespublic Properties getConfigurationOverrides()
ServerCommunicationsServiceMBeannull,
then the configuration preferences takes effect as-is.
getConfigurationOverrides in interface ServerCommunicationsServiceMBeannull)public void setConfigurationOverrides(Properties overrides)
ServerCommunicationsServiceMBean${jboss.server.data.dir}, in the configuration preference values).
setConfigurationOverrides in interface ServerCommunicationsServiceMBeanoverrides - configuration settings that override the configuration preferences (may benull)
public ServerConfiguration reloadConfiguration()
throws Exception
ServerCommunicationsServiceMBeanconfiguration file.
reloadConfiguration in interface ServerCommunicationsServiceMBeanException - if failed to clear and reload the configurationpublic ServerConfiguration getConfiguration()
ServerCommunicationsServiceMBeannull.
getConfiguration in interface ServerCommunicationsServiceMBeanpublic ServiceContainer safeGetServiceContainer()
ServerCommunicationsServiceMBean
safeGetServiceContainer in interface ServerCommunicationsServiceMBeanpublic ServiceContainer getServiceContainer()
ServerCommunicationsServiceMBean
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.
getServiceContainer in interface ServerCommunicationsServiceMBeanpublic String getStartedServerEndpoint()
ServerCommunicationsServiceMBean
null.
getStartedServerEndpoint in interface ServerCommunicationsServiceMBeanpublic AgentClient getKnownAgentClient(org.rhq.core.domain.resource.Agent agent)
ServerCommunicationsServiceMBeanknown agents and returns a client to that agent. An agent can become known if
it has been auto discovered.
getKnownAgentClient in interface ServerCommunicationsServiceMBeanagent - the agent whose client is to be returned
null if that agent is not knownpublic void destroyKnownAgentClient(org.rhq.core.domain.resource.Agent agent)
ServerCommunicationsServiceMBean
destroyKnownAgentClient in interface ServerCommunicationsServiceMBeanagent - the agent whose client is to be destroyedpublic List<org.jboss.remoting.InvokerLocator> getAllKnownAgents()
ServerCommunicationsServiceMBean
getAllKnownAgents in interface ServerCommunicationsServiceMBeanpublic void addStartedAgent(org.rhq.core.domain.resource.Agent agent)
ServerCommunicationsServiceMBeanagent (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.
addStartedAgent in interface ServerCommunicationsServiceMBeanagent - the agent (which has the endpoint of the agent that has started and its name)public void removeDownedAgent(String endpoint)
ServerCommunicationsServiceMBeanagent 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.
removeDownedAgent in interface ServerCommunicationsServiceMBeanendpoint - the endpoint of the agent that has gone down
public boolean pingEndpoint(String endpoint,
long timeoutMillis)
ServerCommunicationsServiceMBean
pingEndpoint in interface ServerCommunicationsServiceMBeanendpoint - the endpoint to pingtimeoutMillis - the timeout, in milliseconds, to wait for the ping to return
true if connectivity to the given endpoint was verified; false if for some
reason the endpoint could not be pingedpublic Integer getGlobalConcurrencyLimit()
ServerCommunicationsServiceMBean
getGlobalConcurrencyLimit in interface ServerCommunicationsServiceMBeanpublic void setGlobalConcurrencyLimit(Integer maxConcurrency)
ServerCommunicationsServiceMBean
setGlobalConcurrencyLimit in interface ServerCommunicationsServiceMBeanpublic Integer getInventoryReportConcurrencyLimit()
ServerCommunicationsServiceMBean
getInventoryReportConcurrencyLimit in interface ServerCommunicationsServiceMBeanpublic void setInventoryReportConcurrencyLimit(Integer maxConcurrency)
ServerCommunicationsServiceMBean
setInventoryReportConcurrencyLimit in interface ServerCommunicationsServiceMBeanpublic Integer getAvailabilityReportConcurrencyLimit()
ServerCommunicationsServiceMBean
getAvailabilityReportConcurrencyLimit in interface ServerCommunicationsServiceMBeanpublic void setAvailabilityReportConcurrencyLimit(Integer maxConcurrency)
ServerCommunicationsServiceMBean
setAvailabilityReportConcurrencyLimit in interface ServerCommunicationsServiceMBeanpublic Integer getInventorySyncConcurrencyLimit()
ServerCommunicationsServiceMBean
getInventorySyncConcurrencyLimit in interface ServerCommunicationsServiceMBeanpublic void setInventorySyncConcurrencyLimit(Integer maxConcurrency)
ServerCommunicationsServiceMBean
setInventorySyncConcurrencyLimit in interface ServerCommunicationsServiceMBeanpublic Integer getContentReportConcurrencyLimit()
ServerCommunicationsServiceMBean
getContentReportConcurrencyLimit in interface ServerCommunicationsServiceMBeanpublic void setContentReportConcurrencyLimit(Integer maxConcurrency)
ServerCommunicationsServiceMBean
setContentReportConcurrencyLimit in interface ServerCommunicationsServiceMBeanpublic Integer getContentDownloadConcurrencyLimit()
ServerCommunicationsServiceMBean
getContentDownloadConcurrencyLimit in interface ServerCommunicationsServiceMBeanpublic void setContentDownloadConcurrencyLimit(Integer maxConcurrency)
ServerCommunicationsServiceMBean
setContentDownloadConcurrencyLimit in interface ServerCommunicationsServiceMBeanpublic Integer getMeasurementReportConcurrencyLimit()
ServerCommunicationsServiceMBean
getMeasurementReportConcurrencyLimit in interface ServerCommunicationsServiceMBeanpublic void setMeasurementReportConcurrencyLimit(Integer maxConcurrency)
ServerCommunicationsServiceMBean
setMeasurementReportConcurrencyLimit in interface ServerCommunicationsServiceMBeanpublic Integer getMeasurementScheduleRequestConcurrencyLimit()
ServerCommunicationsServiceMBean
getMeasurementScheduleRequestConcurrencyLimit in interface ServerCommunicationsServiceMBeanpublic void setMeasurementScheduleRequestConcurrencyLimit(Integer maxConcurrency)
ServerCommunicationsServiceMBean
setMeasurementScheduleRequestConcurrencyLimit in interface ServerCommunicationsServiceMBeanpublic Boolean getMaintenanceModeAtStartup()
ServerCommunicationsServiceMBeantrue 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.
getMaintenanceModeAtStartup in interface ServerCommunicationsServiceMBeantrue if the server should always start up in MMpublic Boolean isMaintenanceModeAtStartup()
ServerCommunicationsServiceMBeanServerCommunicationsServiceMBean.getMaintenanceModeAtStartup().
isMaintenanceModeAtStartup in interface ServerCommunicationsServiceMBeantrue if server starts up in MMpublic void setMaintenanceModeAtStartup(Boolean flag)
ServerCommunicationsServiceMBeanServerCommunicationsServiceMBean.getMaintenanceModeAtStartup() for more.
setMaintenanceModeAtStartup in interface ServerCommunicationsServiceMBeanpublic void clear()
clear in interface ServiceContainerMetricsMBeanpublic long getNumberDroppedCommandsReceived()
getNumberDroppedCommandsReceived in interface ServiceContainerMetricsMBeanpublic long getNumberNotProcessedCommandsReceived()
getNumberNotProcessedCommandsReceived in interface ServiceContainerMetricsMBeanpublic long getNumberFailedCommandsReceived()
getNumberFailedCommandsReceived in interface ServiceContainerMetricsMBeanpublic long getNumberSuccessfulCommandsReceived()
getNumberSuccessfulCommandsReceived in interface ServiceContainerMetricsMBeanpublic long getNumberTotalCommandsReceived()
getNumberTotalCommandsReceived in interface ServiceContainerMetricsMBeanpublic long getAverageExecutionTimeReceived()
getAverageExecutionTimeReceived in interface ServiceContainerMetricsMBeanpublic Map<String,CommandProcessorMetrics.Calltime> getCallTimeDataReceived()
getCallTimeDataReceived in interface ServiceContainerMetricsMBean
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||