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

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

public class DefaultHttpAdaptorServiceImpl
extends Object
implements Configurable, Initializable, Startable, Destroyable, MBeanServerService

This component implementation configures and sets up the MX4J HTTP adaptor to create a web interface to JMX. Copyright 2002 Sapient

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

Field Summary
private  mx4j.adaptor.http.HttpAdaptor adaptor
          Holds the HttpAdapter for the service.
private  String host
          holds the hostname for the adapter.
private  org.apache.commons.logging.Log log
          Provides a handle to Apache-commons logger
private  int port
          Holds the port of the adapter.
private  int retries
          Holds the port incrementals.
private  javax.management.MBeanServer server
          Holds the MBean Service being exposed.
 
Constructor Summary
DefaultHttpAdaptorServiceImpl()
           
 
Method Summary
 void configure(ComponentConfiguration configuration)
          Configure the component.
 void destroy()
          Destroy the component.
 javax.management.MBeanServer getMBeanServer()
          Retreives the MBean Server.
 void initialize(Component thisComponent)
          Initialize the component.
 void start()
          Start the component.
 void stop()
          Stop the component.
 
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


server

private javax.management.MBeanServer server
Holds the MBean Service being exposed.


adaptor

private mx4j.adaptor.http.HttpAdaptor adaptor
Holds the HttpAdapter for the service.


port

private int port
Holds the port of the adapter.


host

private String host
holds the hostname for the adapter.


retries

private int retries
Holds the port incrementals.

Constructor Detail

DefaultHttpAdaptorServiceImpl

public DefaultHttpAdaptorServiceImpl()
Method Detail

configure

public void configure(ComponentConfiguration configuration)
Configure the component. This is preceded and followed by the suspend and resume operations if they are available on the component.

Specified by:
configure in interface Configurable
Parameters:
configuration - HttpAdaptorConfiguration for this component

initialize

public void initialize(Component thisComponent)
Initialize the component. Called immediately after the Component's constructor. On return, the container may start the component.

Specified by:
initialize in interface Initializable
Parameters:
thisComponent - reference to the component

start

public void start()
Start the component. On return, the container will begin fowarding requests to the component. This may be an opportunity to dispatch worker threads.

Specified by:
start in interface Startable
Throws:
LifecycleException

stop

public void stop()
Stop the component. Prior to entry, the container will cease forwarding requests for service to the component. This is an opportunity to cleanly complete or abort any outstanding work. For example, a set of worker threads could be killed off, or a queue set to drain.

Specified by:
stop in interface Startable
Throws:
LifecycleException

getMBeanServer

public javax.management.MBeanServer getMBeanServer()
Retreives the MBean Server.

Specified by:
getMBeanServer in interface MBeanServerService
Returns:
the MBean Server

destroy

public void destroy()
Destroy the component. Called when the Component is already Stopped.

Specified by:
destroy in interface Destroyable
Throws:
LifecycleException


Copyright 1999-2003 Sapient Corporation. All Rights Reserved.