Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Project Rio
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jini.rio.jmx
Class JMXConnectorService

    java.lang.Object
      org.jini.rio.resources.servicecore.ServiceProvider
          org.jini.rio.jsb.ServiceBeanAdapter
              org.jini.rio.jmx.JMXConnectorService

All Implemented Interfaces:
  ServiceProxyAccessor, Remote, MBeanRegistration, NotificationBroadcaster, NotificationEmitter, Administrable, ProxyAccessor, ServerProxyTrust, ServiceBean, MonitorableService, EventProducer, ServiceBeanAdapterMBean, Service, Watchable

    public class JMXConnectorService

extends ServiceBeanAdapter
implements ServiceProxyAccessor

Create a JMX RMI Connector and advertise it into discovered Jini Technology lookup services. This utility relies on the RMI Registry being created and the `Constants.REGISTRY_PORT` being set.

#### Configuring JMXConnectorService

The JMXConnectorService supports the following configuration entries; where each configuration entry name is associated with the component name `org.jini.rio.jmx`.

- agentName

  Type: | String
  Default: | "JMX Agent"
  Description: | The name to use when creating the `Name` attribute

- groups

  Type: | String[]
  Default: | `DiscoveryGroupManagement.ALL_GROUPS`
  Description: | The names of the lookup groups that the service should discover and join. An empty array specifies that no groups should be joined. A null value specifies that all groups should be joined. Otherwise, the value specifies the names of the groups to join. The array must not contain null elements. This entry is obtained and used when the service is first started.

- hostAddress

  Type: | String
  Default: | If the java.rmi.server.hostname property is set, use this as the default, otherwise use the value returned by `InetAddress.getLocalHost()`
  Description: | This entry will be read at initialization and sets the host address to use for the HTTP server instance as well as the host address to use when constructing the platform `MBeanServer`

``

- initialLookupAttributes

  Type: | `Entry`[]
  Default: | new Entry[0]
  Description: | Entries to include in the set of attributes the service supplies when registering with lookup services, in addition to the `Name`, `Host`, `JMXProtocolType` and `JMXProperty` instances provided by the service. An empty array or null specifies that only the service-provided attributes should be added.

``

- locators

  Type: | `LookupLocator`[]
  Default: | null
  Description: | This entry will be read at initialization and configures the locations of specific lookup services that the service should discover and join. An empty array or null specifies that no specific lookup services should be joined.

Nested Class Summary

Nested classes/interfaces inherited from class org.jini.rio.jsb.ServiceBeanAdapter
`ServiceBeanAdapter.SnapshotThread`

Field Summary

Fields inherited from class org.jini.rio.jsb.ServiceBeanAdapter
`activationID, admin, computeResource, computeResourceObserver, context, contextMgr, joiner, jsbState, logDirName, mbeanNoticationInfoList, mbeanServer, objectName, proxy, serviceBeanComponent, serviceID, slaThresholdEventAdapter, snapshotter, state, store, uuid`

Fields inherited from class org.jini.rio.resources.servicecore.ServiceProvider
`eventTable, watchRegistry`

Constructor Summary
`JMXConnectorService(String[] configArgs, LifeCycle lifeCycle)`

Method Summary
`protected void` | `bootstrap(String[] configArgs)`
`void` | `destroy()` Left for concrete implementations of this class to implement
`protected Remote` | `exportDo(Exporter exporter)` Override exportDo, using our delegating proxy to handle invocations
`protected JMXConnectorServer` | `getJMXConnectorServer(Configuration config, String hostAddress)`
`void` | `initialize(ServiceBeanContext context)` The initialize method is invoked to initialize the ServiceBean.
`Object` | `start(ServiceBeanContext context)` The start method provides the capability for a ServiceBean to initialize itself and make it ready to accept inbound communications, returning an Object which can be used to communicate with the ServiceBean.

