org.openqa.grid.web
Class Hub

java.lang.Object
  extended by org.openqa.grid.web.Hub

public class Hub
extends Object

Jetty server. Main entry point for everything about the grid. Except for unit tests, this should be a singleton.


Method Summary
static Map<String,Integer> getGrid1Config()
           
static Map<String,String> getGrid1Mapping()
           
 String getHost()
           
static Hub getInstance()
           
static Hub getNewInstanceForTest(int port, Registry registry)
          Create a new instance on the given port, with the given registry.
 int getPort()
           
 URL getRegistrationURL()
           
 Registry getRegistry()
          get the registry backing up the hub state.
 URL getUrl()
           
protected  void loadGrid1Config()
           
 void registerServlets(List<String> servlets)
          Configure the hub based on the parameter passed at launch.
 void setPort(int port)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static Hub getInstance()

getRegistry

public Registry getRegistry()
get the registry backing up the hub state.

Returns:

getNewInstanceForTest

public static Hub getNewInstanceForTest(int port,
                                        Registry registry)
Create a new instance on the given port, with the given registry. Allow several hub to run on the same machine without interacting with each other. Useless in a normal use. Convenient for testing

Parameters:
port -
registry -

getPort

public int getPort()

getHost

public String getHost()

start

public void start()
           throws Exception
Throws:
Exception

stop

public void stop()
          throws Exception
Throws:
Exception

getUrl

public URL getUrl()

getRegistrationURL

public URL getRegistrationURL()

getGrid1Mapping

public static Map<String,String> getGrid1Mapping()

getGrid1Config

public static Map<String,Integer> getGrid1Config()

loadGrid1Config

protected void loadGrid1Config()

registerServlets

public void registerServlets(List<String> servlets)
Configure the hub based on the parameter passed at launch.

Parameters:
args -

setPort

public void setPort(int port)


Copyright © 2011. All Rights Reserved.