org.sape.carbon.services.jmx.server.mx4j
Class DefaultJrmpRemotingImpl

java.lang.Object
  |
  +--org.sape.carbon.services.jmx.server.mx4j.DefaultJrmpRemotingImpl
All Implemented Interfaces:
Configurable, FunctionalInterface, MBeanServerService, Startable

public class DefaultJrmpRemotingImpl
extends Object
implements MBeanServerService, Configurable, Startable

This is the default and very simple implementation of a JRMP admin server built via the functionality in the MX4J JMX implementation. It opens a basic RMI over JRMP administration listener to the MX4J client adaptor.

Copyright 2002 Sapient

Since:
carbon 1.0
Version:
$Revision: 1.7 $($Author: dvoet $ / $Date: 2003/05/05 21:21:31 $)
Author:
Greg Hinkle, May 2002

Field Summary
private static String ADAPTOR_CLASS_NAME
          Name of adapter class.
private static String ADAPTOR_OBJECT_NAME_STRING
          JMX Adapter object name string.
private  mx4j.adaptor.rmi.jrmp.JRMPAdaptorMBean adaptorMBean
          The Adapter MBean.
private  javax.management.ObjectName adaptorObjectName
          The Jmx object name for the adapter.
private  String hostname
          Hostname.
private  Class initialContextFactoryClass
          Class for the initial context factory.
private  org.apache.commons.logging.Log log
          Provides a handle to Apache-commons logger
private  MBeanServerService mbeanServerService
          MBeanServerService being exposed remotely.
private static String NAMING_SERVICE_CLASS_NAME
          Class to use for the naming service.
private  int port
          Port to expose on.
private static String REGISTRY_OBJECT_NAME_STRING
          The Jmx type string.
private  javax.management.ObjectInstance registryObjectInstance
          Object instance for the registry.
private  javax.management.ObjectName registryObjectName
          Object name for the registry.
private static String URL_ID
          Protocol prefix to the URL.
 
Constructor Summary
DefaultJrmpRemotingImpl()
           
 
Method Summary
 void configure(ComponentConfiguration componentConfiguration)
          Configures the component.
 javax.management.MBeanServer getMBeanServer()
          Gets the MBeanServer.
 void start()
          Starts the service.
 void stop()
          Stops the service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private org.apache.commons.logging.Log log
Provides a handle to Apache-commons logger


registryObjectName

private javax.management.ObjectName registryObjectName
Object name for the registry.


registryObjectInstance

private javax.management.ObjectInstance registryObjectInstance
Object instance for the registry.


REGISTRY_OBJECT_NAME_STRING

private static final String REGISTRY_OBJECT_NAME_STRING
The Jmx type string.

See Also:
Constant Field Values

NAMING_SERVICE_CLASS_NAME

private static final String NAMING_SERVICE_CLASS_NAME
Class to use for the naming service.

See Also:
Constant Field Values

adaptorObjectName

private javax.management.ObjectName adaptorObjectName
The Jmx object name for the adapter.


adaptorMBean

private mx4j.adaptor.rmi.jrmp.JRMPAdaptorMBean adaptorMBean
The Adapter MBean.


ADAPTOR_OBJECT_NAME_STRING

private static final String ADAPTOR_OBJECT_NAME_STRING
JMX Adapter object name string.

See Also:
Constant Field Values

ADAPTOR_CLASS_NAME

private static final String ADAPTOR_CLASS_NAME
Name of adapter class.

See Also:
Constant Field Values

URL_ID

private static final String URL_ID
Protocol prefix to the URL.

See Also:
Constant Field Values

initialContextFactoryClass

private Class initialContextFactoryClass
Class for the initial context factory.


hostname

private String hostname
Hostname.


port

private int port
Port to expose on.


mbeanServerService

private MBeanServerService mbeanServerService
MBeanServerService being exposed remotely.

Constructor Detail

DefaultJrmpRemotingImpl

public DefaultJrmpRemotingImpl()
Method Detail

configure

public void configure(ComponentConfiguration componentConfiguration)
               throws Exception
Configures the component.

Specified by:
configure in interface Configurable
Parameters:
componentConfiguration - JrmpRemotingConfiguration to configure the component
Throws:
Exception - indicates an error configuring the component

start

public void start()
           throws Exception
Starts the service.

Specified by:
start in interface Startable
Throws:
Exception - indicates an error starting the service

stop

public void stop()
          throws Exception
Stops the service.

Specified by:
stop in interface Startable
Throws:
Exception - indicates an error stopping the service

getMBeanServer

public javax.management.MBeanServer getMBeanServer()
                                            throws MBeanServerRetreiveException
Gets the MBeanServer.

Specified by:
getMBeanServer in interface MBeanServerService
Returns:
the MBean Server
Throws:
MBeanServerRetreiveException - indicates and error retreiving the MBean server


Copyright 1999-2003 Sapient Corporation. All Rights Reserved.