Class ProtocolResponse
- java.lang.Object
-
- org.dcache.xrootd.protocol.messages.AbstractXrootdResponse<ProtocolRequest>
-
- org.dcache.xrootd.protocol.messages.ProtocolResponse
-
- All Implemented Interfaces:
XrootdResponse<ProtocolRequest>
public class ProtocolResponse extends AbstractXrootdResponse<ProtocolRequest>
According to protocol, has the following packet structure:
dlen is either 8, if no security requirements are returned, or 14 + secvsz*2. For the moment, the dCache server does not set any overrides, but merely communicates the security level (this determines which requests it expects to be preceded by a signed hash verification request). This may change in the future, so provision is made for non-zero secvsz. Signing can be enforced if the protocol does not provide encryption by setting a dCache property. In this case, secopt should be set to kXR_secOFrcekXR_char streamid[2] kXR_unt16 0 kXR_int32 dlen kXR_int32 pval kXR_int32 flags kXR_char 'S' kXR_char rsvd kXR_char secver kXR_char secopt kXR_char seclvl kXR_char secvsz {kXR_char,kXR_char} [reqidx,reqlvl]
-
-
Field Summary
-
Fields inherited from class org.dcache.xrootd.protocol.messages.AbstractXrootdResponse
request, stat
-
-
Constructor Summary
Constructors Constructor Description ProtocolResponse(ProtocolRequest request, int flags)ProtocolResponse(ProtocolRequest request, int flags, SigningPolicy signingPolicy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidgetBytes(io.netty.buffer.ByteBuf buffer)intgetDataLength()Returns the length of the response body.intgetFlags()SigningPolicygetSigningPolicy()java.lang.StringtoString()-
Methods inherited from class org.dcache.xrootd.protocol.messages.AbstractXrootdResponse
getRequest, getStatus, writeTo
-
-
-
-
Constructor Detail
-
ProtocolResponse
public ProtocolResponse(ProtocolRequest request, int flags)
-
ProtocolResponse
public ProtocolResponse(ProtocolRequest request, int flags, SigningPolicy signingPolicy)
-
-
Method Detail
-
getFlags
public int getFlags()
-
getSigningPolicy
public SigningPolicy getSigningPolicy()
-
getDataLength
public int getDataLength()
Description copied from interface:XrootdResponseReturns 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:
getDataLengthin interfaceXrootdResponse<ProtocolRequest>- Specified by:
getDataLengthin classAbstractXrootdResponse<ProtocolRequest>
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getBytes
protected void getBytes(io.netty.buffer.ByteBuf buffer)
- Specified by:
getBytesin classAbstractXrootdResponse<ProtocolRequest>
-
-