Package org.apache.ofbiz.service.engine
Interface GenericEngine
- All Known Implementing Classes:
AbstractEngine
,EntityAutoEngine
,GenericAsyncEngine
,GroovyEngine
,HttpEngine
,InterfaceEngine
,JmsServiceEngine
,RmiServiceEngine
,RouteEngine
,ScriptEngine
,ServiceGroupEngine
,SimpleServiceEngine
,SOAPClientEngine
,StandardClojureEngine
,StandardJavaEngine
public interface GenericEngine
Generic Engine Interface
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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.void
runSyncIgnore
(String localName, ModelService modelService, Map<String, Object> context) Run the service synchronously and IGNORE the result.void
sendCallbacks
(ModelService modelService, Map<String, Object> context, int mode) Send the service callbacksvoid
sendCallbacks
(ModelService modelService, Map<String, Object> context, Throwable t, int mode) void
sendCallbacks
(ModelService modelService, Map<String, Object> context, Map<String, Object> result, int mode)
-
Field Details
-
ASYNC_MODE
static final int ASYNC_MODE- See Also:
-
SYNC_MODE
static final int SYNC_MODE- See Also:
-
-
Method Details
-
runSync
Map<String,Object> runSync(String localName, ModelService modelService, Map<String, Object> context) throws GenericServiceExceptionRun 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
void runSyncIgnore(String localName, ModelService modelService, Map<String, Object> context) throws GenericServiceExceptionRun 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
void runAsync(String localName, ModelService modelService, Map<String, Object> context, GenericRequester requester, boolean persist) throws GenericServiceExceptionRun 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
-
runAsync
void runAsync(String localName, ModelService modelService, Map<String, Object> context, boolean persist) throws GenericServiceExceptionRun 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
-
sendCallbacks
void sendCallbacks(ModelService modelService, Map<String, Object> context, int mode) throws GenericServiceExceptionSend the service callbacks- Parameters:
modelService
- Service model objectcontext
- Map of name, value pairs composing the contextmode
- Service mode (sync or async)- Throws:
GenericServiceException
-
sendCallbacks
void sendCallbacks(ModelService modelService, Map<String, Object> context, Map<String, throws GenericServiceExceptionObject> result, int mode) - Throws:
GenericServiceException
-
sendCallbacks
void sendCallbacks(ModelService modelService, Map<String, Object> context, Throwable t, int mode) throws GenericServiceException- Throws:
GenericServiceException
-