|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.anteater.test.ServletContainer
Start an embedded Tomcat servlet container.
Tomcat will start executing in a parallel thread with the main
Ant thread. Incoming HTTP requests are received by Tomcat, which
will create a new thread for serving the request. The servlet which
gets executed will always be
.
ListenerProxyServlet
When a listener
element is executed by Ant, the
execution will stop until an HTTP request is received by
Tomcat. When this happens,
will pass to
the ListenerProxyServlet
Listener
instance the received HTTP message. This
in turn will pass the object to the embedded MatcherSet
,
for the matching process to start.
Responses are serialized from the Ant thread into the ListenerProxyServlet
thread, using a
object. The servlet thread
will in turn write the data back to the HTTP client.
PipedWriter
ListenerProxyServlet
Constructor Summary | |
ServletContainer()
|
Method Summary | |
void |
addContext(String path,
String docBase,
BaseTask task)
|
void |
debug(String msg)
|
int |
getDefaultPort()
Returns the first port declared with setPort(java.lang.String) or DEFAULT_PORT. |
Hashtable |
getRegisteredListeners()
|
Queue |
getRequestsQueue()
|
static ServletContainer |
getServletContainer()
Factory method returning the currently active ServletContainer. |
boolean |
isStarted()
Whether this Tomcat has been initialized and started. |
static void |
main(String[] args)
|
void |
println(String msg)
|
void |
registerListener(Listener listener)
|
void |
removeContext(String path,
BaseTask task)
|
void |
removeListener(Listener listener)
|
void |
setMaxSpareThreads(int maxSpareThreads)
|
void |
setMaxThreads(int maxThreads)
|
void |
setMinSpareThreads(int minSpareThreads)
|
void |
setPort(String ports)
|
void |
start()
|
void |
stop()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ServletContainer()
Method Detail |
public static ServletContainer getServletContainer()
public Queue getRequestsQueue()
public void registerListener(Listener listener)
public void removeListener(Listener listener)
public Hashtable getRegisteredListeners()
public void setPort(String ports) throws org.apache.tools.ant.BuildException
org.apache.tools.ant.BuildException
public int getDefaultPort()
setPort(java.lang.String)
or DEFAULT_PORT.
public void setMaxThreads(int maxThreads)
public void setMaxSpareThreads(int maxSpareThreads)
public void setMinSpareThreads(int minSpareThreads)
public void addContext(String path, String docBase, BaseTask task)
public void removeContext(String path, BaseTask task)
public void start()
public boolean isStarted()
public void debug(String msg)
public void println(String msg)
public void stop()
public static void main(String[] args) throws Exception
Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |