public class ClientGetWorkerThread
extends java.lang.Thread
null
may be passed through
the relevant constructor arguments.Constructor and Description |
---|
ClientGetWorkerThread(java.io.InputStream input,
java.io.OutputStream output,
FreenetURI uri,
java.lang.String mimeType,
HashResult[] hashes,
boolean filterData,
java.lang.String charset,
FoundURICallback prefetchHook,
TagReplacerCallback tagReplacer,
LinkFilterExceptionProvider linkFilterExceptionProvider)
Deprecated.
|
ClientGetWorkerThread(java.io.InputStream input,
java.io.OutputStream output,
FreenetURI uri,
java.lang.String mimeType,
java.lang.String schemeHostAndPort,
HashResult[] hashes,
boolean filterData,
java.lang.String charset,
FoundURICallback prefetchHook,
TagReplacerCallback tagReplacer,
LinkFilterExceptionProvider linkFilterExceptionProvider) |
Modifier and Type | Method and Description |
---|---|
ClientMetadata |
getClientMetadata() |
void |
getError() |
void |
onFinish()
Marks that all work has finished, and wakes blocked threads.
|
void |
run() |
void |
setError(java.lang.Throwable t)
Stores the exception and awakens blocked threads.
|
void |
waitFinished()
Blocks until all threads have finished executing and cleaning up.
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
@Deprecated public ClientGetWorkerThread(java.io.InputStream input, java.io.OutputStream output, FreenetURI uri, java.lang.String mimeType, HashResult[] hashes, boolean filterData, java.lang.String charset, FoundURICallback prefetchHook, TagReplacerCallback tagReplacer, LinkFilterExceptionProvider linkFilterExceptionProvider) throws java.net.URISyntaxException
java.net.URISyntaxException
public ClientGetWorkerThread(java.io.InputStream input, java.io.OutputStream output, FreenetURI uri, java.lang.String mimeType, java.lang.String schemeHostAndPort, HashResult[] hashes, boolean filterData, java.lang.String charset, FoundURICallback prefetchHook, TagReplacerCallback tagReplacer, LinkFilterExceptionProvider linkFilterExceptionProvider) throws java.net.URISyntaxException
input
- The stream to read the data fromoutput
- The final destination to which the data will be writtenuri
- The URI of the fetched data. Needed for the ContentFilter. Optional.mimeType
- MIME of the fetched data. The best guess is needed for the
ContentFilter. Optional.hashes
- Hashes of the fetched data, to be compared against. Optional.filterData
- If true, the ContentFilter will be invokedcharset
- Charset to be passed to the ContentFilter.
Only needed if filterData is true.prefetchHook
- Only needed if filterData is true.tagReplacer
- Used for web-pushing. Only needed if filterData is true.linkFilterExceptionProvider
- Provider for link filter exceptionsjava.net.URISyntaxException
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public ClientMetadata getClientMetadata()
public void setError(java.lang.Throwable t)
public void getError() throws java.lang.Throwable
java.lang.Throwable
public void onFinish()
public void waitFinished() throws java.lang.Throwable
java.lang.Throwable
- Any errors that arose during execution