Methods inherited from class org.jini.rio.jsb.ServiceBeanAdapter
`addAttribute, addAttributes, addNotificationListener, advertise, cleanJMX, createObjectName, createProxy, destroy, destroyWatches, getAdmin, getAdminExporter, getAssociationManagement, getAssociations, getComputeResourceObserver, getDiscoveryManager, getExportedProxy, getExporter, getJoinManager, getLookupGroups, getNotificationBroadcasterSupport, getNotificationInfo, getProxy, getProxyVerifier, getServiceBeanContext, getServiceBeanInstantiatorUuid, getServiceProxy, getSLAEventHandler, getStarted, getStartTime, getUuid, getWatchUI, initialize, initializeJMX, monitor, ping, postDeregister, postRegister, preDeregister, preRegister, registerMBean, removeNotificationListener, removeNotificationListener, setLookupGroups, startHeartbeat, stop, unadvertise`

Methods inherited from class org.jini.rio.resources.servicecore.ServiceProvider
`fetch, fetch, getConfiguration, getEventTable, getWatchRegistry, register, setConfiguration, setEventTable, setWatchRegistry`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface com.sun.jini.start.ServiceProxyAccessor
`getServiceProxy`

Constructor Detail

### JMXConnectorService

    public JMXConnectorService(String[] configArgs,
                               LifeCycle lifeCycle)
                        throws Exception

Throws:
  `Exception`

Method Detail

### bootstrap

    protected void bootstrap(String[] configArgs)
                      throws Exception

  Throws:
    `Exception`

### start

    public Object start(ServiceBeanContext context)
                 throws Exception

  Description copied from class: `ServiceBeanAdapter`
  The start method provides the capability for a ServiceBean to initialize itself and make it ready to accept inbound communications, returning an Object which can be used to communicate with the ServiceBean. It is the responsibility of the ServiceBean to initiate appropriate startup logic. If the ServiceBean has started itself, subsequent invocations of this method will not re-start the ServiceBean, but return the Object created during the initial start

  Specified by:
    `start` in interface `ServiceBean`
  Overrides:
    `start` in class `ServiceBeanAdapter`
  Parameters:
    `context` - The ServiceBeanContext containing ServiceBean initialization attributes
  Returns:
    An Object that can be used to communicate to the ServiceBean
  Throws:
    `Exception` - If any errors or unexpected conditions occur

### initialize

    public void initialize(ServiceBeanContext context)
                    throws Exception

  Description copied from class: `ServiceBeanAdapter`
  The initialize method is invoked to initialize the ServiceBean. This method is invoked only once. The ServiceBeanAdapter initializes required infrastructure elements in order to prepare the ServiceBean for processing.

  Specified by:
    `initialize` in interface `ServiceBean`
  Overrides:
    `initialize` in class `ServiceBeanAdapter`
  Parameters:
    `context` - The ServiceBeanContext to intialize the ServiceBean with
  Throws:
    `Exception` - If something unexpected happens

### destroy

    public void destroy()

  Description copied from class: `ServiceProvider`
  Left for concrete implementations of this class to implement

  Specified by:
    `destroy` in interface `ServiceBeanAdapterMBean`
  Overrides:
    `destroy` in class `ServiceBeanAdapter`
  See Also:
    `ServiceBeanAdapterMBean.destroy()`

### exportDo

    protected Remote exportDo(Exporter exporter)
                       throws Exception

  Override exportDo, using our delegating proxy to handle invocations

  Overrides:
    `exportDo` in class `ServiceBeanAdapter`
  Parameters:
    `exporter` - The Exporter to use, must not be null
  Returns:
    Remote The remote object used to accept incoming calls
  Throws:
    `Exception` - If errors occur

### getJMXConnectorServer

    protected JMXConnectorServer getJMXConnectorServer(Configuration config,
                                                       String hostAddress)
                                                throws ConfigurationException,
                                                       IOException

  Throws:
    `ConfigurationException`
    `IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Project Rio
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © Project Rio.