public final class BasicRetrievalService extends WWObjectImpl implements RetrievalService, java.lang.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
SSLHandshakeException s 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(java.lang.Thread thread,
java.lang.Throwable throwable) |
onMessage, propertyChange
addPropertyChangeListener, 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, setValues
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
onMessage
protected RetrievalService.SSLExceptionListener sslExceptionListener
public boolean contains(Retriever retriever)
contains
in interface RetrievalService
retriever
- the retriever to checktrue
if the retriever is being run or pending executionjava.lang.IllegalArgumentException
- if retriever
is nullpublic int getNumRetrieversPending()
getNumRetrieversPending
in interface RetrievalService
public double getProgress()
public int getRetrieverPoolSize()
getRetrieverPoolSize
in interface RetrievalService
public RetrievalService.SSLExceptionListener getSSLExceptionListener()
RetrievalService
SSLHandshakeException
s are thrown during resource
retrieval.getSSLExceptionListener
in interface RetrievalService
public boolean hasActiveTasks()
hasActiveTasks
in interface RetrievalService
public boolean isAvailable()
isAvailable
in interface RetrievalService
public RetrievalFuture runRetriever(Retriever retriever)
runRetriever
in interface RetrievalService
retriever
- the retriever to runjava.lang.IllegalArgumentException
- if retriever
is null or has no namepublic RetrievalFuture runRetriever(Retriever retriever, double priority)
runRetriever
in interface RetrievalService
retriever
- the retriever to runpriority
- the secondary priority of the retriever, or negative if it is to be the primary priorityjava.lang.IllegalArgumentException
- if retriever
is null or has no namepublic void setRetrieverPoolSize(int poolSize)
setRetrieverPoolSize
in interface RetrievalService
poolSize
- the number of threads in the thread pooljava.lang.IllegalArgumentException
- if poolSize
is non-positivepublic void setSSLExceptionListener(RetrievalService.SSLExceptionListener sslExceptionListener)
RetrievalService
SSLHandshakeException
is thrown during resource
retrieval.setSSLExceptionListener
in interface RetrievalService
sslExceptionListener
- to listener to invoke, or null if no listener is to be invoked.public void shutdown(boolean immediately)
shutdown
in interface RetrievalService
public void uncaughtException(java.lang.Thread thread, java.lang.Throwable throwable)
uncaughtException
in interface java.lang.Thread.UncaughtExceptionHandler