public abstract class AbstractInternalInputBuffer extends Object implements InputBuffer
AbstractInternalInputBuffer
Created on Jan 10, 2012 at 10:31:06 AMModifier and Type | Field and Description |
---|---|
protected InputFilter[] |
activeFilters
Active filters (in order).
|
protected ByteBuffer |
bbuf
Direct byte buffer used to perform actual reading.
|
protected byte[] |
buf
Pointer to the current read buffer.
|
protected int |
end
Position of the end of the header in the buffer, which is also the start
of the body.
|
protected InputFilter[] |
filterLibrary
Filter library.
|
protected MimeHeaders |
headers
Headers of the associated request.
|
protected InputBuffer |
inputBuffer
Underlying input buffer.
|
protected int |
lastActiveFilter
Index of the last active filter.
|
protected int |
lastValid
Last valid byte.
|
protected boolean |
parsingHeader
State.
|
protected int |
pos
Position in the buffer.
|
protected int |
readTimeout
Read timeout
|
protected Request |
request
Associated Coyote request.
|
protected boolean |
swallowInput
Swallow input ? (in the case of an expectation)
|
protected static TimeUnit |
unit
The default time unit
|
Constructor and Description |
---|
AbstractInternalInputBuffer(Request request)
Create a new instance of
AbstractInternalInputBuffer |
AbstractInternalInputBuffer(Request request,
int headerBufferSize)
Create a new instance of
AbstractInternalInputBuffer |
Modifier and Type | Method and Description |
---|---|
void |
addActiveFilter(InputFilter filter)
Add an input filter to the filter library.
|
void |
addFilter(InputFilter filter)
Add an input filter to the filter library.
|
void |
clearFilters()
Clear filters.
|
void |
endRequest()
End request (consumes leftover bytes).
|
protected abstract boolean |
fill()
Fill the internal buffer using data from the undelying input stream.
|
InputFilter[] |
getFilters()
Get filters.
|
boolean |
nextRequest()
End processing of current HTTP request.
|
boolean |
parseHeader()
Parse an HTTP header.
|
void |
parseHeaders()
Parse the HTTP headers.
|
void |
parseRequestLine()
Read the request line.
|
void |
recycle()
Recycle the input buffer.
|
void |
removeActiveFilters() |
protected void |
reset() |
void |
setSwallowInput(boolean swallowInput)
Set the swallow input flag.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
doRead
protected Request request
protected MimeHeaders headers
protected boolean parsingHeader
protected boolean swallowInput
protected byte[] buf
protected ByteBuffer bbuf
protected int lastValid
protected int pos
protected int end
protected InputFilter[] filterLibrary
protected InputFilter[] activeFilters
protected int lastActiveFilter
protected InputBuffer inputBuffer
protected int readTimeout
protected static final TimeUnit unit
public AbstractInternalInputBuffer(Request request)
AbstractInternalInputBuffer
request
- public AbstractInternalInputBuffer(Request request, int headerBufferSize)
AbstractInternalInputBuffer
request
- headerBufferSize
- public InputFilter[] getFilters()
public void setSwallowInput(boolean swallowInput)
swallowInput
- public void addFilter(InputFilter filter)
filter
- public void clearFilters()
public void addActiveFilter(InputFilter filter)
filter
- public void removeActiveFilters()
public void recycle()
protected void reset()
public boolean nextRequest()
public void endRequest() throws IOException
IOException
- an undelying I/O error occuredpublic void parseRequestLine() throws IOException
IOException
- If an exception occurs during the underlying socket read
operations, or if the given buffer is not big enough to
accomodate the whole line.public void parseHeaders() throws IOException
IOException
public boolean parseHeader() throws IOException
IOException
protected abstract boolean fill() throws IOException
IOException
Copyright © 2014 JBoss by Red Hat. All rights reserved.