Class ResponseBundle
java.lang.Object
co.ecg.alpaca.toolkit.messaging.response.ResponseBundle
- All Implemented Interfaces:
Serializable
Defines a bundle of responses from the BroadWorks Server. It is serializable
so it can be conveniently cached by JCS.
- Author:
- Matthew Keathley on 6/8/15
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if the RequestBundle contains an error responseReturns the list of Responses in the Response Bundle that are errorsReturns the backing request bundle for the response bundlestatic ResponseBundle
getResponseBundle
(String responseContent, RequestBundle requestBundle) This creates an object that extends the Response class with the given response content.<T extends Response>
TgetResponseForRequest
(Request<T> request) Returns the response for a given request from the backing mapReturns the full list of responses from the Response Bundlevoid
setRequestBundle
(RequestBundle requestBundle)
-
Field Details
-
requestBundle
-
responseMap
-
-
Constructor Details
-
ResponseBundle
public ResponseBundle()
-
-
Method Details
-
getResponseBundle
This creates an object that extends the Response class with the given response content.- Parameters:
responseContent
- The XML response from BroadWorks as a StringrequestBundle
- The RequestBundle that was sent to BroadWorks- Returns:
- Returns the ResponseBundle.
-
containsError
Returns true if the RequestBundle contains an error response- Returns:
- Returns true if any of the Responses were of 'ErrorResponse' type.
- Throws:
RequestException
-
getErrorResponses
Returns the list of Responses in the Response Bundle that are errors- Returns:
- Returns the list of Responses for which they were of 'ErrorResponse' type.
-
getRequestBundle
Returns the backing request bundle for the response bundle- Returns:
- The RequestBundle that formed this Response Bundle.
-
setRequestBundle
-
getResponseForRequest
Returns the response for a given request from the backing map- Parameters:
request
- The request key- Returns:
- The Response for the given Request object.
-
getResponseList
Returns the full list of responses from the Response Bundle- Returns:
- The Response list as a Collection.
-
getResponseMap
- Returns:
- the backing HashMap of Requests to Responses
-