Class TrackerWebPageResponseImpl

    • Field Detail

      • baos

        private java.io.ByteArrayOutputStream baos
      • baos_set

        private boolean baos_set
      • content_type

        private java.lang.String content_type
      • reply_status

        private int reply_status
      • header_map

        private java.util.Map<java.lang.String,​java.lang.Object> header_map
      • raw_output

        private boolean raw_output
      • is_async

        private boolean is_async
      • explicit_gzip

        private int explicit_gzip
      • is_gzipped

        private boolean is_gzipped
    • Method Detail

      • addHeader

        protected java.lang.String addHeader​(java.lang.String name,
                                             java.lang.String value,
                                             boolean replace)
      • getRawOutputStream

        public java.io.OutputStream getRawOutputStream()
                                                throws java.io.IOException
        Description copied from interface: TrackerWebPageResponse
        Request complete responsibility for writing the output stream
        Specified by:
        getRawOutputStream in interface TrackerWebPageResponse
        Returns:
        Throws:
        java.io.IOException
      • complete

        protected void complete()
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • useFile

        public boolean useFile​(java.lang.String root_dir,
                               java.lang.String relative_url)
                        throws java.io.IOException
        Description copied from interface: TrackerWebPageResponse
        use a file contents as the response. returns true of loaded ok, false if doesn't exist exception if error occurred during processing.
        Specified by:
        useFile in interface TrackerWebPageResponse
        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

        public void useStream​(java.lang.String file_type,
                              java.io.InputStream input_stream)
                       throws java.io.IOException
        Specified by:
        useStream in interface TrackerWebPageResponse
        Throws:
        java.io.IOException
      • setAsynchronous

        public void setAsynchronous​(boolean a)
                             throws java.io.IOException
        Description copied from interface: TrackerWebPageResponse
        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
        Specified by:
        setAsynchronous in interface TrackerWebPageResponse
        Throws:
        java.io.IOException