|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.cip4.jdflib.util.net.NetPoll
public class NetPoll
class to poll a network address
| Field Summary | |
|---|---|
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 Summary | |
|---|---|
NetPoll(String url,
IPollHandler poller)
shorthand constructor for single String |
|
NetPoll(VString urls,
IPollHandler poller)
|
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
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
| Constructor Detail |
|---|
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 - | Method Detail |
|---|
public boolean isRunning()
public void start()
public void stop()
protected int getUrlSize()
protected IPollDetails poll(String baseUrl)
baseUrl - the url to write to
public 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()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||