Class NestedBucketBuffer


  • public class NestedBucketBuffer
    extends XrootdBucket
    Format of a NestedBucketBuffer: - int32 BucketType (usually kXRS_main) - int32 len - char[4] protocol (\0 padded) - int32 step (e.g. kXGS_cert) -- int32 BucketType (first nested bucket) -- int32 len -- byte[len] bucket-content -- int32 kXRS_none -- int32 BucketType (second nested bucket) ... - kXRS_none
    Author:
    radicke, tzangerl
    See Also:
    XrootdBucket
    • Method Detail

      • dump

        public int dump​(java.lang.StringBuilder builder,
                        java.lang.String step,
                        int number)
        Description copied from class: XrootdBucket
        This usually will be called only if trace is enabled. We here imitate the XrootD XrdSutBuffer DUMP printout.
        Overrides:
        dump in class XrootdBucket
      • deserialize

        public static NestedBucketBuffer deserialize​(XrootdSecurityProtocol.BucketType type,
                                                     io.netty.buffer.ByteBuf buffer)
                                              throws java.io.IOException
        Deserialize the NestedBucketBuffer. Retrieve all the buckets and recursively deserialize them. Also, retrieve the protocol information and the step.
        Parameters:
        type - The type of the bucket (usually kXRS_main)
        buffer - The buffer containing the nested bucket buffer
        Returns:
        Deserialized buffer
        Throws:
        java.io.IOException - Deserialization fails
      • getStep

        public int getStep()
      • getProtocol

        public java.lang.String getProtocol()
      • serialize

        public void serialize​(io.netty.buffer.ByteBuf out)
        Overrides:
        serialize in class XrootdBucket
      • getSize

        public int getSize()
        Overrides:
        getSize in class XrootdBucket
        Returns:
        Length of the serialized bucket (in bytes)