Class StoredResponseStreamSinkConduit

  • All Implemented Interfaces:
    org.xnio.conduits.Conduit, org.xnio.conduits.SinkConduit, org.xnio.conduits.StreamSinkConduit

    public final class StoredResponseStreamSinkConduit
    extends org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
    Author:
    Stuart Douglas
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static AttachmentKey<byte[]> RESPONSE  
      • Fields inherited from class org.xnio.conduits.AbstractConduit

        next
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void terminateWrites()  
      long transferFrom​(FileChannel src, long position, long count)  
      long transferFrom​(org.xnio.channels.StreamSourceChannel source, long count, ByteBuffer throughBuffer)  
      int write​(ByteBuffer src)  
      long write​(ByteBuffer[] srcs, int offs, int len)  
      int writeFinal​(ByteBuffer src)  
      long writeFinal​(ByteBuffer[] srcs, int offs, int len)  
      • Methods inherited from class org.xnio.conduits.AbstractSinkConduit

        awaitWritable, awaitWritable, flush, getWriteThread, isWriteResumed, isWriteShutdown, resumeWrites, setWriteReadyHandler, suspendWrites, truncateWrites, wakeupWrites
      • Methods inherited from class org.xnio.conduits.AbstractConduit

        getWorker
      • Methods inherited from interface org.xnio.conduits.Conduit

        getWorker
      • Methods inherited from interface org.xnio.conduits.SinkConduit

        awaitWritable, awaitWritable, flush, getWriteThread, isWriteResumed, isWriteShutdown, resumeWrites, setWriteReadyHandler, suspendWrites, truncateWrites, wakeupWrites
    • Field Detail

    • Constructor Detail

      • StoredResponseStreamSinkConduit

        public StoredResponseStreamSinkConduit​(org.xnio.conduits.StreamSinkConduit next,
                                               HttpServerExchange exchange)
        Construct a new instance.
        Parameters:
        next - the delegate conduit to set
        exchange -
    • Method Detail

      • transferFrom

        public long transferFrom​(org.xnio.channels.StreamSourceChannel source,
                                 long count,
                                 ByteBuffer throughBuffer)
                          throws IOException
        Specified by:
        transferFrom in interface org.xnio.conduits.StreamSinkConduit
        Overrides:
        transferFrom in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
        Throws:
        IOException
      • transferFrom

        public long transferFrom​(FileChannel src,
                                 long position,
                                 long count)
                          throws IOException
        Specified by:
        transferFrom in interface org.xnio.conduits.StreamSinkConduit
        Overrides:
        transferFrom in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
        Throws:
        IOException
      • write

        public int write​(ByteBuffer src)
                  throws IOException
        Specified by:
        write in interface org.xnio.conduits.StreamSinkConduit
        Overrides:
        write in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
        Throws:
        IOException
      • write

        public long write​(ByteBuffer[] srcs,
                          int offs,
                          int len)
                   throws IOException
        Specified by:
        write in interface org.xnio.conduits.StreamSinkConduit
        Overrides:
        write in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
        Throws:
        IOException
      • writeFinal

        public int writeFinal​(ByteBuffer src)
                       throws IOException
        Specified by:
        writeFinal in interface org.xnio.conduits.StreamSinkConduit
        Overrides:
        writeFinal in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
        Throws:
        IOException
      • writeFinal

        public long writeFinal​(ByteBuffer[] srcs,
                               int offs,
                               int len)
                        throws IOException
        Specified by:
        writeFinal in interface org.xnio.conduits.StreamSinkConduit
        Overrides:
        writeFinal in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
        Throws:
        IOException
      • terminateWrites

        public void terminateWrites()
                             throws IOException
        Specified by:
        terminateWrites in interface org.xnio.conduits.SinkConduit
        Overrides:
        terminateWrites in class org.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>
        Throws:
        IOException