org.jboss.system.server.jmx
Class JMXKernel

java.lang.Object
  extended by org.jboss.util.JBossObject
      extended by org.jboss.system.server.jmx.JMXKernel
All Implemented Interfaces:
Cloneable, NotificationBroadcaster, NotificationEmitter, org.jboss.bootstrap.spi.Server, JMXKernelMBean, ServerImplMBean, org.jboss.util.JBossInterface

public class JMXKernel
extends org.jboss.util.JBossObject
implements JMXKernelMBean, 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: 85945 $
Author:
Scott.Stark@jboss.org

Field Summary
 
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.bootstrap.spi.Server
START_NOTIFICATION_TYPE, STOP_NOTIFICATION_TYPE
 
Constructor Summary
JMXKernel()
           
 
Method Summary
 void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback)
           
 void exit()
           
 void exit(int exitcode)
           
 String getBuildDate()
           
 String getBuildID()
           
 String getBuildJVM()
           
 String getBuildNumber()
           
 String getBuildOS()
           
 org.jboss.bootstrap.spi.ServerConfig getConfig()
           
 MBeanServer getMbeanServer()
           
 Map<String,Object> getMetaData()
          Get the optional server configuration metadata
 MBeanNotificationInfo[] getNotificationInfo()
           
 org.jboss.bootstrap.spi.ServerProcess getServerImpl()
           
 ServerInfoMBean getServerInfo()
           
 ServiceControllerMBean getServiceController()
           
 Date getStartDate()
           
 String getVersion()
           
 String getVersionName()
           
 String getVersionNumber()
           
 void halt()
           
 void halt(int exitcode)
           
 void init(Properties props)
           
 void init(Properties props, Map<String,Object> metaData)
          Initialize the Server instance.
 boolean isInShutdown()
           
 boolean isOldClassLoader()
           
 boolean isStarted()
           
protected  void removeMBeans()
          The removeMBeans method uses the mbean mbeanServer to unregister all the mbeans registered here.
 void removeNotificationListener(NotificationListener listener)
           
 void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback)
           
 void runFinalization()
          Hint to the JVM to run any pending object finailizations.
 void runGarbageCollector()
          Hint to the JVM to run the garbage collector.
 void setKernel(org.jboss.kernel.Kernel kernel)
          Set the kernel.
 void setOldClassLoader(boolean oldClassLoader)
           
 void setServerImpl(org.jboss.bootstrap.spi.ServerProcess serverImpl)
           
 void setServerInfo(ServerInfoMBean serverInfo)
           
 void shutdown()
           
protected  void shutdownServices()
          The shutdownServices method calls the one and only ServiceController to shut down all the mbeans registered with it.
 void start()
           
 void stop()
          Stop the mbeans
 void traceInstructions(Boolean flag)
          Enable or disable tracing instructions the Runtime level.
 void traceMethodCalls(Boolean flag)
          Enable or disable tracing method calls at the Runtime level.
 
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
 

Constructor Detail

JMXKernel

public JMXKernel()
Method Detail

getServerImpl

public org.jboss.bootstrap.spi.ServerProcess getServerImpl()

setServerImpl

public void setServerImpl(org.jboss.bootstrap.spi.ServerProcess serverImpl)

getServiceController

public ServiceControllerMBean getServiceController()

getMbeanServer

public MBeanServer getMbeanServer()

getMetaData

public Map<String,Object> getMetaData()
Get the optional server configuration metadata

Specified by:
getMetaData in interface org.jboss.bootstrap.spi.Server
Returns:
a possibly empty map of configuration metadata.

getServerInfo

public ServerInfoMBean getServerInfo()

init

public void init(Properties props,
                 Map<String,Object> metaData)
          throws IllegalStateException,
                 Exception
Initialize the Server instance.

Specified by:
init in interface org.jboss.bootstrap.spi.Server
Parameters:
props - The configuration properties for the server.
metadata - configuration metadata for the server
Throws:
IllegalStateException - Already initialized.
Exception - Failed to initialize.

setServerInfo

public void setServerInfo(ServerInfoMBean serverInfo)

setKernel

