org.stjs.testing.driver
Class HttpLongPollingServer

java.lang.Object
  extended by org.stjs.testing.driver.HttpLongPollingServer
All Implemented Interfaces:
AsyncProcess

public class HttpLongPollingServer
extends Object
implements AsyncProcess

Manages the HTTP server that is used to send tests to the browsers.

Author:
lordofthepigs

Field Summary
static String BLANK_URI
           
static String NEXT_TEST_URI
           
 
Constructor Summary
HttpLongPollingServer(DriverConfiguration config)
          Configures and starts the HTTP server
 
Method Summary
 long registerBrowserSession(LongPollingBrowser browser)
          Registers the specified browser session with this HTTP server, so that this server knows how to respond to HTTP requests containing the specified session's id.
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NEXT_TEST_URI

public static final String NEXT_TEST_URI
See Also:
Constant Field Values

BLANK_URI

public static final String BLANK_URI
See Also:
Constant Field Values
Constructor Detail

HttpLongPollingServer

public HttpLongPollingServer(DriverConfiguration config)
                      throws org.junit.runners.model.InitializationError
Configures and starts the HTTP server

Throws:
org.junit.runners.model.InitializationError
Method Detail

start

public void start()
           throws org.junit.runners.model.InitializationError
Specified by:
start in interface AsyncProcess
Throws:
org.junit.runners.model.InitializationError

registerBrowserSession

public long registerBrowserSession(LongPollingBrowser browser)
Registers the specified browser session with this HTTP server, so that this server knows how to respond to HTTP requests containing the specified session's id. This method is expected to be called many times in a row before any unit test is started, once per browser session.


stop

public void stop()
Specified by:
stop in interface AsyncProcess


Copyright © 2013. All Rights Reserved.