public abstract class BroadWorksService extends BroadWorksObject
broadWorksServer, populated
Constructor and Description |
---|
BroadWorksService()
The Serializable Constructor
|
BroadWorksService(BroadWorksServer broadWorksServer)
Creates a new BroadWorksService with the given BroadWorksServer
|
Modifier and Type | Method and Description |
---|---|
boolean |
isError(Response response)
Checks if a Response is an error with optional expected error codes
|
boolean |
isPrimary()
Returns if this service is considered primary in that it should be handled before others when pushing the service.
|
protected <R extends Response,Q extends Request<R>,O> |
mapRequestAndFire(O object,
Q request,
Object mappingObject,
Consumer<R> responseConsumer)
Convenience method to map a request to a response and add it to the request bundler
|
protected <R extends Response,Q extends Request<R>,O> |
mapRequestAndFire(O object,
Q request,
Object mappingObject,
Consumer<R> responseConsumer,
Consumer<Q> requestConsumer)
Convenience method to map a request to a response and add it to the request bundler
|
protected <R extends Response,O> |
mapRequestAndFire(O object,
Request<R> request,
Object mappingObject)
Convenience method to map a request to a response and add it to the request bundler
|
void |
setPrimary(boolean primary)
Sets the service as a primary service to be handled before non-primary services when inserting or modifying an object.
|
void |
waitForLoad() |
getBroadWorksServer, hasPopulated, isPopulated, populate, setBroadWorksServer, setPopulated
public BroadWorksService(BroadWorksServer broadWorksServer)
broadWorksServer
- public BroadWorksService()
@GwtIncompatible public void waitForLoad()
public boolean isPrimary()
public void setPrimary(boolean primary)
primary
- The boolean primary value.@GwtIncompatible protected <R extends Response,O> void mapRequestAndFire(O object, Request<R> request, Object mappingObject) throws RequestException
request
- The output requestmappingObject
- The input response or other mapped objectRequestException
@GwtIncompatible protected <R extends Response,Q extends Request<R>,O> void mapRequestAndFire(O object, Q request, Object mappingObject, Consumer<R> responseConsumer) throws RequestException
request
- The output requestmappingObject
- The input response or other mapped objectresponseConsumer
- A custom consumer for the responseRequestException
@GwtIncompatible protected <R extends Response,Q extends Request<R>,O> void mapRequestAndFire(O object, Q request, Object mappingObject, Consumer<R> responseConsumer, Consumer<Q> requestConsumer) throws RequestException
request
- The output requestmappingObject
- The input response or other mapped objectresponseConsumer
- A custom consumer for the responserequestConsumer
- A custom consumer to modify the request before firingRequestException
- Thrown if an error occurs while mapping the object and request.@GwtIncompatible public boolean isError(Response response)
response
- The response to checkCopyright © 2016 ECG. All rights reserved.