|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.ejb3.testremote.server.MockServerController
public class MockServerController
MockServerController
Controls the startup/shutdown of the MockServer
Constructor Summary | |
---|---|
MockServerController(String host,
int port)
Constructor Creates a Client to send requests to the remote MockServer |
Method Summary | |
---|---|
int |
getServerStartupTimeout()
Returns the timeout set for the server startup. |
int |
getServerStopTimeout()
Returns the timeout set for server to stop |
protected void |
sendStartRequestToServer()
Sends a MockServer.MockServerRequest.START to the server |
protected void |
sendStopRequestToServer()
Sends a MockServer.MockServerRequest.STOP to the server |
void |
setServerStartupTimeout(int timeout)
Sets the timeout for the server startup. |
void |
setServerStopTimeout(int timeout)
Sets the timeout for the server to stop. |
void |
startServer(Class<? extends MockServer> serverClass)
Creates a remote process (JVM) to launch the MockServer
and then sends a MockServer.MockServerRequest.START request to start the
server |
void |
startServer(Class<? extends MockServer> serverClass,
String[] arguments)
Creates a remote process (JVM) to launch the MockServer
and then sends a MockServer.MockServerRequest.START request to start the
server |
void |
startServer(String envVarJavaHome,
Class<? extends MockServer> serverClass)
|
void |
startServer(String envVarJavaHome,
Class<? extends MockServer> serverClass,
String[] arguments)
Creates a remote process (JVM) to launch the MockServer
and then sends a MockServer.MockServerRequest.START request to start the
server |
void |
stopServer()
Sends a MockServer.MockServerRequest.STOP request to the server
and also kills the process in whic the server was running |
void |
stopServer(boolean killProcess)
Sends a MockServer.MockServerRequest.STOP request to the server
and if the killProcess is true then it also kills
the process in which the server was running. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MockServerController(String host, int port)
Client
to send requests to the remote MockServer
host
- The host on which the MockServer
is availableport
- The port on which the MockServer
is listeningMethod Detail |
---|
public void startServer(Class<? extends MockServer> serverClass) throws Throwable
MockServer
and then sends a MockServer.MockServerRequest.START
request to start the
server
serverClass
- The class of the server to be used
Throwable
public void startServer(Class<? extends MockServer> serverClass, String[] arguments) throws Throwable
MockServer
and then sends a MockServer.MockServerRequest.START
request to start the
server
envJarJavaHome
- Name of the Environment Variable pointing to the JVM to be used
in starting the serverserverClass
- The class of the server to be used
Throwable
public void startServer(String envVarJavaHome, Class<? extends MockServer> serverClass) throws Throwable
Throwable
public void startServer(String envVarJavaHome, Class<? extends MockServer> serverClass, String[] arguments) throws Throwable
MockServer
and then sends a MockServer.MockServerRequest.START
request to start the
server
envJarJavaHome
- Name of the Environment Variable pointing to the JVM to be used
in starting the serverserverClass
- The class of the server to be usedarguments
- The arguments that will be passed to the MockServer
as JVM program arguments
Throwable
public void stopServer() throws Throwable
MockServer.MockServerRequest.STOP
request to the server
and also kills the process in whic the server was running
Throwable
stopServer(boolean)
public void stopServer(boolean killProcess) throws Throwable
MockServer.MockServerRequest.STOP
request to the server
and if the killProcess
is true then it also kills
the process in which the server was running.
killProcess
- If true, kills the process in which the MockServer
was running. Else, just sends a MockServer.MockServerRequest.STOP
request
to the server.
Throwable
public void setServerStartupTimeout(int timeout)
#startServer(String[])
method,
for the timeout to be considered.
timeout
- The timeout value in milli seconds.public int getServerStartupTimeout()
public int getServerStopTimeout()
public void setServerStopTimeout(int timeout)
stopServer()
method,
for the timeout to be considered.
timeout
- The timeout value in milli seconds.protected void sendStopRequestToServer() throws Throwable
MockServer.MockServerRequest.STOP
to the server
Throwable
protected void sendStartRequestToServer() throws Throwable
MockServer.MockServerRequest.START
to the server
Throwable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |