getStatusCode
getStatusCode()

The getStatusCode method returns the status code of a Response object.

Return value

The Response object returns an integer.

*
*
*
Example

The following is an example of how you can use getStatusCode in error handling.

public static void processSetDebugResponse(Response response)
{
// check if response is successful or not
if(response.getStatusCode() == Response.STATUS_SUCCESS)
{
System.out.println("setDebug call processed with no warnings or errors");
}
else if(response.getStatusCode() == Response.STATUS_WARNING)
{
System.out.println("setDebug call processed with a warning");
}
else
{
System.out.println("setDebug call processed with an error");
}

// For any non-successes, there should be advisory messages explaining why
if(response.getStatusCode() != Response.STATUS_SUCCESS)
printDetailMessageOfWarningOrError("setDebug",
response.getAdvisoryMessages());
}


IBM Unica Interact
 
8.5.0
For more information, see our support and community site: Customer Central