org.apache.clerezza.jaxrs.testutils
Class TestWebServer

java.lang.Object
  extended by org.apache.clerezza.jaxrs.testutils.TestWebServer

public class TestWebServer
extends Object

Creates a single webserver, the webserver is stopped when the instance is garbage collected

Author:
reto

Constructor Summary
TestWebServer(javax.ws.rs.core.Application application)
          starts a webserver for the given jax-rs application
 
Method Summary
protected  void finalize()
           
 int getPort()
          A TestWebServer gets a free port on start-up
 void stop()
          stops the webserver
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestWebServer

public TestWebServer(javax.ws.rs.core.Application application)
starts a webserver for the given jax-rs application

Parameters:
application - the application to be exposed
Method Detail

getPort

public int getPort()
A TestWebServer gets a free port on start-up

Returns:
the port the webserver is listening to

finalize

protected void finalize()
                 throws Throwable
Overrides:
finalize in class Object
Throws:
Throwable

stop

public void stop()
stops the webserver



Copyright © 2012 The Apache Software Foundation. All Rights Reserved.