wt.wrmf.transport.httptransport
Class ReconnectedHttpURLCon

java.lang.Object
  extended byjava.net.URLConnection
      extended bywt.wrmf.transport.httptransport.ReconnectedHttpURLCon
All Implemented Interfaces:
Serializable

public class ReconnectedHttpURLCon
extends URLConnection
implements Serializable



Supported API: false

Extendable: false

See Also:
Serialized Form

Nested Class Summary
private  class ReconnectedHttpURLCon.ReconnectedIS
           
private  class ReconnectedHttpURLCon.ReconnectedOS
           
 
Field Summary
private  int attempts
           
private  EnumeratorVector backISEnum
           
private static String basePath
           
private  long bytesDownloaded
           
private static String CLASSNAME
           
private  URLConnection con
           
private  String fullUrl
           
private  int postBytesRead
           
private  InputStream postIS
           
private  long postISLength
           
private static String RESOURCE
           
private static int sleepTime
           
private static int totalAttempts
           
private  boolean useGET
           
private  boolean useGZIP
           
private static boolean VERBOSE
           
private static String versionID
           
 
Fields inherited from class java.net.URLConnection
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches
 
Constructor Summary
  ReconnectedHttpURLCon(URL url)
          Default case is: GET without GZIP

Supported API: false
  ReconnectedHttpURLCon(URL url, boolean useGZIP)
          Default case is use GET method.
private ReconnectedHttpURLCon(URL url, boolean useGZIP, InputStream is, long length)
           
  ReconnectedHttpURLCon(URL url, InputStream is, long length)
          Use POST method; the accepted input stream may or may not be gzipped.
 
Method Summary
 void connect()
           
static void fileDownload(HTTPRequest request, HTTPResponse response)
           
private  String findKeyValue(String key)
           
 InputStream getInputStream()
          

Supported API: false
 OutputStream getOutputStream()
          

Supported API: false
 int getResponseCode()
          

Supported API: false
private static void headerHandle(InputStream is, long rmtBytesRead, boolean isForPost)
           
private  void pullResume()
           
private  void pushResume()
           
private  void pushResume0()
           
 void pushStream()
          

Supported API: false
private  void writePostISToFile(String tempFileName)
           
 
Methods inherited from class java.net.URLConnection
addRequestProperty, getAllowUserInteraction, getContent, getContent, getContentEncoding, getContentLength, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderField, getHeaderField, getHeaderFieldDate, getHeaderFieldInt, getHeaderFieldKey, getHeaderFields, getIfModifiedSince, getLastModified, getPermission, getRequestProperties, getRequestProperty, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setRequestProperty, setUseCaches, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

con

private URLConnection con

useGET

private boolean useGET

useGZIP

private boolean useGZIP

versionID

private static final String versionID
See Also:
Constant Field Values

VERBOSE

private static boolean VERBOSE

fullUrl

private String fullUrl

bytesDownloaded

private long bytesDownloaded

backISEnum

private EnumeratorVector backISEnum

postIS

private InputStream postIS

postISLength

private long postISLength

basePath

private static String basePath

attempts

private int attempts

totalAttempts

private static int totalAttempts

sleepTime

private static int sleepTime

postBytesRead

private int postBytesRead
Constructor Detail

ReconnectedHttpURLCon

public ReconnectedHttpURLCon(URL url)
                      throws IOException
Default case is: GET without GZIP

Supported API: false

Parameters:
url -
Throws:
IOException

ReconnectedHttpURLCon

public ReconnectedHttpURLCon(URL url,
                             boolean useGZIP)
                      throws IOException
Default case is use GET method.

Supported API: false

Parameters:
url -
useGZIP -
Throws:
IOException

ReconnectedHttpURLCon

public ReconnectedHttpURLCon(URL url,
                             InputStream is,
                             long length)
                      throws IOException
Use POST method; the accepted input stream may or may not be gzipped.

Supported API: false

Parameters:
url -
is -
length -
Throws:
IOException

ReconnectedHttpURLCon

private ReconnectedHttpURLCon(URL url,
                              boolean useGZIP,
                              InputStream is,
                              long length)
                       throws IOException
Method Detail

getInputStream

public InputStream getInputStream()
                           throws IOException


Supported API: false

Returns:
InputStream
Throws:
IOException

getOutputStream

public OutputStream getOutputStream()
                             throws IOException


Supported API: false

Returns:
OutputStream
Throws:
IOException

getResponseCode

public int getResponseCode()
                    throws IOException


Supported API: false

Returns:
int
Throws:
IOException

pushStream

public void pushStream()
                throws IOException


Supported API: false

Throws:
IOException

connect

public void connect()
             throws IOException
Throws:
IOException

pullResume

private void pullResume()
                 throws IOException
Throws:
IOException

pushResume0

private void pushResume0()
                  throws IOException
Throws:
IOException

pushResume

private void pushResume()
                 throws IOException
Throws:
IOException

writePostISToFile

private void writePostISToFile(String tempFileName)
                        throws IOException
Throws:
IOException

fileDownload

public static void fileDownload(HTTPRequest request,
                                HTTPResponse response)
                         throws IOException
Throws:
IOException

headerHandle

private static void headerHandle(InputStream is,
                                 long rmtBytesRead,
                                 boolean isForPost)
                          throws IOException
Throws:
IOException

findKeyValue

private String findKeyValue(String key)