com.genesyslab.omsdk.mil
Interface MILESPSuccessResponse

All Superinterfaces:
MILESPResponse

public interface MILESPSuccessResponse
extends MILESPResponse

Represents a success ESP (External Service Protocol) response.

Send this response to Interaction Server as a result of processing an ESP request.

To get a MILESPSuccessResponse object, call the MILESPRequest.createSuccessResponse() method, as shown in the following code snippet.

MILESPSuccessResponse successResponse = myMILESPRequest.createSuccessResponse();

The created response is associated with the request from which it was created.

You can set response parameters and attach user data to the success response, by calling the setResponseParameters(java.util.Map) and setUserData(java.util.Map).

To send this response, call the inherited send() method as shown here:

//Sending the response
successResponse.send() ;

Since:
7.1.008.00
See Also:
MILESPRequest, MILESPExtension

Method Summary
 java.lang.Object getResponseParameter(java.lang.String name)
          Returns the named response parameter for this ESP response.
 java.util.Map getResponseParameters()
          Returns response parameters for this ESP response.
 java.util.Map getUserData()
          Returns the user data attached to this ESP response.
 java.lang.Object getUserDataItem(java.lang.String name)
          Returns the value of the specified user data item for this ESP response.
 void removeResponseParameter(java.lang.String name)
          Removes the specified response parameter for this ESP response.
 void removeUserDataItem(java.lang.String name)
          Removes the specified user data item for this ESP response.
 void setResponseParameter(java.lang.String name, java.lang.Object value)
          Sets the specified response parameter for this ESP response.
 void setResponseParameters(java.util.Map responseParameters)
          Sets response parameteters for this ESP response.
 void setUserData(java.util.Map userData)
          Sets user data attached to this ESP response.
 void setUserDataItem(java.lang.String name, java.lang.Object value)
          Sets the named user data item for this ESP response
 
Methods inherited from interface com.genesyslab.omsdk.mil.MILESPResponse
send
 

Method Detail

getResponseParameters

public java.util.Map getResponseParameters()
Returns response parameters for this ESP response.

Returns:
read-only Map of response parameters, where the key is a String for the user data name, and the value can be one of the following:
  • Integer
  • String
  • ArrayList of Byte or byte[], depending on the configuration option enable-attached-data-byte-array set in the Configuration Layer for this application.

setResponseParameters

public void setResponseParameters(java.util.Map responseParameters)
Sets response parameteters for this ESP response.

Parameters:
responseParameters - Map of response parameters, where the key is a String for the user data name, and the value can be one of the following:
  • Integer
  • String
  • ArrayList of Byte or byte[], depending on the configuration option enable-attached-data-byte-array set in the configuration layer for this application.

setResponseParameter

public void setResponseParameter(java.lang.String name,
                                 java.lang.Object value)
Sets the specified response parameter for this ESP response.

Parameters:
name - parameter name.
value - parameter value. The value type can be one of the following:
  • Integer
  • String
  • ArrayList of Byte or byte[], depending on the configuration option enable-attached-data-byte-array set in the Configuration Layer for this application.

getResponseParameter

public java.lang.Object getResponseParameter(java.lang.String name)
Returns the named response parameter for this ESP response.

Parameters:
name - parameter name.
Returns:
parameter value. The value type can be one of the following:
  • Integer
  • String
  • ArrayList of Byte or byte[], depending on the configuration option enable-attached-data-byte-array set in the Configuration Layer for this application.

removeResponseParameter

public void removeResponseParameter(java.lang.String name)
Removes the specified response parameter for this ESP response.

Parameters:
name - parameter name.

getUserData

public java.util.Map getUserData()
Returns the user data attached to this ESP response.

The returned Map is read-only. To modify user data, use the setUserData() and setUserDataItem() methods.

Returns:
read-only Map of user data, where the key is a String for the user data name, and the value can be one of the following:
  • Integer
  • String
  • ArrayList of Byte or byte[], depending on the configuration option enable-attached-data-byte-array set in the Configuration Layer for this application.

setUserData

public void setUserData(java.util.Map userData)
Sets user data attached to this ESP response.

Parameters:
userData - Map of user data, where key is a String for the user data name, and value can be one of the following:
  • Integer
  • String
  • ArrayList of Byte or byte[], depending on the configuration option enable-attached-data-byte-array set in the Configuration Layer for this application.

setUserDataItem

public void setUserDataItem(java.lang.String name,
                            java.lang.Object value)
Sets the named user data item for this ESP response

Parameters:
name - name of the user data item
value - value of the user data item; possible types for this value are:
  • Integer
  • String
  • ArrayList of Byte or byte[], depending on the configuration option enable-attached-data-byte-array set in the Configuration Layer for this application.

getUserDataItem

public java.lang.Object getUserDataItem(java.lang.String name)
Returns the value of the specified user data item for this ESP response.

Parameters:
name - user data item to retrieve.
Returns:
value of the user data item.

removeUserDataItem

public void removeUserDataItem(java.lang.String name)
Removes the specified user data item for this ESP response.

Parameters:
name - user data item to remove.