Class UrlCheck


  • public class UrlCheck
    extends java.lang.Object
    class to do network checks on urls
    • Constructor Summary

      Constructors 
      Constructor Description
      UrlCheck​(java.lang.String url)  
      UrlCheck​(java.lang.String url, java.lang.String method)  
    • Constructor Detail

      • UrlCheck

        public UrlCheck​(java.lang.String url)
        Parameters:
        url -
      • UrlCheck

        public UrlCheck​(java.lang.String url,
                        java.lang.String method)
        Parameters:
        url -
        method -
    • Method Detail

      • getMethod

        public java.lang.String getMethod()
        Returns:
        the method
      • setMethod

        public void setMethod​(java.lang.String method)
        Parameters:
        method - the method to set
      • isBuffer

        public boolean isBuffer()
        Returns:
        the buffer
      • ping

        public UrlPart ping​(int waitMillis)
        check if a url is accessible, return null if no connection within waitMillis millisecons
        Parameters:
        waitMillis -
        Returns:
        the returned urlPart
      • getPing

        public UrlPart getPing()
        get the ping of a started thread
        Returns:
      • startPing

        public void startPing​(int waitMillis)
        start pinging - multiple pings may run simultaneously
        Parameters:
        waitMillis - time to wait (in total)
      • pingRC

        public int pingRC​(int waitMillis)
        get the rc
        Parameters:
        waitMillis -
        Returns:
      • getPingRC

        public int getPingRC()
        get the rc
        Returns:
      • setStream

        public void setStream​(java.io.InputStream stream)
        Setter for stream attribute. This Stream will be sent to the request url
        Parameters:
        stream - the stream to set
      • setBuffer

        public void setBuffer​(boolean buffer)
        Parameters:
        buffer -
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        See Also:
        Object.toString()
      • getHTTPDetails

        public HTTPDetails getHTTPDetails()
        Returns:
        the det
      • setHTTPDetails

        public void setHTTPDetails​(HTTPDetails details)
        Parameters:
        det - the det to set