public class RequestBundle extends Object implements Callable<ResponseBundle>
Constructor and Description |
---|
RequestBundle(BroadWorksServer bws) |
Modifier and Type | Method and Description |
---|---|
void |
addRequest(Request<?> request)
Adds a new request to the bundle
|
ResponseBundle |
call() |
ResponseBundle |
fire()
This generates a Response object from a Request.
|
ResponseBundle |
fire(OCSClient ocsClient,
boolean readFromCache)
This generates a Response object from a Request.
|
BroadWorksServer |
getBroadWorksServer() |
BroadWorksServer |
getBroadWorksServerForRequest() |
List<Request<?>> |
getRequestBundle() |
boolean |
isFull()
Checks if the Request Bundle can hold any more elements
|
boolean |
isValid()
Returns True if the Request has no constraint violations
|
void |
setBroadWorksServer(BroadWorksServer bws) |
void |
setHandler(ResponseBundleHandler handler) |
String |
toString()
The RequestBundle as transformed into the expected XML message
|
Set<javax.validation.ConstraintViolation<Request<?>>> |
validate()
Returns the set of Constraint Violations for the RequestBundle.
|
public RequestBundle(BroadWorksServer bws)
public void addRequest(Request<?> request) throws RequestException
request
- The Request to be added.RequestException
- Thrown if the Request is invalid or the bundle is too large.public ResponseBundle fire() throws RequestException
RequestException
- Thrown if an error occurs while sending this bundle to BroadWorks.public ResponseBundle fire(OCSClient ocsClient, boolean readFromCache) throws RequestException
ocsClient
- Specify the OCSClient to send this request bundle. If NULL the OCSSwitchboard is used.readFromCache
- Enables reading from the JCS cache for retrieving the response. Defaults to 'true'.RequestException
- Thrown if an error occurs while sending this bundle to BroadWorks.public BroadWorksServer getBroadWorksServer()
public void setBroadWorksServer(BroadWorksServer bws)
public BroadWorksServer getBroadWorksServerForRequest()
public void setHandler(ResponseBundleHandler handler)
public boolean isFull()
public boolean isValid()
public String toString()
public Set<javax.validation.ConstraintViolation<Request<?>>> validate()
public ResponseBundle call() throws Exception
call
in interface Callable<ResponseBundle>
Exception
Copyright © 2016 ECG. All rights reserved.