org.gudy.azureus2.plugins.tracker.web
Interface TrackerWebPageResponse

All Known Implementing Classes:
TrackerWebPageResponseImpl

public interface TrackerWebPageResponse


Method Summary
 boolean getAsynchronous()
           
 OutputStream getOutputStream()
           
 OutputStream getRawOutputStream()
          Request complete responsibility for writing the output stream
 boolean isActive()
           
 void setAsynchronous(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 false
 void setContentType(String type)
           
 void setExpires(long time)
           
 void setGZIP(boolean gzip)
           
 void setHeader(String name, String value)
           
 void setLastModified(long time)
           
 void setReplyStatus(int status)
           
 boolean useFile(String root_dir, String relative_url)
          use a file contents as the response.
 void useStream(String file_type, InputStream stream)
           
 void writeTorrent(TrackerTorrent torrent)
           
 

Method Detail

getOutputStream

OutputStream getOutputStream()

setReplyStatus

void setReplyStatus(int status)

setContentType

void setContentType(String type)

setLastModified

void setLastModified(long time)

setExpires

void setExpires(long time)

setHeader

void setHeader(String name,
               String value)

setGZIP

void setGZIP(boolean gzip)

useFile

boolean useFile(String root_dir,
                String relative_url)
                throws IOException
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

void useStream(String file_type,
               InputStream stream)
               throws IOException
Throws:
IOException

writeTorrent

void writeTorrent(TrackerTorrent torrent)
                  throws IOException
Throws:
IOException

setAsynchronous

void setAsynchronous(boolean async)
                     throws IOException
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

OutputStream getRawOutputStream()
                                throws IOException
Request complete responsibility for writing the output stream

Returns:
Throws:
IOException
Since:
5101

isActive

boolean isActive()