my.avalon.jmx.samples
Class HelloSample

java.lang.Object
  extended byorg.apache.avalon.framework.logger.AbstractLogEnabled
      extended bymy.avalon.jmx.samples.HelloSample
All Implemented Interfaces:
org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.activity.Executable, HelloSampleMBean, org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.service.Serviceable

public class HelloSample
extends org.apache.avalon.framework.logger.AbstractLogEnabled
implements HelloSampleMBean, org.apache.avalon.framework.service.Serviceable, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.activity.Executable, org.apache.avalon.framework.activity.Disposable

HelloSample sample of avalon component usable throught jmx. This implementation don't use stage but need direct access to "jmx-server" service, and control when (un)register.


Constructor Summary
HelloSample()
           
 
Method Summary
 void configure(org.apache.avalon.framework.configuration.Configuration config)
          Configuration of the component by the container.
 void dispose()
           
 void execute()
          log a info message "execute".
 void initialize()
          Initialization of the component by the container.
 void service(org.apache.avalon.framework.service.ServiceManager manager)
          Servicing of the component by the container during which service dependencies declared under the component can be resolved using the supplied service manager.
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HelloSample

public HelloSample()
Method Detail

service

public void service(org.apache.avalon.framework.service.ServiceManager manager)
             throws org.apache.avalon.framework.service.ServiceException
Servicing of the component by the container during which service dependencies declared under the component can be resolved using the supplied service manager.

Specified by:
service in interface org.apache.avalon.framework.service.Serviceable
Parameters:
manager - the service manager
Throws:
org.apache.avalon.framework.service.ServiceException

configure

public void configure(org.apache.avalon.framework.configuration.Configuration config)
               throws org.apache.avalon.framework.configuration.ConfigurationException
Configuration of the component by the container. The implementation get a child element named 'source' and assigns the value of the element to a local variable.

Specified by:
configure in interface org.apache.avalon.framework.configuration.Configurable
Parameters:
config - the component configuration
Throws:
org.apache.avalon.framework.configuration.ConfigurationException - if a configuration error occurs

initialize

public void initialize()
                throws java.lang.Exception
Initialization of the component by the container.

Specified by:
initialize in interface org.apache.avalon.framework.activity.Initializable
Throws:
java.lang.Exception - if an initialization error occurs

execute

public void execute()
             throws java.lang.Exception
log a info message "execute".

Specified by:
execute in interface HelloSampleMBean
Throws:
java.lang.Exception

dispose

public void dispose()
Specified by:
dispose in interface org.apache.avalon.framework.activity.Disposable


Copyright © 2003-2004 . All Rights Reserved.