Save This Page
Home » cactus-1.8.0-src » org.apache.cactus.spi.client.connector » [javadoc | source]
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:
Method from org.apache.cactus.spi.client.connector.ProtocolHandler Summary:
afterTest,   createRequest,   createResponseObjectFactory,   runTest
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.