Class ThreadedHttpRequestHandler.LazyContentChannel

  • All Implemented Interfaces:
    com.yahoo.jdisc.handler.ContentChannel
    Enclosing class:
    ThreadedHttpRequestHandler

    public static class ThreadedHttpRequestHandler.LazyContentChannel
    extends java.lang.Object
    implements com.yahoo.jdisc.handler.ContentChannel
    A content channel which will return the header and create the proper channel the first time content data needs to be written to it.
    • Constructor Summary

      Constructors 
      Constructor Description
      LazyContentChannel​(HttpRequest httpRequest, com.yahoo.jdisc.handler.ResponseHandler responseHandler, com.yahoo.jdisc.Metric metric, java.util.logging.Logger log)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close​(com.yahoo.jdisc.handler.CompletionHandler completionHandler)  
      void setHttpResponse​(HttpResponse httpResponse)
      This must be called before writing to this
      void write​(java.nio.ByteBuffer byteBuffer, com.yahoo.jdisc.handler.CompletionHandler completionHandler)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LazyContentChannel

        public LazyContentChannel​(HttpRequest httpRequest,
                                  com.yahoo.jdisc.handler.ResponseHandler responseHandler,
                                  com.yahoo.jdisc.Metric metric,
                                  java.util.logging.Logger log)
    • Method Detail

      • setHttpResponse

        public void setHttpResponse​(HttpResponse httpResponse)
        This must be called before writing to this
      • write

        public void write​(java.nio.ByteBuffer byteBuffer,
                          com.yahoo.jdisc.handler.CompletionHandler completionHandler)
        Specified by:
        write in interface com.yahoo.jdisc.handler.ContentChannel
      • close

        public void close​(com.yahoo.jdisc.handler.CompletionHandler completionHandler)
        Specified by:
        close in interface com.yahoo.jdisc.handler.ContentChannel