Interface TrackerWebPageResponse

    • Method Detail

      • getOutputStream

        java.io.OutputStream getOutputStream()
      • setOutputStream

        void setOutputStream​(java.io.ByteArrayOutputStream os)
      • setReplyStatus

        void setReplyStatus​(int status)
      • getContentType

        java.lang.String getContentType()
      • setContentType

        void setContentType​(java.lang.String type)
      • setLastModified

        void setLastModified​(long time)
      • setExpires

        void setExpires​(long time)
      • setHeader

        void setHeader​(java.lang.String name,
                       java.lang.String value)
      • setGZIP

        void setGZIP​(boolean gzip)
      • useFile

        boolean useFile​(java.lang.String root_dir,
                        java.lang.String relative_url)
                 throws java.io.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:
        java.io.IOException
      • useStream

        void useStream​(java.lang.String file_type,
                       java.io.InputStream stream)
                throws java.io.IOException
        Throws:
        java.io.IOException
      • writeTorrent

        void writeTorrent​(TrackerTorrent torrent)
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • setAsynchronous

        void setAsynchronous​(boolean async)
                      throws java.io.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:
        java.io.IOException
      • getAsynchronous

        boolean getAsynchronous()
      • getRawOutputStream

        java.io.OutputStream getRawOutputStream()
                                         throws java.io.IOException
        Request complete responsibility for writing the output stream
        Returns:
        Throws:
        java.io.IOException
        Since:
        5101
      • isActive

        boolean isActive()