站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 3.2.7 system API Documentation 英文版文档

ServerImpl (JBoss System API) - JBoss 3.2.7 system API Documentation 英文版文档


org.jboss.system.server
Class ServerImpl

java.lang.Object
  extended byorg.jboss.system.server.ServerImpl
All Implemented Interfaces:
javax.management.NotificationBroadcaster, Server, ServerImplMBean

public class ServerImpl
extends Object
implements Server, ServerImplMBean, javax.management.NotificationBroadcaster

The main container component of a JBoss server instance.

Concurrency

This class is not thread-safe.

Version:
$Revision: 1.25.2.28 $
Author:
Marc Fleury, Jason Dillon, Scott.Stark@jboss.org, Andrew C. Oliver (minor changes only)

Field Summary
 
Fields inherited from interface org.jboss.system.server.Server
START_NOTIFICATION_TYPE, STOP_NOTIFICATION_TYPE
 
Fields inherited from interface org.jboss.system.server.ServerImplMBean
OBJECT_NAME
 
Constructor Summary
ServerImpl()
          No-arg constructor for ServerLoader.
 
Method Summary
 void addNotificationListener(javax.management.NotificationListener listener, javax.management.NotificationFilter filter, Object handback)
           
 void exit()
          Shutdown the server, the JVM and run shutdown hooks.
 void exit(int exitcode)
          Shutdown the server, the JVM and run shutdown hooks.
 String getBuildDate()
           
 String getBuildID()
           
 String getBuildJVM()
           
 String getBuildNumber()
           
 String getBuildOS()
           
 ServerConfig getConfig()
          Get the typed server configuration object which the server has been initalized to use.
 javax.management.MBeanNotificationInfo[] getNotificationInfo()
           
 Date getStartDate()
           
 String getVersion()
           
 String getVersionName()
           
 void halt()
          Forcibly terminates the currently running Java virtual machine.
 void halt(int exitcode)
          Forcibly terminates the currently running Java virtual machine.
 void init(Properties props)
          Initialize the Server instance.
 boolean isStarted()
          Check if the server is started.
 void removeNotificationListener(javax.management.NotificationListener listener)
           
 void runFinalization()
          Hint to the JVM to run any pending object finailizations.
 void runGarbageCollector()
          Hint to the JVM to run the garbage collector.
 void sendNotification(javax.management.Notification notification)
           
 void shutdown()
          Shutdown the Server instance and run shutdown hooks.
 void start()
          Start the Server instance.
 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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerImpl

public ServerImpl()
No-arg constructor for ServerLoader.

Method Detail

init

public void init(Properties props)
          throws IllegalStateException,
                 Exception
Initialize the Server instance.

Specified by:
init in interface Server
Parameters:
props - The configuration properties for the server.
Returns:
Typed server configuration object.
Throws:
IllegalStateException - Already initialized.
Exception - Failed to initialize.

getConfig

public ServerConfig getConfig()
                       throws IllegalStateException
Get the typed server configuration object which the server has been initalized to use.

Specified by:
getConfig in interface Server
Returns:
Typed server configuration object.
Throws:
IllegalStateException - Not initialized.

isStarted

public boolean isStarted()
Check if the server is started.

Specified by:
isStarted in interface Server
Returns:
True if the server is started, else false.

start

public void start()
           throws IllegalStateException,
                  Exception
Start the Server instance.

Specified by:
start in interface Server
Throws:
IllegalStateException - Already started or not initialized.
Exception - Failed to start.

shutdown

public void shutdown()
              throws IllegalStateException
Shutdown the Server instance and run shutdown hooks.

If the exit on shutdown flag is true, then exit(int) is called, else only the shutdown hook is run.

Specified by:
shutdown in interface Server
Throws:
IllegalStateException - No started.

exit

public void exit(int exitcode)
Shutdown the server, the JVM and run shutdown hooks.

Specified by:
exit in interface Server
Parameters:
exitcode - The exit code returned to the operating system.

exit

public void exit()
Shutdown the server, the JVM and run shutdown hooks. Exits with code 1.

Specified by:
exit in interface ServerImplMBean

halt

public void halt(int exitcode)
Forcibly terminates the currently running Java virtual machine.

Specified by:
halt in interface Server
Parameters:
exitcode - The exit code returned to the operating system.

halt

public void halt()
Forcibly terminates the currently running Java virtual machine. Exits with code 1.

Specified by:
halt in interface ServerImplMBean

runGarbageCollector

public void runGarbageCollector()
Hint to the JVM to run the garbage collector.

Specified by:
runGarbageCollector in interface ServerImplMBean

runFinalization

public void runFinalization()
Hint to the JVM to run any pending object finailizations.

Specified by:
runFinalization in interface ServerImplMBean

traceMethodCalls

public void traceMethodCalls(Boolean flag)
Enable or disable tracing method calls at the Runtime level.

Specified by:
traceMethodCalls in interface ServerImplMBean

traceInstructions

public void traceInstructions(Boolean flag)
Enable or disable tracing instructions the Runtime level.

Specified by:
traceInstructions in interface ServerImplMBean

getStartDate

public Date getStartDate()
Specified by:
getStartDate in interface ServerImplMBean

getVersion

public String getVersion()
Specified by:
getVersion in interface ServerImplMBean

getVersionName

public String getVersionName()
Specified by:
getVersionName in interface ServerImplMBean

getBuildNumber

public String getBuildNumber()
Specified by:
getBuildNumber in interface ServerImplMBean

getBuildJVM

public String getBuildJVM()
Specified by:
getBuildJVM in interface ServerImplMBean

getBuildOS

public String getBuildOS()
Specified by:
getBuildOS in interface ServerImplMBean

getBuildID

public String getBuildID()
Specified by:
getBuildID in interface ServerImplMBean

getBuildDate

public String getBuildDate()
Specified by:
getBuildDate in interface ServerImplMBean

addNotificationListener

public void addNotificationListener(javax.management.NotificationListener listener,
                                    javax.management.NotificationFilter filter,
                                    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

getNotificationInfo

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

sendNotification

public void sendNotification(javax.management.Notification notification)


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.