org.jboss.ejb3.testremote.server
Class MockServer

java.lang.Object
  extended by org.jboss.ejb3.testremote.server.MockServer

public class MockServer
extends Object

MockServer Launches a new MC Bootstrap, EJB Containers, and performs all initialization to mock a remote server environment

Version:
$Revision: $
Author:
ALR

Nested Class Summary
static class MockServer.MockServerRequest
          Various possible server requests
static class MockServer.MockServerStatus
          Various possible server status
 
Constructor Summary
MockServer()
          Required no-arg Constructor
 
Method Summary
protected  void acceptRequests()
          Start accepting requests
This is a blocking call and will wait for clients to connect
 org.jboss.ejb3.test.mc.bootstrap.EmbeddedTestMcBootstrap getBootstrap()
           
protected  String[] getCommandLineArgs()
           
 MockServer.MockServerStatus getStatus()
           
protected  void initialize()
          Initializes the instance by starting up an MC Bootstrap, deploying relevant *-beans.xml, creating and installing EJB Containers
static void main(String... args)
          Runtime Entry Point
 void setBootstrap(org.jboss.ejb3.test.mc.bootstrap.EmbeddedTestMcBootstrap bootstrap)
           
protected  void setCommandLineArgs(String[] commandLineArgs)
           
 void start()
          Starts the server
 void stop()
          Stops the server
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockServer

public MockServer()
Required no-arg Constructor

Method Detail

main

public static void main(String... args)
                 throws Throwable
Runtime Entry Point

Parameters:
args -
Throws:
Throwable

initialize

protected void initialize()
                   throws Throwable
Initializes the instance by starting up an MC Bootstrap, deploying relevant *-beans.xml, creating and installing EJB Containers

Throws:
Throwable

start

public void start()
           throws Throwable
Starts the server

Throws:
IllegalStateException - If the server is not in MockServerStatus.STOPPED state
Throwable

stop

public void stop()
Stops the server

Throws:
IllegalStateException - If the server is not in MockServerStatus.STARTED state

getStatus

public MockServer.MockServerStatus getStatus()
Returns:
Returns the current status of the server

acceptRequests

protected void acceptRequests()
                       throws Throwable
Start accepting requests
This is a blocking call and will wait for clients to connect

Throws:
Throwable
See Also:
Connector#start()}

getBootstrap

public org.jboss.ejb3.test.mc.bootstrap.EmbeddedTestMcBootstrap getBootstrap()

setBootstrap

public void setBootstrap(org.jboss.ejb3.test.mc.bootstrap.EmbeddedTestMcBootstrap bootstrap)

getCommandLineArgs

protected String[] getCommandLineArgs()

setCommandLineArgs

protected void setCommandLineArgs(String[] commandLineArgs)


Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.