public abstract class AbstractChunkedReadvResponse extends Object implements ChunkedResponse
| Modifier and Type | Field and Description |
|---|---|
protected int |
index |
protected int |
maxFrameSize |
protected ReadVRequest |
request |
protected GenericReadRequestMessage.EmbeddedReadRequest[] |
requests |
| Constructor and Description |
|---|
AbstractChunkedReadvResponse(ReadVRequest request,
int maxFrameSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Releases the resources associated with the stream.
|
XrootdRequest |
getRequest()
Returns the request this is a response to.
|
protected abstract long |
getSize(int fd) |
boolean |
isEndOfInput()
Return
true if and only if there is no data left in the stream
and the stream has reached its end. |
ReadResponse |
nextChunk()
Fetches a chunk from the stream.
|
protected abstract org.jboss.netty.buffer.ChannelBuffer |
read(int fd,
long position,
int length) |
protected final ReadVRequest request
protected final int maxFrameSize
protected final GenericReadRequestMessage.EmbeddedReadRequest[] requests
protected int index
public AbstractChunkedReadvResponse(ReadVRequest request, int maxFrameSize)
public XrootdRequest getRequest()
ChunkedResponsegetRequest in interface ChunkedResponsepublic ReadResponse nextChunk() throws Exception
ChunkedResponsenextChunk in interface ChunkedResponseExceptionpublic boolean isEndOfInput()
throws Exception
ChunkedResponsetrue if and only if there is no data left in the stream
and the stream has reached its end.isEndOfInput in interface ChunkedResponseExceptionpublic void close()
throws Exception
ChunkedResponseclose in interface ChunkedResponseExceptionprotected abstract long getSize(int fd)
throws IOException,
XrootdException
IOExceptionXrootdExceptionprotected abstract org.jboss.netty.buffer.ChannelBuffer read(int fd,
long position,
int length)
throws IOException,
XrootdException
IOExceptionXrootdExceptionCopyright © 2013 dCache.org. All rights reserved.