Class WfURLRobotConnection

java.lang.Object
wt.workflow.robots.WfURLRobotConnection

public abstract class WfURLRobotConnection extends Object
This class is the abstraction layer for our various
connection schemes between the method server's URLRobot
and the target server. The connection
factory, in this package, returns the proper derived
class of this parentage.

The usage of this class should look the same for almost all
purposes

Example:
try { WfURLRobotConnection roboConn = null;
WfURLRobot wur = (WfURLRobot)this; //cast our task robot
roboConn = URLRobotConnectionFactory.createConnection( protocol );
roboConn.setVerboseExecution( VERBOSE_EXECUTION );
roboConn.setSaveResponseMsg( saveResp );

roboConn.openConnection();
switch(protocol) {
case _HTTP_:
switch(method) {
case _PUT_:
case _POST_:
wur.writeHeader();
wur.writeContenet();
wur.writeFooter();
case _GET_:
default:
}
case _FTP_:
default:
}
// Wait for the status to come back indicating
// that indexing is complete.
String accStatus = roboConn.getStatus();
if (!( accStatus.equals(SUCCESS_STATUS))) {
Object args[] = { identity };
throw new FailedURLException( RESOURCE, robotsResource.URL_FAILURE, args );
}
}
finally {
roboConn.closeConnection( );
}



Supported API: true

Extendable: false
See Also:
  • wt.index.URLRobotFactory