org.jboss.bootstrap.spi
Interface Server

All Known Subinterfaces:
MCServer, ServerProcess
All Known Implementing Classes:
AbstractServerImpl, ServerImpl

public interface Server

The interface of the server loaded by the ServerLoader

Version:
$Revision: 83870 $
Author:
Jason Dillon, Scott.Stark@jboss.org
See Also:
ServerLoader

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
 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.
 Map<String,Object> getMetaData()
          Get the optional server configuration metadata
 Date getStartDate()
           
 String getVersion()
           
 String getVersionName()
           
 String getVersionNumber()
           
 void init(Properties props)
          Initialize the Server instance by calling #init(Properties, Map=null).
 void init(Properties props, Map<String,Object> metaData)
          Initialize the Server instance.
 boolean isInShutdown()
           
 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

getStartDate

Date getStartDate()
Returns:
The server start date

getVersion

String getVersion()
Returns:
The server version

getVersionName

String getVersionName()
Returns:
The server version code name

getVersionNumber

String getVersionNumber()
Returns:
The full server version number

getBuildNumber

String getBuildNumber()
Returns:
The date the server was build (compiled)

getBuildJVM

String getBuildJVM()
Returns:
The JVM used to build the server

getBuildOS

String getBuildOS()
Returns:
The Operating System used to build the server

getBuildID

String getBuildID()
Returns:
The build id

getBuildDate

String getBuildDate()
Returns:
The date the server was build

isInShutdown

boolean isInShutdown()
Returns:
A flag indicating if shutdown has been called

init

void init(Properties props)
          throws IllegalStateException,
                 Exception
Initialize the Server instance by calling #init(Properties, Map=null).

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

init

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

Parameters:
props - The configuration properties for the server.
metadata - configuration metadata 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.

getMetaData

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

Returns:
a possibly empty map of configuration metadata.

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() is called, else only the shutdown hook is run.

Throws:
IllegalStateException - No started.


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