org.radrails.server.core.webrick
Class WEBrickServer

java.lang.Object
  extended byjava.util.Observable
      extended byorg.radrails.server.core.Server
          extended byorg.radrails.server.core.webrick.WEBrickServer
All Implemented Interfaces:
java.io.Serializable

public class WEBrickServer
extends Server

Concrete implementation of a WEBrick server. Uses the script/server file in the associated project directory to run the server.

Author:
mkent
See Also:
Serialized Form

Constructor Summary
WEBrickServer(java.io.File project)
          Constructor.
WEBrickServer(java.io.File project, java.lang.String name, java.lang.String port)
          Constructor.
WEBrickServer(java.io.File project, java.lang.String name, java.lang.String port, java.lang.String environment)
          Constructor.
 
Method Summary
 void start()
          Starts the server.
 void stop()
          Stops the server.
 
Methods inherited from class org.radrails.server.core.Server
getEnvironment, getName, getPort, getProject, getStatus, getType, isStarted, isStopped, touch, updateEnvironment, updateName, updatePort, updateStatus
 
Methods inherited from class java.util.Observable
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WEBrickServer

public WEBrickServer(java.io.File project,
                     java.lang.String name,
                     java.lang.String port,
                     java.lang.String environment)
Constructor.

Parameters:
project - the location of the project the server is associated with
name - the name of the server

WEBrickServer

public WEBrickServer(java.io.File project,
                     java.lang.String name,
                     java.lang.String port)
Constructor. Environment defaults to development.

Parameters:
project - the location of the project the server is associated with
name - the name of the server
port - the number of the port the server runs on

WEBrickServer

public WEBrickServer(java.io.File project)
Constructor. Name defaults to projectNameServer, port defaults to next available, and environment defaults to development.

Parameters:
project - the location of the project the server is associated with
Method Detail

start

public void start()
Description copied from class: Server
Starts the server. Subclass implementations must call setChanged and notifyObservers after the server is started. Pass {IServerConstants.UPDATE as the second argument to notifyObservers.

Specified by:
start in class Server

stop

public void stop()
Description copied from class: Server
Stops the server. Subclass implementations must call setChanged and notifyObservers after the server is started. Pass IServerConstants.UPDATE as the second argument to notifyObservers.

Specified by:
stop in class Server