public abstract class ServerBase extends Object implements Server
Server implementationsMETHOD_NAME_START, METHOD_NAME_STOP, METHOD_PARAMS_START, METHOD_PARAMS_STOP| Constructor and Description |
|---|
ServerBase(InetSocketAddress bindAddress)
Creates a new instance, to be bound on start at the specified, required
InetSocketAddress |
| Modifier and Type | Method and Description |
|---|---|
protected Serializable |
executeTest(String archiveId,
String testClassName,
String methodName)
Executes the specified method name on the specified test class upon the archive with the specified archive ID in
an isolated ClassLoader containing only the archive's contents and the bootstrap
ClassLoader. |
protected InetSocketAddress |
getBindAddress()
The address configured to which we should bind
|
InetSocketAddress |
getBoundAddress()
Obtains the address to which the current running server is bound
|
protected ConcurrentMap<String,org.jboss.shrinkwrap.api.GenericArchive> |
getDeployedArchives() |
protected org.jboss.shrinkwrap.api.Domain |
getShrinkwrapDomain() |
boolean |
isRunning()
Returns whether or not the server is running
|
protected void |
setBoundAddress(InetSocketAddress boundAddress) |
void |
start()
Starts the server
|
protected abstract void |
startInternal()
Starts the backend engine powering this
Server. |
void |
stop()
Stops the server
|
protected void |
stopAsync()
Asynchronously calls upon
Server.stop() |
protected abstract void |
stopInternal()
Stops the backend engine powering this
Server |
public ServerBase(InetSocketAddress bindAddress)
InetSocketAddressbindAddress - protected abstract void startInternal()
throws ServerLifecycleException,
IllegalStateException
Server. Must call upon
setBoundAddress(InetSocketAddress) to set the bound address.protected abstract void stopInternal()
throws ServerLifecycleException,
IllegalStateException
Serverpublic final void start()
throws ServerLifecycleException,
IllegalStateException
start in interface ServerServerLifecycleExceptionIllegalStateException - If the server is already runningServer.start()public final void stop()
throws ServerLifecycleException,
IllegalStateException
stop in interface ServerServerLifecycleExceptionIllegalStateException - If the server is not runningServer.stop()public final boolean isRunning()
Serverprotected final InetSocketAddress getBindAddress()
public final InetSocketAddress getBoundAddress() throws IllegalStateException
getBoundAddress in interface ServerIllegalStateException - If Server.isRunning() is falseServer.getBoundAddress()protected final void setBoundAddress(InetSocketAddress boundAddress)
boundAddress - the boundAddress to setprotected final ConcurrentMap<String,org.jboss.shrinkwrap.api.GenericArchive> getDeployedArchives()
protected final org.jboss.shrinkwrap.api.Domain getShrinkwrapDomain()
protected final Serializable executeTest(String archiveId, String testClassName, String methodName) throws IllegalStateException
ClassLoader. Note that
the system --classpath ClassLoader will not be visible to the test.archiveId - testClassName - methodName - IllegalStateExceptionprotected final void stopAsync()
Server.stop()Copyright © 2015 JBoss by Red Hat. All rights reserved.