Package org.dcache.xrootd.stream
Interface ChunkedResponse
-
- All Known Implementing Classes:
AbstractChunkedReadResponse,AbstractChunkedReadvResponse,ChunkedFileChannelReadResponse,ChunkedFileChannelReadvResponse,ChunkedFileReadvResponse
public interface ChunkedResponseA large xrootd response which is consumed byChunkedResponseWriteHandler.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Releases the resources associated with the stream.XrootdRequestgetRequest()Returns the request this is a response to.booleanisEndOfInput()Returntrueif and only if there is no data left in the stream and the stream has reached its end.XrootdResponse<?>nextChunk(io.netty.buffer.ByteBufAllocator alloc)Fetches a chunk from the stream.
-
-
-
Method Detail
-
getRequest
XrootdRequest getRequest()
Returns the request this is a response to.
-
nextChunk
XrootdResponse<?> nextChunk(io.netty.buffer.ByteBufAllocator alloc) throws java.lang.Exception
Fetches a chunk from the stream.- Returns:
- the fetched chunk
- Throws:
java.lang.Exception
-
isEndOfInput
boolean isEndOfInput() throws java.lang.ExceptionReturntrueif and only if there is no data left in the stream and the stream has reached its end.- Throws:
java.lang.Exception
-
close
void close() throws java.lang.ExceptionReleases the resources associated with the stream.- Throws:
java.lang.Exception
-
-