wt.workflow.robots
Class WfURLRobotHttpConnection

java.lang.Object
  extended bywt.workflow.robots.WfURLRobotConnection
      extended bywt.workflow.robots.WfURLRobotHttpConnection

public class WfURLRobotHttpConnection
extends WfURLRobotConnection

HTTP Connection to execute an URL using the HTTPClient library.


Field Summary
private  String an_url
           
private  BufferedOutputStream bout
           
private static boolean CHUNKED
           
(package private)  boolean connected
           
private static Hashtable connections
           
protected  String encoding
           
private  HttpURLConnection huc
           
(package private)  boolean ok
           
private  OutputStream out
           
private  int respCode
           
private  String respMsg
           
private  TempFileOutputStream tout
           
private  URL url
           
 
Fields inherited from class wt.workflow.robots.WfURLRobotConnection
_FILE_, _FTP_, _GET_, _HEAD_, _HTTP_, _HTTPS_, _POST_, _PUT_, method, protocol, saveResp, verboseExecution
 
Constructor Summary
WfURLRobotHttpConnection(String urlToServer, String enc)
           
WfURLRobotHttpConnection(URL WURLToServer, String enc)
           
 
Method Summary
 void closeConnection()
           
private static HttpURLConnection getConnection(URL cache_url)
           
 String getContentType()
           
 int getMethod()
           
 OutputStream getOutputStream()
           
 int getProtocol()
           
 int getResponseCode()
           
 String getResponseContent()
           
 String getResponseMsg()
           
protected  void initialize()
           
 void openConnection()
           
 void setMethod(URL the_url)
           
 void setProtocol(String _protocol)
           
private  void setResponseCode()
           
 
Methods inherited from class wt.workflow.robots.WfURLRobotConnection
setSaveResponseMsg, setVerboseExecution
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CHUNKED

private static final boolean CHUNKED
See Also:
Constant Field Values

url

private URL url

huc

private HttpURLConnection huc

out

private OutputStream out

tout

private TempFileOutputStream tout

bout

private BufferedOutputStream bout

connected

boolean connected

ok

boolean ok

an_url

private String an_url

encoding

protected String encoding

respCode

private int respCode

respMsg

private String respMsg

connections

private static Hashtable connections
Constructor Detail

WfURLRobotHttpConnection

public WfURLRobotHttpConnection(String urlToServer,
                                String enc)
                         throws FailedURLException

WfURLRobotHttpConnection

public WfURLRobotHttpConnection(URL WURLToServer,
                                String enc)
                         throws FailedURLException
Method Detail

initialize

protected void initialize()
                   throws FailedURLException
Throws:
FailedURLException

setMethod

public void setMethod(URL the_url)
               throws FailedURLException
Specified by:
setMethod in class WfURLRobotConnection
Throws:
FailedURLException

setProtocol

public void setProtocol(String _protocol)
Specified by:
setProtocol in class WfURLRobotConnection

getMethod

public int getMethod()

getProtocol

public int getProtocol()

getOutputStream

public OutputStream getOutputStream()
                             throws IOException
Overrides:
getOutputStream in class WfURLRobotConnection
Throws:
IOException

openConnection

public void openConnection()
                    throws FailedURLException
Specified by:
openConnection in class WfURLRobotConnection
Throws:
FailedURLException

setResponseCode

private void setResponseCode()
                      throws IOException
Throws:
IOException

getResponseCode

public int getResponseCode()
Specified by:
getResponseCode in class WfURLRobotConnection

getResponseMsg

public String getResponseMsg()
Specified by:
getResponseMsg in class WfURLRobotConnection

getContentType

public String getContentType()
Specified by:
getContentType in class WfURLRobotConnection

getResponseContent

public String getResponseContent()
Specified by:
getResponseContent in class WfURLRobotConnection

closeConnection

public void closeConnection()
Specified by:
closeConnection in class WfURLRobotConnection

getConnection

private static HttpURLConnection getConnection(URL cache_url)
                                        throws IOException
Throws:
IOException