|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.management.NotificationBroadcasterSupport
org.jboss.bootstrap.AbstractServerImpl
public abstract class AbstractServerImpl
A Server implementation that uses the deployer-beans.xml and ProfileService to boot the server.
Field Summary | |
---|---|
protected org.jboss.logging.Logger |
log
Instance logger. |
Fields inherited from interface org.jboss.bootstrap.spi.Server |
---|
START_NOTIFICATION_TYPE, STOP_NOTIFICATION_TYPE |
Constructor Summary | |
---|---|
AbstractServerImpl()
No-arg constructor for ServerImpl |
Method Summary | |
---|---|
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. |
Methods inherited from class javax.management.NotificationBroadcasterSupport |
---|
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.management.NotificationEmitter |
---|
removeNotificationListener |
Methods inherited from interface javax.management.NotificationBroadcaster |
---|
addNotificationListener, getNotificationInfo, removeNotificationListener |
Field Detail |
---|
protected org.jboss.logging.Logger log
Constructor Detail |
---|
public AbstractServerImpl()
Method Detail |
---|
public void addBootstrap(Bootstrap bootstrap)
bootstrap
- the bootstrap
IllegalArgumentException
- for a null bootstrappublic void removeBootstrap(Bootstrap bootstrap)
bootstrap
- the bootstrap
IllegalArgumentException
- for a null bootstrappublic void init(Properties props) throws IllegalStateException, Exception
init
in interface Server
props
- 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 Server
props
- - The configuration properties for the server.metadata
- configuration metadata for the server
IllegalStateException
- Already initialized.
Exception
- Failed to initialize.public ServerConfig getConfig() throws IllegalStateException
getConfig
in interface Server
IllegalStateException
- Not initialized.public Map<String,Object> getMetaData()
getMetaData
in interface Server
public void setMetaData(Map<String,Object> metadata)
metadata
- public boolean isStarted()
isStarted
in interface Server
public boolean isInShutdown()
isInShutdown
in interface Server
public void start() throws IllegalStateException, Exception
start
in interface Server
IllegalStateException
- Already started or not initialized.
Exception
- Failed to start.protected abstract void doStart(org.jboss.util.StopWatch watch) throws Throwable
watch
- the stop watch
Throwable
- 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 Server
IllegalStateException
- No started.public void exit(int exitcode)
exit
in interface ServerProcess
exitcode
- The exit code returned to the operating system.public void exit()
exit
in interface ServerProcess
public void halt(int exitcode)
halt
in interface ServerProcess
exitcode
- The exit code returned to the operating system.public void halt()
halt
in interface ServerProcess
public 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 Server
public String getVersion()
getVersion
in interface Server
public String getVersionName()
getVersionName
in interface Server
public String getVersionNumber()
getVersionNumber
in interface Server
public String getBuildNumber()
getBuildNumber
in interface Server
public String getBuildJVM()
getBuildJVM
in interface Server
public String getBuildOS()
getBuildOS
in interface Server
public String getBuildID()
getBuildID
in interface Server
public String getBuildDate()
getBuildDate
in interface Server
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |