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
,StandardJavaEngine
public abstract class GenericAsyncEngine extends AbstractEngine
Generic Asynchronous Engine
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
module
-
Fields inherited from class org.apache.ofbiz.service.engine.AbstractEngine
dispatcher, locationMap
-
Fields inherited from interface org.apache.ofbiz.service.engine.GenericEngine
ASYNC_MODE, SYNC_MODE
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
GenericAsyncEngine(ServiceDispatcher dispatcher)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected boolean
allowCallbacks(ModelService model, java.util.Map<java.lang.String,java.lang.Object> context, int mode)
void
runAsync(java.lang.String localName, ModelService modelService, java.util.Map<java.lang.String,java.lang.Object> context, boolean persist)
Run the service asynchronously and IGNORE the result.void
runAsync(java.lang.String localName, ModelService modelService, java.util.Map<java.lang.String,java.lang.Object> context, GenericRequester requester, boolean persist)
Run the service asynchronously, passing an instance of GenericRequester that will receive the result.abstract java.util.Map<java.lang.String,java.lang.Object>
runSync(java.lang.String localName, ModelService modelService, java.util.Map<java.lang.String,java.lang.Object> context)
Run the service synchronously and return the result.abstract void
runSyncIgnore(java.lang.String localName, ModelService modelService, java.util.Map<java.lang.String,java.lang.Object> context)
Run the service synchronously and IGNORE the result.-
Methods inherited from class org.apache.ofbiz.service.engine.AbstractEngine
createLocationMap, getLocation, sendCallbacks, sendCallbacks, sendCallbacks
-
-
-
-
Constructor Detail
-
GenericAsyncEngine
protected GenericAsyncEngine(ServiceDispatcher dispatcher)
-
-
Method Detail
-
runSync
public abstract java.util.Map<java.lang.String,java.lang.Object> runSync(java.lang.String localName, ModelService modelService, java.util.Map<java.lang.String,java.lang.Object> context) throws GenericServiceException
Description 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
- See Also:
GenericEngine.runSync(java.lang.String, org.apache.ofbiz.service.ModelService, java.util.Map)
-
runSyncIgnore
public abstract void runSyncIgnore(java.lang.String localName, ModelService modelService, java.util.Map<java.lang.String,java.lang.Object> context) throws GenericServiceException
Description 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
- See Also:
GenericEngine.runSyncIgnore(java.lang.String, org.apache.ofbiz.service.ModelService, java.util.Map)
-
runAsync
public void runAsync(java.lang.String localName, ModelService modelService, java.util.Map<java.lang.String,java.lang.Object> context, boolean persist) throws GenericServiceException
Description 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
- See Also:
GenericEngine.runAsync(java.lang.String, org.apache.ofbiz.service.ModelService, java.util.Map, boolean)
-
runAsync
public void runAsync(java.lang.String localName, ModelService modelService, java.util.Map<java.lang.String,java.lang.Object> context, GenericRequester requester, boolean persist) throws GenericServiceException
Description 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
- See Also:
GenericEngine.runAsync(java.lang.String, org.apache.ofbiz.service.ModelService, java.util.Map, org.apache.ofbiz.service.GenericRequester, boolean)
-
allowCallbacks
protected boolean allowCallbacks(ModelService model, java.util.Map<java.lang.String,java.lang.Object> context, int mode) throws GenericServiceException
- Overrides:
allowCallbacks
in classAbstractEngine
- Throws:
GenericServiceException
-
-