|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arsdigita.util.url.URLPool
Constructor Summary | |
URLPool()
Create a new URLPool with a default poolsize of 10 and a default timeout of 4 seconds. |
|
URLPool(int poolsize)
Create a new URLPool with a default timeout of 4 seconds. |
|
URLPool(int threadCount,
long timeout)
Create a new URLPool with a default timeout of 4 seconds. |
Method Summary | |
String |
fetchURL(String url)
Deprecated. Use fetchURLData(String) instead |
URLData |
fetchURLData(String url)
fetches the remote URL, returning the data from the page, or null if an error occurred. |
int |
getMaxThreadCount()
Returns the thread count - maximum number of threads allowed to be running at any given time, any subsequent requests for urls are queued until a thread becomes available. |
long |
getTimeOut()
Returns the timeout to use when fetching URLs to prevent a slow remote server from delaying the calling application indefinitely. |
void |
setMaxThreadCount(int maxThreadCount)
Sets the thread count - maximum number of threads allowed to be running at any given time, any subsequent requests for urls are queued until a thread becomes available. |
void |
setTimeOut(long timeOut)
Sets the timeout to use when fetching URLs to prevent a slow remote server from delaying the calling application indefinitely. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public URLPool()
public URLPool(int poolsize)
poolsize
- - maximum number of threads allowed to be running at
any given time, any subsequent requests for urls are queued until a
thread becomes available.public URLPool(int threadCount, long timeout)
threadCount
- - maximum number of threads allowed to be running at
any given time, any subsequent requests for urls are queued until a
thread becomes available.timeout
- - timeout in milliseconds to use when fetching URLs to
prevent a slow remote server from delaying the calling application
indefinitely.Method Detail |
public int getMaxThreadCount()
public void setMaxThreadCount(int maxThreadCount)
maxThreadCount
- the maximum number of threads allowed to be running
at any given timepublic long getTimeOut()
public void setTimeOut(long timeOut)
timeOut
- the timeout to use when fetching URLs to prevent a slow
remote server from delaying the calling application indefinitely.public String fetchURL(String url)
fetchURLData(String)
instead
url
- The URL to fetch data from
public URLData fetchURLData(String url)
url
- The URL to fetch data from
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |