Class NativeHTTPDataLoader

    • Constructor Detail

      • NativeHTTPDataLoader

        public NativeHTTPDataLoader()
    • Method Detail

      • get

        public DataLoader.DataAndUrl get​(List<String> urlStrings)
        Description copied from interface: DataLoader
        Execute a HTTP GET operation. This method is used when many URls are available to access the same resource. The operation stops after the first successful download.
        Specified by:
        get in interface DataLoader
        Parameters:
        urlStrings - List of Strings representing the URLs to be used in sequential way to obtain the data.
        Returns:
        DataAndUrl representing the array of obtained data and used url, or null
      • get

        public byte[] get​(String url)
        Description copied from interface: DataLoader
        Execute a HTTP GET operation.
        Specified by:
        get in interface DataLoader
        Parameters:
        url - the url to access
        Returns:
        byte array of obtained data or null
      • get

        public byte[] get​(String url,
                          boolean refresh)
        Description copied from interface: DataLoader
        Execute a HTTP GET operation with indication concerning the mandatory nature of the operation.
        Specified by:
        get in interface DataLoader
        Parameters:
        url - to access
        refresh - if true indicates that the cached data should be refreshed
        Returns:
        byte array of obtained data or null
      • post

        public byte[] post​(String url,
                           byte[] content)
        Description copied from interface: DataLoader
        Executes a HTTP POST operation
        Specified by:
        post in interface DataLoader
        Parameters:
        url - to access
        content - the content to post
        Returns:
        byte array of obtained data
      • setContentType

        public void setContentType​(String contentType)
        Description copied from interface: DataLoader
        This allows to set the content type. Example: Content-Type "application/ocsp-request"
        Specified by:
        setContentType in interface DataLoader
        Parameters:
        contentType - to set the Content-Type
      • getMaxInputSize

        public long getMaxInputSize()
      • setMaxInputSize

        public void setMaxInputSize​(long maxInputSize)
      • getTimeout

        public long getTimeout()
      • setTimeout

        public void setTimeout​(long timeout)