Package org.apache.ofbiz.service.engine
Class GenericAsyncEngine
java.lang.Object
org.apache.ofbiz.service.engine.AbstractEngine
org.apache.ofbiz.service.engine.GenericAsyncEngine
- All Implemented Interfaces:
GenericEngine
- Direct Known Subclasses:
EntityAutoEngine
,GroovyEngine
,HttpEngine
,RmiServiceEngine
,RouteEngine
,ScriptEngine
,ServiceGroupEngine
,SimpleServiceEngine
,SOAPClientEngine
,StandardClojureEngine
,StandardJavaEngine
Generic Asynchronous Engine
-
Field Summary
Fields inherited from interface org.apache.ofbiz.service.engine.GenericEngine
ASYNC_MODE, SYNC_MODE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
allowCallbacks
(ModelService model, Map<String, Object> context, int mode) Allow callbacks boolean.void
Run the service asynchronously and IGNORE the result.void
runAsync
(String localName, ModelService modelService, Map<String, Object> context, GenericRequester requester, boolean persist) Run the service asynchronously, passing an instance of GenericRequester that will receive the result.Run the service synchronously and return the result.abstract void
runSyncIgnore
(String localName, ModelService modelService, Map<String, Object> context) Run the service synchronously and IGNORE the result.Methods inherited from class org.apache.ofbiz.service.engine.AbstractEngine
createLocationMap, getDispatcher, getLocation, sendCallbacks, sendCallbacks, sendCallbacks
-
Constructor Details
-
GenericAsyncEngine
-
-
Method Details
-
runSync
public abstract Map<String,Object> runSync(String localName, ModelService modelService, Map<String, Object> context) throws GenericServiceExceptionDescription copied from interface:GenericEngine
Run the service synchronously and return the result.- Parameters:
localName
- Name of the LocalDispatcher.modelService
- Service model object.context
- Map of name, value pairs composing the context.- Returns:
- Map of name, value pairs composing the result.
- Throws:
GenericServiceException
-
runSyncIgnore
public abstract void runSyncIgnore(String localName, ModelService modelService, Map<String, Object> context) throws GenericServiceExceptionDescription copied from interface:GenericEngine
Run the service synchronously and IGNORE the result.- Parameters:
localName
- Name of the LocalDispatcher.modelService
- Service model object.context
- Map of name, value pairs composing the context.- Throws:
GenericServiceException
-
runAsync
public void runAsync(String localName, ModelService modelService, Map<String, Object> context, boolean persist) throws GenericServiceExceptionDescription copied from interface:GenericEngine
Run the service asynchronously and IGNORE the result.- Parameters:
localName
- Name of the LocalDispatcher.modelService
- Service model object.context
- Map of name, value pairs composing the context.persist
- True for store/run; False for run.- Throws:
GenericServiceException
-
runAsync
public void runAsync(String localName, ModelService modelService, Map<String, Object> context, GenericRequester requester, boolean persist) throws GenericServiceExceptionDescription copied from interface:GenericEngine
Run the service asynchronously, passing an instance of GenericRequester that will receive the result.- Parameters:
localName
- Name of the LocalDispatcher.modelService
- Service model object.context
- Map of name, value pairs composing the context.requester
- Object implementing GenericRequester interface which will receive the result.persist
- True for store/run; False for run.- Throws:
GenericServiceException
-
allowCallbacks
protected boolean allowCallbacks(ModelService model, Map<String, Object> context, int mode) throws GenericServiceExceptionDescription copied from class:AbstractEngine
Allow callbacks boolean.- Overrides:
allowCallbacks
in classAbstractEngine
- Parameters:
model
- the modelcontext
- the contextmode
- the mode- Returns:
- the boolean
- Throws:
GenericServiceException
- the generic service exception
-