Server SDK  
com.verivo.akula.api.data.module.AKRequest Interface Reference

The AKRequest interface contains methods to get the request parameters, application properties, and system properties that are required for processing the request. More...

Inheritance diagram for com.verivo.akula.api.data.module.AKRequest:
Inheritance graph

Public Member Functions

String getAcceptTypes ()
 Gets the Accept header values.
 
URI getBaseURI ()
 Gets the Base URI of the HTTP Request.
 
String getBodyAsString ()
 Gets body as a string using the HTTP request charset.
 
InputStreamReader getBodyReader ()
 Gets an InputStreamReader object for the body inputStream that uses the request charset.
 
String getCharset ()
 Gets HTTP Request charset.
 
String getContentType ()
 Gets the value of the content-type header.
 
AKSubject getCurrentSubject ()
 Returns the current AKSubject object that is executing the request.
 
AKAttachment getFormAttachment (String name)
 Returns an AttachmentImpl object whose HTTP request filename matches the string passed in.
 
Map< String, AKAttachmentgetFormAttachments ()
 Gets all the attachments on a message as a Map<String, AttachmentImpl>.
 
String getFormParam (String key)
 Gets a form parameter by key.
 
Map< String, String > getFormParams ()
 Gets a copy of form parameters.
 
String getMethod ()
 Gets the HTTP method used for this request.
 
String getPathParam (String key)
 Gets a path parameter by key.
 
Map< String, String > getPathParams ()
 Gets the path parameters.
 
String getQueryParam (String key)
 Gets a single query string parameter by key.
 
Map< String, String > getQueryParams ()
 Gets query string parameters in the request URL.
 
boolean isAcceptAll ()
 Returns true if the accept header on the HTTP request is set to "*\*".
 
boolean isAcceptJson ()
 Determines if text/json or application/json is one of the Accept header values.
 
boolean isContentJson ()
 Determines if the content type is JSON.
 
- Public Member Functions inherited from com.verivo.akula.api.data.module.AKMessage
Object getBackingMessage ()
 Returns the backing Camel Message object.
 
Object getBody ()
 Returns the body of this message.
 
< T > T getBody (Class< T > tClass)
 Returns the body of the message as a Java object.
 
Object getHeader (String name)
 Returns the value a header associated with this message.
 
< T > T getHeader (String name, Class< T > tClass)
 Returns a header associated with this message by name and by specifying the type.
 
Map< String, Object > getHeaders ()
 Returns a Map of all headers for this message.
 
int getStatus ()
 Returns the HTTP status code for this message.
 
boolean hasHeaders ()
 Returns whether any headers have been set.
 
Object removeHeader (String name)
 Removes a header from the header map.
 
void setBody (Object body)
 Sets the body of this message.
 
void setContentType (String contentType)
 Sets the MimeType of the body of this message.
 
void setHeader (String name, Object value)
 Sets the value of a header associated with this message.
 
void setHeaders (Map< String, Object > header_map)
 Sets the map of all headers.
 
void setStatus (int status)
 Sets an HTTP status code for this message.
 

Detailed Description

The AKRequest interface contains methods to get the request parameters, application properties, and system properties that are required for processing the request.

The values in this object typically do not change: they remain the same as the request moves through its processing pipeline.

Member Function Documentation

String com.verivo.akula.api.data.module.AKRequest.getAcceptTypes ( )

Gets the Accept header values.

Returns
The Accept header values.
Version
1.0
URI com.verivo.akula.api.data.module.AKRequest.getBaseURI ( )

Gets the Base URI of the HTTP Request.

For example, a request to http://localhost:8080/akula/YOUR_SCOPE/data/YOUR_ENDPOINT will have a Base URI representing the url http://localhost:8080/akula/YOUR_SCOPE

Returns
The Base URI of the HTTP Request.
Version
2.0
String com.verivo.akula.api.data.module.AKRequest.getBodyAsString ( )

Gets body as a string using the HTTP request charset.

Returns
The request body converted to a string.
Version
1.0
InputStreamReader com.verivo.akula.api.data.module.AKRequest.getBodyReader ( )

Gets an InputStreamReader object for the body inputStream that uses the request charset.

Returns
The InputStreamReader to read request's body.
Version
1.0
String com.verivo.akula.api.data.module.AKRequest.getCharset ( )

Gets HTTP Request charset.

Returns
The request charset.
Version
1.0
String com.verivo.akula.api.data.module.AKRequest.getContentType ( )

Gets the value of the content-type header.

Returns
The value of the content-type header.
Version
1.0

Implements com.verivo.akula.api.data.module.AKMessage.

AKSubject com.verivo.akula.api.data.module.AKRequest.getCurrentSubject ( )

Returns the current AKSubject object that is executing the request.

Returns
The current AKSubject object.
Version
1.0
AKAttachment com.verivo.akula.api.data.module.AKRequest.getFormAttachment ( String  name)

Returns an AttachmentImpl object whose HTTP request filename matches the string passed in.

Parameters
nameThe filename of the attachment.
Returns
The AttachmentImpl object representing the attachment.
Version
1.0
Map<String, AKAttachment> com.verivo.akula.api.data.module.AKRequest.getFormAttachments ( )

Gets all the attachments on a message as a Map<String, AttachmentImpl>.

Returns
The Map object.
Version
1.0
String com.verivo.akula.api.data.module.AKRequest.getFormParam ( String  key)

Gets a form parameter by key.

Parameters
keyThe name of the form parameter.
Returns
The value of the form parameter.
Version
1.0
Map<String, String> com.verivo.akula.api.data.module.AKRequest.getFormParams ( )

Gets a copy of form parameters.

Returns
A Map object of form parameter names and values.
Version
1.0
String com.verivo.akula.api.data.module.AKRequest.getMethod ( )

Gets the HTTP method used for this request.

Returns
The HTTP method. Possible values are GET, POST, DELETE, and UPDATE.
Version
1.0
String com.verivo.akula.api.data.module.AKRequest.getPathParam ( String  key)

Gets a path parameter by key.

Parameters
keyThe key name of the path parameter.
Returns
A String containing the parameter value.
Version
1.0
Map<String, String> com.verivo.akula.api.data.module.AKRequest.getPathParams ( )

Gets the path parameters.

Returns
A Map object of path parameters.
Version
1.0
String com.verivo.akula.api.data.module.AKRequest.getQueryParam ( String  key)

Gets a single query string parameter by key.

Parameters
keyThe name of the query string parameter.
Returns
The value of the query string parameter.
Version
1.0
Map<String, String> com.verivo.akula.api.data.module.AKRequest.getQueryParams ( )

Gets query string parameters in the request URL.

Returns
A Map object of query string parameter names and values.
Version
1.0
boolean com.verivo.akula.api.data.module.AKRequest.isAcceptAll ( )

Returns true if the accept header on the HTTP request is set to "*\*".

Returns
true if the accept header on the HTTP request is set to "*\*".
Version
1.0
boolean com.verivo.akula.api.data.module.AKRequest.isAcceptJson ( )

Determines if text/json or application/json is one of the Accept header values.

Returns
Returns true if the Accept header is text/json or application/json. Otherwise, returns false.
Version
1.0
boolean com.verivo.akula.api.data.module.AKRequest.isContentJson ( )

Determines if the content type is JSON.

Returns
Returns true if the content-type header is text/json or application/json.
Version
1.0

Implements com.verivo.akula.api.data.module.AKMessage.