Class AbstractXrootdResponse<T extends XrootdRequest>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected T request  
      protected int stat  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract void getBytes​(io.netty.buffer.ByteBuf buffer)  
      abstract int getDataLength()
      Returns the length of the response body.
      T getRequest()
      Returns the request this is a response to.
      int getStatus()
      The xrootd response status code.
      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, toString, wait, wait, wait
    • Field Detail

      • stat

        protected final int stat
    • Constructor Detail

      • AbstractXrootdResponse

        public AbstractXrootdResponse​(T request,
                                      int stat)
    • Method Detail

      • 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<T extends XrootdRequest>
      • getDataLength

        public abstract 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<T extends XrootdRequest>
      • getBytes

        protected abstract void getBytes​(io.netty.buffer.ByteBuf buffer)