org.ofbiz.service.engine
Class AbstractEngine

java.lang.Object
  extended by org.ofbiz.service.engine.AbstractEngine
All Implemented Interfaces:
GenericEngine
Direct Known Subclasses:
GenericAsyncEngine, JmsServiceEngine

public abstract class AbstractEngine
extends java.lang.Object
implements GenericEngine

Abstract Service Engine


Field Summary
protected  ServiceDispatcher dispatcher
           
protected static java.util.Map<java.lang.String,java.lang.String> locationMap
           
static java.lang.String module
           
 
Fields inherited from interface org.ofbiz.service.engine.GenericEngine
ASYNC_MODE, SYNC_MODE
 
Constructor Summary
protected AbstractEngine(ServiceDispatcher dispatcher)
           
 
Method Summary
protected  boolean allowCallbacks(ModelService model, java.util.Map<java.lang.String,java.lang.Object> context, int mode)
           
protected  java.lang.String getLocation(ModelService model)
           
protected  void initLocations()
           
 void sendCallbacks(ModelService model, java.util.Map<java.lang.String,java.lang.Object> context, int mode)
          Send the service callbacks
 void sendCallbacks(ModelService model, java.util.Map<java.lang.String,java.lang.Object> context, java.util.Map<java.lang.String,java.lang.Object> result, int mode)
           
 void sendCallbacks(ModelService model, java.util.Map<java.lang.String,java.lang.Object> context, java.lang.Throwable t, 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.ofbiz.service.engine.GenericEngine
runAsync, runAsync, runSync, runSyncIgnore
 

Field Detail

module

public static final java.lang.String module

locationMap

protected static java.util.Map<java.lang.String,java.lang.String> locationMap

dispatcher

protected ServiceDispatcher dispatcher
Constructor Detail

AbstractEngine

protected AbstractEngine(ServiceDispatcher dispatcher)
Method Detail

initLocations

protected void initLocations()

getLocation

protected java.lang.String getLocation(ModelService model)

sendCallbacks

public void sendCallbacks(ModelService model,
                          java.util.Map<java.lang.String,java.lang.Object> context,
                          int mode)
                   throws GenericServiceException
Description copied from interface: GenericEngine
Send the service callbacks

Specified by:
sendCallbacks in interface GenericEngine
Parameters:
model - Service model object
context - Map of name, value pairs composing the context
mode - Service mode (sync or async)
Throws:
GenericServiceException
See Also:
org.ofbiz.service.engine.GenericEngine#sendCallbacks(org.ofbiz.service.ModelService, java.util.Map, java.lang.Object, int)

sendCallbacks

public void sendCallbacks(ModelService model,
                          java.util.Map<java.lang.String,java.lang.Object> context,
                          java.lang.Throwable t,
                          int mode)
                   throws GenericServiceException
Specified by:
sendCallbacks in interface GenericEngine
Throws:
GenericServiceException

sendCallbacks

public void sendCallbacks(ModelService model,
                          java.util.Map<java.lang.String,java.lang.Object> context,
                          java.util.Map<java.lang.String,java.lang.Object> result,
                          int mode)
                   throws GenericServiceException
Specified by:
sendCallbacks in interface GenericEngine
Throws:
GenericServiceException

allowCallbacks

protected boolean allowCallbacks(ModelService model,
                                 java.util.Map<java.lang.String,java.lang.Object> context,
                                 int mode)
                          throws GenericServiceException
Throws:
GenericServiceException