com.quadrique.jbuildingblocks.core.io.socket.client
Class JbbHttpHandler

java.lang.Object
  extended by com.quadrique.jbuildingblocks.core.io.socket.client.JbbHttpHandler

Deprecated.

public class JbbHttpHandler
extends Object

Version:
1.0.0
Author:
Hervé Rivere

Constructor Summary
JbbHttpHandler()
          Deprecated. Constructor
 
Method Summary
static JbbHttpHandler getInstance()
          Deprecated. This method returns an instance of the HttpHandler class.
 URL getUrl(String zUrlString)
          Deprecated.  
 byte[] performHttpGetQuery(URL zUrl, int zTimeOut)
          Deprecated.  
 byte[] performHttpPostQuery(URL zUrl, String zContentType, String zStringBody, int zTimeOut)
          Deprecated.  
 void setBufferSize(int zBufferSize)
          Deprecated.  
 void setUserAgent(String zUserAgent)
          Deprecated.  
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JbbHttpHandler

public JbbHttpHandler()
Deprecated. 
Constructor

Method Detail

getInstance

public static JbbHttpHandler getInstance()
Deprecated. 
This method returns an instance of the HttpHandler class. If there has been already one instantiation, the same instance is returned so that it can be shared accross the application. A typical usage would be: HttpHandler.getInstance().xxx() or HttpHandler lHttpHandler = HttpHandler.getInstance();


performHttpPostQuery

public byte[] performHttpPostQuery(URL zUrl,
                                   String zContentType,
                                   String zStringBody,
                                   int zTimeOut)
                            throws Exception
Deprecated. 
Parameters:
zUrl - the URL
zContentType - a string describing the content type like "text/html" or "text/xml". use null to specify "text/html" (i.e. the default). The routine will set the corresponding HTTP header and will also make sure that the response content type matches.
zStringBody - the body to ue for the POST request
zTimeOut - the maximum number of seconds to wait befoe timing out
Returns:
the body of the POST response as a byte array. If you'd rather use a String, you can convert the byte array to a Strign with astatement of the form: String lDataString = new String(lData,"8859_1"); where lData is a byte[]
Throws:
Exception

getUrl

public URL getUrl(String zUrlString)
           throws Exception
Deprecated. 
Parameters:
zUrlString -
Returns:
url
Throws:
Exception

performHttpGetQuery

public byte[] performHttpGetQuery(URL zUrl,
                                  int zTimeOut)
                           throws Exception
Deprecated. 
Parameters:
zUrl - the URL
zTimeOut - the maximum number of seconds to wait befoe timing out
Returns:
the body of the GET response as a byte array. If you'd rather use a String, you can convert the byte array to a Strign with astatement of the form: String lDataString = new String(lData,"8859_1"); where lData is a byte[]
Throws:
Exception

setUserAgent

public void setUserAgent(String zUserAgent)
                  throws Exception
Deprecated. 
Parameters:
zUserAgent -
Throws:
Exception

setBufferSize

public void setBufferSize(int zBufferSize)
                   throws Exception
Deprecated. 
Parameters:
zBufferSize - the buffer size in bytes (4096 is the default value)
Throws:
Exception


Copyright © 2001-2008 Quadrique Corporation. All Rights Reserved.