|
||||||||
| 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(java.lang.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(java.lang.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(java.lang.Class<? extends MockServer> serverClass,
java.lang.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(java.lang.String envVarJavaHome,
java.lang.Class<? extends MockServer> serverClass)
|
void |
startServer(java.lang.String envVarJavaHome,
java.lang.Class<? extends MockServer> serverClass,
java.lang.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(java.lang.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 listening| Method Detail |
|---|
public void startServer(java.lang.Class<? extends MockServer> serverClass)
throws java.lang.Throwable
MockServer
and then sends a MockServer.MockServerRequest.START request to start the
server
serverClass - The class of the server to be used
java.lang.Throwable
public void startServer(java.lang.Class<? extends MockServer> serverClass,
java.lang.String[] arguments)
throws java.lang.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
java.lang.Throwable
public void startServer(java.lang.String envVarJavaHome,
java.lang.Class<? extends MockServer> serverClass)
throws java.lang.Throwable
java.lang.Throwable
public void startServer(java.lang.String envVarJavaHome,
java.lang.Class<? extends MockServer> serverClass,
java.lang.String[] arguments)
throws java.lang.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
java.lang.Throwable
public void stopServer()
throws java.lang.Throwable
MockServer.MockServerRequest.STOP request to the server
and also kills the process in whic the server was running
java.lang.ThrowablestopServer(boolean)
public void stopServer(boolean killProcess)
throws java.lang.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.
java.lang.Throwablepublic 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 java.lang.Throwable
MockServer.MockServerRequest.STOP to the server
java.lang.Throwable
protected void sendStartRequestToServer()
throws java.lang.Throwable
MockServer.MockServerRequest.START to the server
java.lang.Throwable
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||