Class AsyncResponse<T extends XrootdRequest>
- java.lang.Object
-
- io.netty.util.AbstractReferenceCounted
-
- org.dcache.xrootd.protocol.messages.AsyncResponse<T>
-
- All Implemented Interfaces:
io.netty.util.ReferenceCounted,XrootdResponse<T>
public class AsyncResponse<T extends XrootdRequest> extends io.netty.util.AbstractReferenceCounted implements XrootdResponse<T>
-
-
Constructor Summary
Constructors Constructor Description AsyncResponse(XrootdResponse<T> response)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddeallocate()intgetDataLength()Returns the length of the response body.TgetRequest()Returns the request this is a response to.XrootdResponse<T>getResponse()intgetStatus()The xrootd response status code.io.netty.util.ReferenceCountedtouch(java.lang.Object hint)voidwriteTo(io.netty.channel.ChannelHandlerContext ctx, io.netty.channel.ChannelPromise promise)Writes the encoded message to the given channel context.
-
-
-
Constructor Detail
-
AsyncResponse
public AsyncResponse(XrootdResponse<T> response)
-
-
Method Detail
-
getStatus
public int getStatus()
Description copied from interface:XrootdResponseThe xrootd response status code.- Specified by:
getStatusin interfaceXrootdResponse<T extends XrootdRequest>
-
getResponse
public XrootdResponse<T> getResponse()
-
getRequest
public T getRequest()
Description copied from interface:XrootdResponseReturns the request this is a response to.- Specified by:
getRequestin interfaceXrootdResponse<T extends XrootdRequest>
-
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<T extends XrootdRequest>
-
writeTo
public void writeTo(io.netty.channel.ChannelHandlerContext ctx, io.netty.channel.ChannelPromise promise)Description copied from interface:XrootdResponseWrites 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 by1and deallocates this object if the reference count reaches0.- Specified by:
writeToin interfaceXrootdResponse<T extends XrootdRequest>
-
touch
public io.netty.util.ReferenceCounted touch(java.lang.Object hint)
- Specified by:
touchin interfaceio.netty.util.ReferenceCounted
-
deallocate
protected void deallocate()
- Specified by:
deallocatein classio.netty.util.AbstractReferenceCounted
-
-