public abstract class AbstractServerImpl extends NotificationBroadcasterSupport implements ServerProcess, NotificationEmitter
| Modifier and Type | Field and Description |
|---|---|
protected org.jboss.logging.Logger |
log
Instance logger.
|
START_NOTIFICATION_TYPE, STOP_NOTIFICATION_TYPE| Constructor and Description |
|---|
AbstractServerImpl()
No-arg constructor for ServerImpl
|
| Modifier and Type | Method and Description |
|---|---|
void |
addBootstrap(Bootstrap bootstrap)
Add a bootstrap
|
protected abstract void |
doShutdown()
Override to perform the shutdown
|
protected abstract void |
doStart(org.jboss.util.StopWatch watch)
Override to perform the start operations
|
void |
exit()
Exit the JVM with code 1, run shutdown hooks, shutdown the server.
|
void |
exit(int exitcode)
Exit the JVM, run shutdown hooks, shutdown the server.
|
String |
getBuildDate()
The server build date
|
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 |
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 by calling init(props, null);
|
void |
init(Properties props,
Map<String,Object> metadata)
Initialize the Server instance.
|
boolean |
isInShutdown()
Check if the shutdown operation has been called/is in progress.
|
boolean |
isStarted()
Check if the server is started.
|
void |
removeBootstrap(Bootstrap bootstrap)
Remove a bootstrap
|
void |
runFinalization()
Hint to the JVM to run any pending object finalizations.
|
void |
runGarbageCollector()
Hint to the JVM to run the garbage collector.
|
void |
setMetaData(Map<String,Object> metadata)
Set the server configuration metadata
|
void |
shutdown()
Shutdown the Server instance and run shutdown hooks.
|
protected void |
shutdownServer()
Shutdown the server
|
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.
|
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotificationclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitremoveNotificationListeneraddNotificationListener, getNotificationInfo, removeNotificationListenerpublic void addBootstrap(Bootstrap bootstrap)
bootstrap - the bootstrapIllegalArgumentException - for a null bootstrappublic void removeBootstrap(Bootstrap bootstrap)
bootstrap - the bootstrapIllegalArgumentException - for a null bootstrappublic void init(Properties props) throws IllegalStateException, Exception
init in interface Serverprops - The configuration properties for the server.IllegalStateException - Already initialized.Exception - Failed to initialize.public void init(Properties props, Map<String,Object> metadata) throws IllegalStateException, Exception
init in interface Serverprops - - The configuration properties for the server.metadata - configuration metadata for the serverIllegalStateException - Already initialized.Exception - Failed to initialize.public ServerConfig getConfig() throws IllegalStateException
getConfig in interface ServerIllegalStateException - Not initialized.public Map<String,Object> getMetaData()
getMetaData in interface Serverpublic void setMetaData(Map<String,Object> metadata)
metadata - public boolean isStarted()
public boolean isInShutdown()
isInShutdown in interface Serverpublic void start()
throws IllegalStateException,
Exception
start in interface ServerIllegalStateException - Already started or not initialized.Exception - Failed to start.protected abstract void doStart(org.jboss.util.StopWatch watch)
throws Throwable
watch - the stop watchThrowable - for any errorprotected abstract void doShutdown()
protected void shutdownServer()
public void shutdown()
throws IllegalStateException
If the exit on shutdown flag is true, then exit()
is called, else only the shutdown hook is run.
shutdown in interface ServerIllegalStateException - No started.public void exit(int exitcode)
exit in interface ServerProcessexitcode - The exit code returned to the operating system.public void exit()
exit in interface ServerProcesspublic void halt(int exitcode)
halt in interface ServerProcessexitcode - The exit code returned to the operating system.public void halt()
halt in interface ServerProcesspublic void runGarbageCollector()
public void runFinalization()
public void traceMethodCalls(Boolean flag)
flag - whether to enable tracepublic void traceInstructions(Boolean flag)
flag - whether to enable tracepublic Date getStartDate()
getStartDate in interface Serverpublic String getVersion()
getVersion in interface Serverpublic String getVersionName()
getVersionName in interface Serverpublic String getVersionNumber()
getVersionNumber in interface Serverpublic String getBuildNumber()
getBuildNumber in interface Serverpublic String getBuildJVM()
getBuildJVM in interface Serverpublic String getBuildOS()
getBuildOS in interface Serverpublic String getBuildID()
getBuildID in interface Serverpublic String getBuildDate()
getBuildDate in interface ServerCopyright © 2012 JBoss by Red Hat. All Rights Reserved.