org.jboss.jmx.examples.configuration
Class SampleService
java.lang.Object
org.jboss.mx.util.JBossNotificationBroadcasterSupport
org.jboss.system.ServiceMBeanSupport
org.jboss.jmx.examples.configuration.SampleService
- All Implemented Interfaces:
- MBeanRegistration, NotificationBroadcaster, NotificationEmitter, SampleServiceMBean, org.jboss.kernel.spi.dependency.KernelControllerContextAware, Service, ServiceMBean
public class SampleService
- extends ServiceMBeanSupport
- implements SampleServiceMBean
- Author:
- Tom Elrod
Fields inherited from interface org.jboss.system.ServiceMBean |
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED |
Methods inherited from class org.jboss.system.ServiceMBeanSupport |
create, createService, destroy, destroyService, getDeploymentInfo, getLog, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, pojoChange, pojoCreate, pojoDestroy, pojoStart, pojoStop, postDeregister, postRegister, preDeregister, preRegister, setKernelControllerContext, start, stop, unsetKernelControllerContext |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SampleService
public SampleService()
getName
public String getName()
- Use the short class name as the default for the service name.
- Specified by:
getName
in interface ServiceMBean
- Overrides:
getName
in class ServiceMBeanSupport
startService
protected void startService()
throws Exception
- Sub-classes should override this method to provide
custum 'start' logic.
This method is empty, and is provided for convenience
when concrete service classes do not need to perform
anything specific for this state change.
- Overrides:
startService
in class ServiceMBeanSupport
- Throws:
Exception
stopService
protected void stopService()
throws Exception
- Overrides:
stopService
in class ServiceMBeanSupport
- Throws:
Exception
createSampleConfigMBean
public void createSampleConfigMBean()
throws MalformedObjectNameException,
InstanceAlreadyExistsException,
MBeanRegistrationException,
NotCompliantMBeanException
- Specified by:
createSampleConfigMBean
in interface SampleServiceMBean
- Throws:
MalformedObjectNameException
InstanceAlreadyExistsException
MBeanRegistrationException
NotCompliantMBeanException
Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.