Package org.apache.ofbiz.service.engine
Class InterfaceEngine
java.lang.Object
org.apache.ofbiz.service.engine.InterfaceEngine
- All Implemented Interfaces:
GenericEngine
InterfaceEngine.java
-
Field Summary
Fields inherited from interface org.apache.ofbiz.service.engine.GenericEngine
ASYNC_MODE, SYNC_MODE
-
Constructor 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)
-
Constructor Details
-
InterfaceEngine
-
-
Method Details
-
runSync
public 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.- Specified by:
runSync
in interfaceGenericEngine
- 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 void runSyncIgnore(String localName, ModelService modelService, Map<String, Object> context) throws GenericServiceExceptionDescription copied from interface:GenericEngine
Run the service synchronously and IGNORE the result.- Specified by:
runSyncIgnore
in interfaceGenericEngine
- 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, GenericRequester requester, boolean persist) throws GenericServiceExceptionDescription copied from interface:GenericEngine
Run the service asynchronously, passing an instance of GenericRequester that will receive the result.- Specified by:
runAsync
in interfaceGenericEngine
- 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
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.- Specified by:
runAsync
in interfaceGenericEngine
- 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
public void sendCallbacks(ModelService modelService, Map<String, Object> context, int mode) throws GenericServiceExceptionDescription copied from interface:GenericEngine
Send the service callbacks- Specified by:
sendCallbacks
in interfaceGenericEngine
- Parameters:
modelService
- Service model objectcontext
- Map of name, value pairs composing the contextmode
- Service mode (sync or async)- Throws:
GenericServiceException
-
sendCallbacks
public void sendCallbacks(ModelService modelService, Map<String, Object> context, Map<String, throws GenericServiceExceptionObject> result, int mode) - Specified by:
sendCallbacks
in interfaceGenericEngine
- Throws:
GenericServiceException
-
sendCallbacks
public void sendCallbacks(ModelService modelService, Map<String, Object> context, Throwable t, int mode) throws GenericServiceException- Specified by:
sendCallbacks
in interfaceGenericEngine
- Throws:
GenericServiceException
-