Package org.dcache.xrootd.security
Class NestedBucketBuffer
- java.lang.Object
-
- org.dcache.xrootd.security.XrootdBucket
-
- org.dcache.xrootd.security.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
-
-
Field Summary
-
Fields inherited from class org.dcache.xrootd.security.XrootdBucket
_type
-
-
Constructor Summary
Constructors Constructor Description NestedBucketBuffer(XrootdSecurityProtocol.BucketType type, java.lang.String protocol, int step, java.util.Map<XrootdSecurityProtocol.BucketType,XrootdBucket> nestedBuckets)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NestedBucketBufferdeserialize(XrootdSecurityProtocol.BucketType type, io.netty.buffer.ByteBuf buffer)Deserialize the NestedBucketBuffer.intdump(java.lang.StringBuilder builder, java.lang.String step, int number)This usually will be called only if trace is enabled.java.util.Map<XrootdSecurityProtocol.BucketType,XrootdBucket>getNestedBuckets()java.lang.StringgetProtocol()intgetSize()intgetStep()voidserialize(io.netty.buffer.ByteBuf out)java.lang.StringtoString()-
Methods inherited from class org.dcache.xrootd.security.XrootdBucket
getType
-
-
-
-
Constructor Detail
-
NestedBucketBuffer
public NestedBucketBuffer(XrootdSecurityProtocol.BucketType type, java.lang.String protocol, int step, java.util.Map<XrootdSecurityProtocol.BucketType,XrootdBucket> nestedBuckets)
-
-
Method Detail
-
dump
public int dump(java.lang.StringBuilder builder, java.lang.String step, int number)Description copied from class:XrootdBucketThis usually will be called only if trace is enabled. We here imitate the XrootD XrdSutBuffer DUMP printout.- Overrides:
dumpin classXrootdBucket
-
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
-
getNestedBuckets
public java.util.Map<XrootdSecurityProtocol.BucketType,XrootdBucket> getNestedBuckets()
- Returns:
- the list of XrootdBuckets nested in this buffer
-
getStep
public int getStep()
-
getProtocol
public java.lang.String getProtocol()
-
serialize
public void serialize(io.netty.buffer.ByteBuf out)
- Overrides:
serializein classXrootdBucket
-
getSize
public int getSize()
- Overrides:
getSizein classXrootdBucket- Returns:
- Length of the serialized bucket (in bytes)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classXrootdBucket
-
-