public final class BasicRetrievalService extends WWObjectImpl implements RetrievalService, Thread.UncaughtExceptionHandler
RetrievalService.SSLExceptionListener| Modifier and Type | Field and Description |
|---|---|
protected RetrievalService.SSLExceptionListener |
sslExceptionListener |
| Constructor and Description |
|---|
BasicRetrievalService() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(Retriever retriever) |
int |
getNumRetrieversPending() |
double |
getProgress() |
int |
getRetrieverPoolSize() |
RetrievalService.SSLExceptionListener |
getSSLExceptionListener()
Indicates the listener to be called when
SSLHandshakeExceptions are thrown during resource
retrieval. |
boolean |
hasActiveTasks() |
boolean |
isAvailable() |
RetrievalFuture |
runRetriever(Retriever retriever) |
RetrievalFuture |
runRetriever(Retriever retriever,
double priority) |
void |
setRetrieverPoolSize(int poolSize) |
void |
setSSLExceptionListener(RetrievalService.SSLExceptionListener sslExceptionListener)
Specifies the listener called when a
SSLHandshakeException is thrown during resource
retrieval. |
void |
shutdown(boolean immediately) |
void |
uncaughtException(Thread thread,
Throwable throwable) |
onMessage, propertyChangeaddPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValuesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValuespropertyChangeonMessageprotected RetrievalService.SSLExceptionListener sslExceptionListener
public boolean contains(Retriever retriever)
contains in interface RetrievalServiceretriever - the retriever to checktrue if the retriever is being run or pending executionIllegalArgumentException - if retriever is nullpublic int getNumRetrieversPending()
getNumRetrieversPending in interface RetrievalServicepublic double getProgress()
public int getRetrieverPoolSize()
getRetrieverPoolSize in interface RetrievalServicepublic RetrievalService.SSLExceptionListener getSSLExceptionListener()
RetrievalServiceSSLHandshakeExceptions are thrown during resource
retrieval.getSSLExceptionListener in interface RetrievalServicepublic boolean hasActiveTasks()
hasActiveTasks in interface RetrievalServicepublic boolean isAvailable()
isAvailable in interface RetrievalServicepublic RetrievalFuture runRetriever(Retriever retriever)
runRetriever in interface RetrievalServiceretriever - the retriever to runIllegalArgumentException - if retriever is null or has no namepublic RetrievalFuture runRetriever(Retriever retriever, double priority)
runRetriever in interface RetrievalServiceretriever - the retriever to runpriority - the secondary priority of the retriever, or negative if it is to be the primary priorityIllegalArgumentException - if retriever is null or has no namepublic void setRetrieverPoolSize(int poolSize)
setRetrieverPoolSize in interface RetrievalServicepoolSize - the number of threads in the thread poolIllegalArgumentException - if poolSize is non-positivepublic void setSSLExceptionListener(RetrievalService.SSLExceptionListener sslExceptionListener)
RetrievalServiceSSLHandshakeException is thrown during resource
retrieval.setSSLExceptionListener in interface RetrievalServicesslExceptionListener - to listener to invoke, or null if no listener is to be invoked.public void shutdown(boolean immediately)
shutdown in interface RetrievalServicepublic void uncaughtException(Thread thread, Throwable throwable)
uncaughtException in interface Thread.UncaughtExceptionHandler