Package org.apache.ofbiz.service.engine
Class AbstractEngine
java.lang.Object
org.apache.ofbiz.service.engine.AbstractEngine
- All Implemented Interfaces:
GenericEngine
- Direct Known Subclasses:
GenericAsyncEngine
,JmsServiceEngine
Abstract Service 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.Instantiates the location map.Gets dispatcher.protected String
getLocation
(ModelService model) Looks for location aliases which are set byservice-location
elements inside theserviceengine.xml
configuration file.void
sendCallbacks
(ModelService model, Map<String, Object> context, int mode) Send the service callbacksvoid
sendCallbacks
(ModelService model, Map<String, Object> context, Throwable t, int mode) void
sendCallbacks
(ModelService model, Map<String, Object> context, Map<String, Object> result, int mode) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.ofbiz.service.engine.GenericEngine
runAsync, runAsync, runSync, runSyncIgnore
-
Constructor Details
-
AbstractEngine
-
-
Method Details
-
getDispatcher
Gets dispatcher.- Returns:
- the dispatcher
-
createLocationMap
Instantiates the location map.- Returns:
- an immutable location map.
-
getLocation
Looks for location aliases which are set byservice-location
elements inside theserviceengine.xml
configuration file.- Parameters:
model
- the object representing a service- Returns:
- the actual location where to find the service implementation
-
sendCallbacks
public void sendCallbacks(ModelService model, Map<String, Object> context, int mode) throws GenericServiceExceptionDescription copied from interface:GenericEngine
Send the service callbacks- Specified by:
sendCallbacks
in interfaceGenericEngine
- Parameters:
model
- Service model objectcontext
- Map of name, value pairs composing the contextmode
- Service mode (sync or async)- Throws:
GenericServiceException
-
sendCallbacks
public void sendCallbacks(ModelService model, Map<String, Object> context, Throwable t, int mode) throws GenericServiceException- Specified by:
sendCallbacks
in interfaceGenericEngine
- Throws:
GenericServiceException
-
sendCallbacks
public void sendCallbacks(ModelService model, Map<String, Object> context, Map<String, throws GenericServiceExceptionObject> result, int mode) - Specified by:
sendCallbacks
in interfaceGenericEngine
- Throws:
GenericServiceException
-
allowCallbacks
protected boolean allowCallbacks(ModelService model, Map<String, Object> context, int mode) throws GenericServiceExceptionAllow callbacks boolean.- Parameters:
model
- the modelcontext
- the contextmode
- the mode- Returns:
- the boolean
- Throws:
GenericServiceException
- the generic service exception
-