Class ReadResponse

    • Constructor Summary

      Constructors 
      Constructor Description
      ReadResponse​(ReadRequest request, io.netty.buffer.ByteBuf data, boolean isIncomplete)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      io.netty.buffer.ByteBuf getData()  
      int getDataLength()
      Returns the length of the response body.
      ReadRequest getRequest()
      Returns the request this is a response to.
      int getStatus()
      The xrootd response status code.
      int refCnt()  
      boolean release()  
      boolean release​(int decrement)  
      ReadResponse retain()  
      ReadResponse retain​(int increment)  
      java.lang.String toString()  
      io.netty.util.ReferenceCounted touch()  
      io.netty.util.ReferenceCounted touch​(java.lang.Object hint)  
      void writeTo​(io.netty.channel.ChannelHandlerContext ctx, io.netty.channel.ChannelPromise promise)
      Writes the encoded message to the given channel context.
      • Methods inherited from class java.lang.Object

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

      • ReadResponse

        public ReadResponse​(ReadRequest request,
                            io.netty.buffer.ByteBuf data,
                            boolean isIncomplete)
    • Method Detail

      • getDataLength

        public int getDataLength()
        Description copied from interface: XrootdResponse
        Returns the length of the response body. This is the value of the dlen field in the Xrootd Server Response Format. This does not include the length of the 8 byte header.
        Specified by:
        getDataLength in interface XrootdResponse<ReadRequest>
      • writeTo

        public void writeTo​(io.netty.channel.ChannelHandlerContext ctx,
                            io.netty.channel.ChannelPromise promise)
        Description copied from interface: XrootdResponse
        Writes the encoded message to the given channel context. Does not flush the channel. This is a destructive call and must at most be called once. Decreases the reference count by 1 and deallocates this object if the reference count reaches 0.
        Specified by:
        writeTo in interface XrootdResponse<ReadRequest>
      • getData

        public io.netty.buffer.ByteBuf getData()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • refCnt

        public int refCnt()
        Specified by:
        refCnt in interface io.netty.util.ReferenceCounted
      • retain

        public ReadResponse retain()
        Specified by:
        retain in interface io.netty.util.ReferenceCounted
      • retain

        public ReadResponse retain​(int increment)
        Specified by:
        retain in interface io.netty.util.ReferenceCounted
      • release

        public boolean release()
        Specified by:
        release in interface io.netty.util.ReferenceCounted
      • release

        public boolean release​(int decrement)
        Specified by:
        release in interface io.netty.util.ReferenceCounted
      • touch

        public io.netty.util.ReferenceCounted touch()
        Specified by:
        touch in interface io.netty.util.ReferenceCounted
      • touch

        public io.netty.util.ReferenceCounted touch​(java.lang.Object hint)
        Specified by:
        touch in interface io.netty.util.ReferenceCounted