Package org.cip4.jdflib.util.net
Class UrlCheck
java.lang.Object
org.cip4.jdflib.util.net.UrlCheck
class to do network checks on urls
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetPing()get the ping of a started threadintget the rcbooleanisBuffer()ping(int waitMillis) check if a url is accessible, return null if no connection within waitMillis milliseconsintpingRC(int waitMillis) get the rcvoidsetBuffer(boolean buffer) voidsetHTTPDetails(HTTPDetails details) voidvoidsetStream(InputStream stream) Setter for stream attribute.voidstartPing(int waitMillis) start pinging - multiple pings may run simultaneouslytoString()
-
Constructor Details
-
UrlCheck
- Parameters:
url-
-
UrlCheck
- Parameters:
url-method-
-
-
Method Details
-
getMethod
- Returns:
- the method
-
setMethod
- Parameters:
method- the method to set
-
isBuffer
public boolean isBuffer()- Returns:
- the buffer
-
ping
check if a url is accessible, return null if no connection within waitMillis millisecons- Parameters:
waitMillis-- Returns:
- the returned 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
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
-
getHTTPDetails
- Returns:
- the det
-
setHTTPDetails
- Parameters:
det- the det to set
-