Package com.attivio.sdk.esb
Class CgiRequest
- java.lang.Object
-
- com.attivio.sdk.esb.AbstractPlatformMessage
-
- com.attivio.sdk.esb.CgiRequest
-
- All Implemented Interfaces:
PlatformMessage,java.io.Serializable,java.lang.Cloneable
public class CgiRequest extends AbstractPlatformMessage
Message that represents a request via CGI on a HTTP receiver. Contains CGI parameters and HTTP headers.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCLIENTID_PARAMCGI parameter to specify any workflowsstatic java.lang.StringOUTPUT_FORMAT_PARAMCGI parameter, specifies the output formatstatic java.lang.StringWORKFLOWS_PARAMCGI parameter to specify any workflows-
Fields inherited from interface com.attivio.sdk.esb.PlatformMessage
DEFAULT_MAX_LOG_LENGTH, MESSAGE_DROPPED, MESSAGE_SEND_TIME_PROP, PROP_MAX_LOG_LENGTH
-
-
Constructor Summary
Constructors Constructor Description CgiRequest(java.util.UUID clientID)Constructor with client ID.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CgiRequestcreate(QueryRequest qreq)Creates a CgiRequest from a QueryRequest.booleanequals(java.lang.Object other)java.util.UUIDgetCgiClientId()Gets the CGI Client ID.java.lang.StringgetCgiParameter(java.lang.String key)Get the first value for a CGI Parameter.doublegetCgiParameter(java.lang.String parameter, double defaultValue)Get the first value for a CGI Parameter as adouble.floatgetCgiParameter(java.lang.String parameter, float defaultValue)Get the first value for a CGI Parameter as afloat.intgetCgiParameter(java.lang.String parameter, int defaultValue)Get the first value for a CGI Parameter as anint.longgetCgiParameter(java.lang.String parameter, long defaultValue)Get the first value for a CGI Parameter as along.java.lang.StringgetCgiParameter(java.lang.String parameter, java.lang.String defaultValue)Get the first value for a CGI Parameter.java.util.Map<java.lang.String,java.lang.String[]>getCgiParameters()Gets CGI parameters map.WorkflowQueuegetCgiWorkflowQueue()Gets the workflow queue parsed from the CGI parameters.WorkflowQueuegetCgiWorkflows(java.lang.String parameter)Parse a parameter that contains a list of workflows.java.util.Map<java.lang.String,java.lang.String>getHttpHeaders()Gets HTTP headers.java.io.InputStreamgetInputStream()Get the InputStream associated with the request.java.lang.StringgetMethod()Gets the HTTP method from the request.java.lang.StringgetQueryString()Turn the CGI request into a url encoded parseable query stringinthashCode()voidsetCgiClientId(java.util.UUID value)Force set the CGI Client ID.voidsetCgiParameter(java.lang.String parameter, java.lang.String... values)Set a value for a CGI parameter.voidsetCgiParameters(java.lang.String query, java.lang.String encoding)Parse CGI query string and set parameters based on the results.voidsetCgiParameters(java.util.Map<java.lang.String,java.lang.String[]> cgiParameters)Sets CGI parameters.voidsetCgiWorkflowQueue(WorkflowQueue workflowQueue)Force set the CGI workflow queue.voidsetCgiWorkflows(java.lang.String parameter, WorkflowQueue workflowQueue)Set the CGI workflows from a workflow queuevoidsetHttpHeaders(java.util.Map<java.lang.String,java.lang.String> httpHeaders)Set HTTP headers map.voidsetInputStream(java.io.InputStream inputStream)Sets the InputStream associated with the request.voidsetMethod(java.lang.String method)Sets the HTTP method from teh request.java.lang.StringtoString()-
Methods inherited from class com.attivio.sdk.esb.AbstractPlatformMessage
addMessageHistory, addMessageHistory, clone, getClientId, getEstimatedSize, getMessageHistory, getMessageId, getMetadata, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getWorkflowQueue, getWorkflowQueue, hasProperty, isRedelivered, removeProperty, removeWorkflowQueue, setClientId, setMessageId, setProperty, setRedelivered, setWorkflowQueue, setWorkflowQueue, toMessageString, toString, toString, toString, toString, toString, toString, toString, toString, toString
-
-
-
-
Field Detail
-
OUTPUT_FORMAT_PARAM
public static final java.lang.String OUTPUT_FORMAT_PARAM
CGI parameter, specifies the output format- See Also:
- Constant Field Values
-
WORKFLOWS_PARAM
public static final java.lang.String WORKFLOWS_PARAM
CGI parameter to specify any workflows- See Also:
- Constant Field Values
-
CLIENTID_PARAM
public static final java.lang.String CLIENTID_PARAM
CGI parameter to specify any workflows- See Also:
- Constant Field Values
-
-
Method Detail
-
getCgiParameters
public java.util.Map<java.lang.String,java.lang.String[]> getCgiParameters()
Gets CGI parameters map.
-
setCgiParameters
public void setCgiParameters(java.lang.String query, java.lang.String encoding) throws java.io.UnsupportedEncodingExceptionParse CGI query string and set parameters based on the results.- Throws:
java.io.UnsupportedEncodingException
-
getQueryString
public java.lang.String getQueryString()
Turn the CGI request into a url encoded parseable query string
-
toString
public java.lang.String toString()
- Overrides:
toStringin classAbstractPlatformMessage
-
setCgiParameters
public void setCgiParameters(java.util.Map<java.lang.String,java.lang.String[]> cgiParameters)
Sets CGI parameters.
-
getHttpHeaders
public java.util.Map<java.lang.String,java.lang.String> getHttpHeaders()
Gets HTTP headers.
-
setHttpHeaders
public void setHttpHeaders(java.util.Map<java.lang.String,java.lang.String> httpHeaders)
Set HTTP headers map.
-
getInputStream
public java.io.InputStream getInputStream()
Get the InputStream associated with the request.
-
setInputStream
public void setInputStream(java.io.InputStream inputStream) throws java.io.IOExceptionSets the InputStream associated with the request.- Throws:
java.io.IOException
-
getMethod
public java.lang.String getMethod()
Gets the HTTP method from the request.
-
setMethod
public void setMethod(java.lang.String method)
Sets the HTTP method from teh request.
-
getCgiWorkflowQueue
public WorkflowQueue getCgiWorkflowQueue()
Gets the workflow queue parsed from the CGI parameters.
-
setCgiWorkflowQueue
public void setCgiWorkflowQueue(WorkflowQueue workflowQueue)
Force set the CGI workflow queue.
-
getCgiClientId
public java.util.UUID getCgiClientId()
Gets the CGI Client ID.
-
setCgiClientId
public void setCgiClientId(java.util.UUID value)
Force set the CGI Client ID.
-
setCgiParameter
public void setCgiParameter(java.lang.String parameter, java.lang.String... values)Set a value for a CGI parameter.
-
getCgiParameter
public java.lang.String getCgiParameter(java.lang.String key)
Get the first value for a CGI Parameter.
-
getCgiParameter
public java.lang.String getCgiParameter(java.lang.String parameter, java.lang.String defaultValue)Get the first value for a CGI Parameter.
-
getCgiParameter
public int getCgiParameter(java.lang.String parameter, int defaultValue)Get the first value for a CGI Parameter as anint.
-
getCgiParameter
public long getCgiParameter(java.lang.String parameter, long defaultValue)Get the first value for a CGI Parameter as along.
-
getCgiParameter
public float getCgiParameter(java.lang.String parameter, float defaultValue)Get the first value for a CGI Parameter as afloat.
-
getCgiParameter
public double getCgiParameter(java.lang.String parameter, double defaultValue)Get the first value for a CGI Parameter as adouble.
-
getCgiWorkflows
public WorkflowQueue getCgiWorkflows(java.lang.String parameter)
Parse a parameter that contains a list of workflows.
-
setCgiWorkflows
public void setCgiWorkflows(java.lang.String parameter, WorkflowQueue workflowQueue)Set the CGI workflows from a workflow queue
-
hashCode
public int hashCode()
- Overrides:
hashCodein classAbstractPlatformMessage
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classAbstractPlatformMessage
-
create
public static CgiRequest create(QueryRequest qreq)
Creates a CgiRequest from a QueryRequest. This is the inverse operation of theQueryRequestcreate method.Not all queries and filters are guaranteed to have equivalent parseable string representations; this method cannot guarantee an equivalent CGI Request for such cases.
-
-