Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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 $`
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

    public 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

    public 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

    public void init(Properties props)
              throws IllegalStateException,
                     Exception

  Initialize the Server instance.

  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.

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

### start

    public void start()
               throws IllegalStateException,
                      Exception

  Start the Server instance.

  Throws:
    `IllegalStateException` - Already started or not initialized.
    `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 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

    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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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