org.jboss.system.server
Interface Server

All Known Implementing Classes:
ServerImpl (src)

public interface Server

The interface of the basic JBoss server component.


Field Summary
static java.lang.String START_NOTIFICATION_TYPE
          The JMX notification event type sent on end of server startup
static java.lang.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 (src) 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(java.util.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

public static final java.lang.String START_NOTIFICATION_TYPE
The JMX notification event type sent on end of server startup

See Also:
Constant Field Values (src)

STOP_NOTIFICATION_TYPE

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

See Also:
Constant Field Values (src)
Method Detail

init

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

Parameters:
props - The configuration properties for the server.
Returns:
Typed server configuration object.
Throws:
java.lang.IllegalStateException - Already initialized.
java.lang.Exception - Failed to initialize.

getConfig

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

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

start

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

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

isStarted

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

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

shutdown

public void shutdown()
              throws java.lang.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:
java.lang.IllegalStateException - No started.

exit

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

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

halt

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

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