public void setKernel(org.jboss.kernel.Kernel kernel)
Set the kernel.

Parameters:
kernel - the kernel.

isOldClassLoader

public boolean isOldClassLoader()

setOldClassLoader

public void setOldClassLoader(boolean oldClassLoader)

start

public void start()
           throws Exception
Specified by:
start in interface org.jboss.bootstrap.spi.Server
Throws:
Exception

stop

public void stop()
          throws IllegalStateException
Stop the mbeans

Throws:
IllegalStateException - - if not started.

addNotificationListener

public void addNotificationListener(NotificationListener listener,
                                    NotificationFilter filter,
                                    Object handback)
Specified by:
addNotificationListener in interface NotificationBroadcaster

removeNotificationListener

public void removeNotificationListener(NotificationListener listener)
                                throws ListenerNotFoundException
Specified by:
removeNotificationListener in interface NotificationBroadcaster
Throws:
ListenerNotFoundException

removeNotificationListener

public void removeNotificationListener(NotificationListener listener,
                                       NotificationFilter filter,
                                       Object handback)
                                throws ListenerNotFoundException
Specified by:
removeNotificationListener in interface NotificationEmitter
Throws:
ListenerNotFoundException

getNotificationInfo

public MBeanNotificationInfo[] getNotificationInfo()
Specified by:
getNotificationInfo in interface NotificationBroadcaster

init

public void init(Properties props)
          throws Exception
Specified by:
init in interface org.jboss.bootstrap.spi.Server
Throws:
Exception

exit

public void exit()

exit

public void exit(int exitcode)

getConfig

public org.jboss.bootstrap.spi.ServerConfig getConfig()
Specified by:
getConfig in interface org.jboss.bootstrap.spi.Server

getBuildDate

public String getBuildDate()
Specified by:
getBuildDate in interface org.jboss.bootstrap.spi.Server

getBuildID

public String getBuildID()
Specified by:
getBuildID in interface org.jboss.bootstrap.spi.Server

getBuildJVM

public String getBuildJVM()
Specified by:
getBuildJVM in interface org.jboss.bootstrap.spi.Server

getBuildNumber

public String getBuildNumber()
Specified by:
getBuildNumber in interface org.jboss.bootstrap.spi.Server

getBuildOS

public String getBuildOS()
Specified by:
getBuildOS in interface org.jboss.bootstrap.spi.Server

getStartDate

public Date getStartDate()
Specified by:
getStartDate in interface org.jboss.bootstrap.spi.Server

getVersion

public String getVersion()
Specified by:
getVersion in interface org.jboss.bootstrap.spi.Server

getVersionName

public String getVersionName()
Specified by:
getVersionName in interface org.jboss.bootstrap.spi.Server

getVersionNumber

public String getVersionNumber()
Specified by:
getVersionNumber in interface org.jboss.bootstrap.spi.Server

halt

public void halt()

halt

public void halt(int exitcode)

isInShutdown

public boolean isInShutdown()
Specified by:
isInShutdown in interface org.jboss.bootstrap.spi.Server

isStarted

public boolean isStarted()
Specified by:
isStarted in interface org.jboss.bootstrap.spi.Server

runFinalization

public void runFinalization()
Description copied from interface: ServerImplMBean
Hint to the JVM to run any pending object finailizations.

Specified by:
runFinalization in interface ServerImplMBean

runGarbageCollector

public void runGarbageCollector()
Description copied from interface: ServerImplMBean
Hint to the JVM to run the garbage collector.

Specified by:
runGarbageCollector in interface ServerImplMBean

traceInstructions

public void traceInstructions(Boolean flag)
Description copied from interface: ServerImplMBean
Enable or disable tracing instructions the Runtime level.

Specified by:
traceInstructions in interface ServerImplMBean

traceMethodCalls

public void traceMethodCalls(Boolean flag)
Description copied from interface: ServerImplMBean
Enable or disable tracing method calls at the Runtime level.

Specified by:
traceMethodCalls in interface ServerImplMBean

shutdown

public void shutdown()
Specified by:
shutdown in interface org.jboss.bootstrap.spi.Server

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.



Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.