org.jboss.embedded.adapters
Class JMXKernel
java.lang.Object
org.jboss.util.JBossObject
org.jboss.embedded.adapters.JMXKernel
- All Implemented Interfaces:
- java.lang.Cloneable, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, JMXKernelMBean, org.jboss.system.server.Server, org.jboss.system.server.ServerImplMBean, org.jboss.util.JBossInterface
public class JMXKernel
- extends org.jboss.util.JBossObject
- implements JMXKernelMBean, javax.management.NotificationEmitter
A pojo that creates a legacy jmx kernel ala the jboss-4.x server bootstrap.
This is used to support the SARDeployer and mbean integration.
- Version:
- $Revision:$
- Author:
- Scott.Stark@jboss.org, bill@jboss.org, adrian@jboss.org
Fields inherited from class org.jboss.util.JBossObject |
hashCode, log, toString |
Fields inherited from interface org.jboss.system.server.ServerImplMBean |
OBJECT_NAME |
Fields inherited from interface org.jboss.system.server.Server |
START_NOTIFICATION_TYPE, STOP_NOTIFICATION_TYPE |
Methods inherited from class org.jboss.util.JBossObject |
cacheGetHashCode, cacheToString, clone, equals, flushJBossObjectCache, getClassShortName, getHashCode, hashCode, list, notEqual, toShortString, toShortString, toString, toString, toStringImplementation |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
JMXKernel
public JMXKernel()
getServiceController
public org.jboss.system.ServiceControllerMBean getServiceController()
getMbeanServer
public javax.management.MBeanServer getMbeanServer()
setKernel
public void setKernel(org.jboss.kernel.Kernel kernel)
getServerConfig
public ServerConfig getServerConfig()
setServerConfig
public void setServerConfig(ServerConfig serverConfig)
setupUrlHandlers
public static void setupUrlHandlers()
start
public void start()
throws java.lang.Exception
- Specified by:
start
in interface org.jboss.system.server.Server
- Throws:
java.lang.Exception
stop
public void stop()
throws java.lang.IllegalStateException
- Stop the mbeans
- Throws:
java.lang.IllegalStateException
- - if not started.
shutdownServices
protected void shutdownServices()
- The
shutdownServices
method calls the one and only
ServiceController to shut down all the mbeans registered with it.
removeMBeans
protected void removeMBeans()
- The
removeMBeans
method uses the mbean mbeanServer to unregister
all the mbeans registered here.
addNotificationListener
public void addNotificationListener(javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
- Specified by:
addNotificationListener
in interface javax.management.NotificationBroadcaster
removeNotificationListener
public void removeNotificationListener(javax.management.NotificationListener listener)
throws javax.management.ListenerNotFoundException
- Specified by:
removeNotificationListener
in interface javax.management.NotificationBroadcaster
- Throws:
javax.management.ListenerNotFoundException
removeNotificationListener
public void removeNotificationListener(javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
throws javax.management.ListenerNotFoundException
- Specified by:
removeNotificationListener
in interface javax.management.NotificationEmitter
- Throws:
javax.management.ListenerNotFoundException
getNotificationInfo
public javax.management.MBeanNotificationInfo[] getNotificationInfo()
- Specified by:
getNotificationInfo
in interface javax.management.NotificationBroadcaster
sendNotification
public void sendNotification(javax.management.Notification notification)
runGarbageCollector
public void runGarbageCollector()
- Specified by:
runGarbageCollector
in interface org.jboss.system.server.ServerImplMBean
runFinalization
public void runFinalization()
- Specified by:
runFinalization
in interface org.jboss.system.server.ServerImplMBean
traceMethodCalls
public void traceMethodCalls(java.lang.Boolean flag)
- Specified by:
traceMethodCalls
in interface org.jboss.system.server.ServerImplMBean
traceInstructions
public void traceInstructions(java.lang.Boolean flag)
- Specified by:
traceInstructions
in interface org.jboss.system.server.ServerImplMBean
getStartDate
public java.util.Date getStartDate()
- Specified by:
getStartDate
in interface org.jboss.system.server.Server
getVersion
public java.lang.String getVersion()
- Specified by:
getVersion
in interface org.jboss.system.server.Server
getVersionName
public java.lang.String getVersionName()
- Specified by:
getVersionName
in interface org.jboss.system.server.Server
getBuildNumber
public java.lang.String getBuildNumber()
- Specified by:
getBuildNumber
in interface org.jboss.system.server.Server
getBuildJVM
public java.lang.String getBuildJVM()
- Specified by:
getBuildJVM
in interface org.jboss.system.server.Server
getBuildOS
public java.lang.String getBuildOS()
- Specified by:
getBuildOS
in interface org.jboss.system.server.Server
getBuildID
public java.lang.String getBuildID()
- Specified by:
getBuildID
in interface org.jboss.system.server.Server
getBuildDate
public java.lang.String getBuildDate()
- Specified by:
getBuildDate
in interface org.jboss.system.server.Server
isInShutdown
public boolean isInShutdown()
- Specified by:
isInShutdown
in interface org.jboss.system.server.Server
init
public void init(java.util.Properties props)
throws java.lang.IllegalStateException,
java.lang.Exception
- Specified by:
init
in interface org.jboss.system.server.Server
- Throws:
java.lang.IllegalStateException
java.lang.Exception
getConfig
public ServerConfig getConfig()
throws java.lang.IllegalStateException
- Specified by:
getConfig
in interface org.jboss.system.server.Server
- Throws:
java.lang.IllegalStateException
isStarted
public boolean isStarted()
- Specified by:
isStarted
in interface org.jboss.system.server.Server
shutdown
public void shutdown()
throws java.lang.IllegalStateException
- Specified by:
shutdown
in interface org.jboss.system.server.Server
- Throws:
java.lang.IllegalStateException
exit
public void exit(int exitcode)
- Specified by:
exit
in interface org.jboss.system.server.Server
exit
public void exit()
- Specified by:
exit
in interface org.jboss.system.server.Server
halt
public void halt(int exitcode)
- Specified by:
halt
in interface org.jboss.system.server.Server
halt
public void halt()
- Specified by:
halt
in interface org.jboss.system.server.Server
getSpecificationVersion
public java.lang.String getSpecificationVersion()
getVersionNumber
public java.lang.String getVersionNumber()
- Specified by:
getVersionNumber
in interface org.jboss.system.server.Server