Class RequestProxy

  • All Implemented Interfaces:
    org.lobobrowser.html.HttpRequest

    public class RequestProxy
    extends Object
    implements org.lobobrowser.html.HttpRequest
    Proxy that decides which real HttpRequest implementation will be triggered due to the given URL and the flag if external http resources are allowed.
    • Method Detail

      • open

        public void open​(String method,
                         URL url,
                         boolean asyncFlag,
                         String userName,
                         String password)
                  throws IOException
        Specified by:
        open in interface org.lobobrowser.html.HttpRequest
        Throws:
        IOException
      • abort

        public void abort()
        Specified by:
        abort in interface org.lobobrowser.html.HttpRequest
      • addReadyStateChangeListener

        public void addReadyStateChangeListener​(org.lobobrowser.html.ReadyStateChangeListener listener)
        Specified by:
        addReadyStateChangeListener in interface org.lobobrowser.html.HttpRequest
      • getAllResponseHeaders

        public String getAllResponseHeaders()
        Specified by:
        getAllResponseHeaders in interface org.lobobrowser.html.HttpRequest
      • getReadyState

        public int getReadyState()
        Specified by:
        getReadyState in interface org.lobobrowser.html.HttpRequest
      • getResponseBytes

        public byte[] getResponseBytes()
        Specified by:
        getResponseBytes in interface org.lobobrowser.html.HttpRequest
      • getResponseHeader

        public String getResponseHeader​(String headerName)
        Specified by:
        getResponseHeader in interface org.lobobrowser.html.HttpRequest
      • getResponseImage

        public BufferedImage getResponseImage()
        Specified by:
        getResponseImage in interface org.lobobrowser.html.HttpRequest
      • imageInputStreamToBufferedImageViaJadice

        protected BufferedImage imageInputStreamToBufferedImageViaJadice​(com.levigo.jadice.document.io.SeekableInputStream seekableInputStream)
      • getResponseText

        public String getResponseText()
        Specified by:
        getResponseText in interface org.lobobrowser.html.HttpRequest
      • getResponseXML

        public Document getResponseXML()
        Specified by:
        getResponseXML in interface org.lobobrowser.html.HttpRequest
      • getStatus

        public int getStatus()
        Specified by:
        getStatus in interface org.lobobrowser.html.HttpRequest
      • getStatusText

        public String getStatusText()
        Specified by:
        getStatusText in interface org.lobobrowser.html.HttpRequest
      • open

        public void open​(String method,
                         URL url)
                  throws IOException
        Specified by:
        open in interface org.lobobrowser.html.HttpRequest
        Throws:
        IOException
      • open

        public void open​(String method,
                         URL url,
                         boolean asyncFlag)
                  throws IOException
        Specified by:
        open in interface org.lobobrowser.html.HttpRequest
        Throws:
        IOException
      • open

        public void open​(String method,
                         String url,
                         boolean asyncFlag)
                  throws IOException
        Specified by:
        open in interface org.lobobrowser.html.HttpRequest
        Throws:
        IOException
      • open

        public void open​(String method,
                         URL url,
                         boolean asyncFlag,
                         String userName)
                  throws IOException
        Specified by:
        open in interface org.lobobrowser.html.HttpRequest
        Throws:
        IOException
      • send

        public void send​(String content)
                  throws IOException
        Specified by:
        send in interface org.lobobrowser.html.HttpRequest
        Throws:
        IOException
      • getRequestURL

        public URL getRequestURL()
        Specified by:
        getRequestURL in interface org.lobobrowser.html.HttpRequest