Interface TrackerWebPageResponse
- All Known Implementing Classes:
TrackerWebPageResponseImpl
public interface TrackerWebPageResponse
-
Method Summary
Modifier and TypeMethodDescriptionbooleanRequest complete responsibility for writing the output streambooleanisActive()voidsetAsynchronous(boolean async) For a non-blocking tracker the construction of the response can be completed asynchronously by setting async=true and then, when complete, setting it to falsevoidsetContentType(String type) voidsetExpires(long time) voidsetGZIP(boolean gzip) voidvoidsetLastModified(long time) voidvoidsetReplyStatus(int status) booleanuse a file contents as the response.voiduseStream(String file_type, InputStream stream) voidwriteTorrent(TrackerTorrent torrent)
-
Method Details
-
getOutputStream
OutputStream getOutputStream() -
setOutputStream
-
setReplyStatus
void setReplyStatus(int status) -
getContentType
String getContentType() -
setContentType
-
setLastModified
void setLastModified(long time) -
setExpires
void setExpires(long time) -
setHeader
-
setGZIP
void setGZIP(boolean gzip) -
useFile
use a file contents as the response. returns true of loaded ok, false if doesn't exist exception if error occurred during processing.- Parameters:
root_dir- e.g. c:\temp\parp or /tmp/trout/relative_url- e.g. /here/there/wibble.html- Returns:
- Throws:
IOException
-
useStream
- Throws:
IOException
-
writeTorrent
- Throws:
IOException
-
setAsynchronous
For a non-blocking tracker the construction of the response can be completed asynchronously by setting async=true and then, when complete, setting it to false- Parameters:
async-- Throws:
IOException
-
getAsynchronous
boolean getAsynchronous() -
getRawOutputStream
Request complete responsibility for writing the output stream- Returns:
- Throws:
IOException- Since:
- 5101
-
isActive
boolean isActive()
-