public class NetPoll extends Object
| Modifier and Type | Field and Description |
|---|---|
protected int |
busyWait |
protected String |
contentType |
protected int |
idleWait |
protected String |
method |
protected MyMutex |
mutex |
protected IPollHandler |
poller |
protected org.cip4.jdflib.util.net.NetPoll.PollThread |
pollThread |
| Constructor and Description |
|---|
NetPoll(String url,
IPollHandler poller)
shorthand constructor for single String
|
NetPoll(VString urls,
IPollHandler poller) |
| Modifier and Type | Method and Description |
|---|---|
void |
addURL(String url) |
protected void |
finalize()
make sur we stop all threads prior to dying
|
protected int |
getIdleWait()
get the idle wait period divided by the # of urls to ping
|
protected String |
getUrl(String baseUrl)
get the URL based on a baseurl
|
VString |
getUrls()
get the vector of urls
|
protected int |
getUrlSize() |
boolean |
isRunning()
return true if we are running
|
protected IPollDetails |
poll(String baseUrl) |
void |
setBusyWait(int busyWait) |
void |
setContentType(String contentType) |
void |
setIdleWait(int idleWait) |
void |
setMethod(String method) |
void |
start()
start the poll loop
|
void |
stop()
stop the poll loop
|
String |
toString() |
protected int idleWait
protected int busyWait
protected org.cip4.jdflib.util.net.NetPoll.PollThread pollThread
protected IPollHandler poller
protected MyMutex mutex
protected String method
protected String contentType
public NetPoll(VString urls, IPollHandler poller)
urls - the urls to poll - duh!poller - public NetPoll(String url, IPollHandler poller)
url - the url to poll - duh!poller - public boolean isRunning()
public void start()
public void stop()
protected int getUrlSize()
protected IPollDetails poll(String baseUrl)
baseUrl - the url to write topublic void setMethod(String method)
method - the http transfer method to set (GET / POST)public void addURL(String url)
url - the additional url to addpublic void setContentType(String contentType)
contentType - the contentType to setpublic String toString()
toString in class ObjectObject.toString()public void setIdleWait(int idleWait)
idleWait - the number of wait milliseconds to setpublic void setBusyWait(int busyWait)
busyWait - the busyWait to setprotected String getUrl(String baseUrl)
baseUrl - public VString getUrls()
protected void finalize()
throws Throwable
finalize in class ObjectThrowableObject.finalize()protected int getIdleWait()
Copyright © 2013. All Rights Reserved.