org.jboss.system.server
Interface Server

All Known Implementing Classes:
ServerImpl

public interface Server

The interface of the basic JBoss server component.

Version:
$Revision: 1.4.6.1 $
Author:
Jason Dillon

Field Summary
static String START_NOTIFICATION_TYPE
          The JMX notification event type sent on end of server startup
static String STOP_NOTIFICATION_TYPE
          The JMX notification event type sent on begin of the server shutdown
 
Method Summary
 void exit(int exitcode)
          Shutdown the server, the JVM and run shutdown hooks.
 ServerConfig getConfig()
          Get the typed server configuration object which the server has been initalized to use.
 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 shutdown()
          Shutdown the Server instance and run shutdown hooks.
 void start()
          Start the Server instance.
 

Field Detail

START_NOTIFICATION_TYPE

static final String START_NOTIFICATION_TYPE
The JMX notification event type sent on end of server startup

See Also:
Constant Field Values

STOP_NOTIFICATION_TYPE

static final String STOP_NOTIFICATION_TYPE
The JMX notification event type sent on begin of the server shutdown

See Also:
Constant Field Values
Method Detail

init

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

Parameters:
props - The configuration properties for the server.
Throws:
IllegalStateException - Already initialized.
Exception - Failed to initialize.

getConfig

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

Returns:
Typed server configuration object.
Throws:
IllegalStateException - Not initialized.

start

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

Throws:
IllegalStateException - Already started or not initialized.
Exception - Failed to start.

isStarted

boolean isStarted()
Check if the server is started.

Returns:
True if the server is started, else false.

shutdown

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.

Throws:
IllegalStateException - No started.

exit

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

Parameters:
exitcode - The exit code returned to the operating system.

halt

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

Parameters:
exitcode - The exit code returned to the operating system.


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