|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface HttpRequest
Interface providing the means to analyse the incoming HTTP request. The object
implementing the HttpRequest interface is a Temporary Entry Point Object.
| Method Summary | |
|---|---|
short |
findAndCopyKeywordValue(byte[] headerKeywordName,
short nameOffs,
short nameLength,
byte[] buffer,
short bufferOffs,
short maxLength)
Find and copy the value of a header. |
short |
findAndCopyKeywordValue(short keywordId,
byte[] buffer,
short bufferOffs,
short maxLength)
Find and copy the value of a header or the value of a keyword/value part of the URI indicated by a keywordId. |
int |
getContentLength()
Returns the length of the HTTP request content |
short |
getContentType()
Returns the content-type keyword of the HTTP request |
short |
getRequestHttpVersion()
Returns the version of the HTTP protocol of the current request. |
short |
readContent(int requestOffset,
byte[] data,
short offset,
short len)
Read a part of the request content. |
short |
readContentType(byte[] data,
short offs,
short len)
Reads the content type given in the HTTP request (e.g. |
| Method Detail |
|---|
short findAndCopyKeywordValue(byte[] headerKeywordName,
short nameOffs,
short nameLength,
byte[] buffer,
short bufferOffs,
short maxLength)
throws java.lang.NullPointerException,
java.lang.ArrayIndexOutOfBoundsException
headerKeywordName - buffer that contains the name of the requested headernameOffs - offset within headerKeywordNamenameLength - length of data within headerKeywordNamebuffer - buffer where the value shall be copiedbufferOffs - offset where the value shall be copiedmaxLength - maximum length of the value that shall be copied
bufferOffs+length of the copied value or KEYWORD_NOT_FOUND in case the keyword is not found
java.lang.NullPointerException - if headerKeywordName or buffer is equal to null
java.lang.ArrayIndexOutOfBoundsException - if the copy operation would cause access out of bounds
short findAndCopyKeywordValue(short keywordId,
byte[] buffer,
short bufferOffs,
short maxLength)
throws ScwsException,
java.lang.NullPointerException,
java.lang.ArrayIndexOutOfBoundsException
keywordId. The supported keywords are
defined in ScwsConstants Interface.
keywordId - value of the request header name or part of the URIbuffer - buffer where the value shall be copiedbufferOffs - offset where the value shall be copiedmaxLength - maximum length of the value that shall be copied
bufferOffs+length of the copied value or KEYWORD_NOT_FOUND in case the keyword is not found
ScwsException - with reason UNKNOWN_KEYWORD_ID if the keywordId is not recognized
java.lang.NullPointerException - if buffer is equal to null
java.lang.ArrayIndexOutOfBoundsException - if the copy operation would cause access out of boundsScwsConstantsint getContentLength()
short getRequestHttpVersion()
KEYWORD_NOT_FOUND in case the content type
header field is not present, or CONTENT_TYPE_UNKNOWN in case the content type doesn't
match one of the possible content type keywords defined in ScwsConstants.short getContentType()
ScwsConstants
short readContentType(byte[] data,
short offs,
short len)
throws java.lang.NullPointerException,
java.lang.ArrayIndexOutOfBoundsException
data - buffer to hold the content type from the request.offs - start in the buffer to hold the content type.len - maximum length of the content type to be copied
offs+length of the copied value.
java.lang.NullPointerException - if data is equal to null
java.lang.ArrayIndexOutOfBoundsException - if the read operation would
cause access out of bounds
short readContent(int requestOffset,
byte[] data,
short offset,
short len)
throws ScwsException,
java.lang.NullPointerException,
java.lang.ArrayIndexOutOfBoundsException
requestOffset - Offset within the HTTP request to start reading the request
content.data - byte array where request content shall be copied.offset - offset within buffer.len - maximum length of the content to be copied.
offset+length of the copied value.
ScwsException - with reason UNREACHABLE_OFFSET if the requested offset could not be reached.
java.lang.NullPointerException - if data is equal to null
java.lang.ArrayIndexOutOfBoundsException - if the read operation would
cause access out of bounds
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||