org.apache.cactus.spi.client.connector
public interface: ProtocolHandler [javadoc |
source]
All Known Implementing Classes:
HttpProtocolHandler
Any communication protocol (e.g HTTP) used to connect between
Cactus client side and Cactus server side must implement this lifecycle
interface. This interface is part of the connector SPI.
Here is the lifecycle followed by Cactus core:
-
Call #createRequest to create a request object that will be
passed to the
begin() and beginXXX()
methods. They will in turn enrich it with values set by the user.
-
Call
begin() and beginXXX() methods.
-
Call #runTest to execute the tests.
-
Call #createResponseObjectFactory to create a factory that is
used to create a test response object that will be passed to the
endXXX() and end() methods.
-
Call
endXXX() and end() methods.
-
Call #afterTest to let the connector implementor clean up after
the test. For example, the HTTP connector implementation closes the HTTP
connection if the user has not closed it himself.
- version:
$ - Id: ProtocolHandler.java 238991 2004-05-22 11:34:50Z vmassol $
- since:
1.6 -
| Method from org.apache.cactus.spi.client.connector.ProtocolHandler Detail: |
public void afterTest(ProtocolState theState) throws Exception
Let the connector implementor clean up after the test. For example, the
HTTP connector implementation closes the HTTP connection if the user has
not closed it himself. |
public Request createRequest()
Create a request object that will be passed to the begin()
and beginXXX() methods. They will in turn enrich it with
values set by the user. |
public ResponseObjectFactory createResponseObjectFactory(ProtocolState theState)
Create a factory that is used by the core to create test response object
that will be passed to the endXXX() and end()
methods. |
public ProtocolState runTest(Test theDelegatedTest,
Test theWrappedTest,
Request theRequest) throws Throwable
Connect to the server side (to the redirector proxy), passing all
information to execute the test there, trigger the test execution and
gather the test results. |