org.apache.ode.bpel.engine
Class BpelEngineImpl

java.lang.Object
  extended by org.apache.ode.bpel.engine.BpelEngineImpl
All Implemented Interfaces:
BpelEngine, Scheduler.JobProcessor

public class BpelEngineImpl
extends java.lang.Object
implements BpelEngine

Implementation of the BpelEngine interface: provides the server methods that should be invoked in the context of a transaction.


Constructor Summary
BpelEngineImpl(Contexts contexts)
           
 
Method Summary
 MyRoleMessageExchange createMessageExchange(java.lang.String clientKey, javax.xml.namespace.QName targetService, java.lang.String operation)
          Create a "my role" message exchange for invoking a BPEL process.
 MyRoleMessageExchange createMessageExchange(java.lang.String clientKey, javax.xml.namespace.QName targetService, java.lang.String operation, java.lang.String pipedMexId)
           
protected  PartnerRoleMessageExchangeImpl createPartnerRoleMessageExchangeImpl(MessageExchangeDAO mexdao, javax.wsdl.PortType ptype, javax.wsdl.Operation op, OPartnerLink plink, BpelProcess process)
           
 boolean dehydrateLastUnusedProcess()
          Returns true if the last used process was dehydrated because it was not in-use.
 long getHydratedFootprint()
           
 int getHydratedProcessCount(javax.xml.namespace.QName processName)
           
 long getHydratedProcessSize(javax.xml.namespace.QName processName)
           
 int getInstanceThrottledMaximumCount()
           
 MessageExchange getMessageExchange(java.lang.String mexId)
          Retrieve a message identified by the given identifer.
 BpelProcess getProcess(javax.xml.namespace.QName pid)
           
 int getProcessThrottledMaximumCount()
           
 long getProcessThrottledMaximumSize()
           
 SharedEndpoints getSharedEndpoints()
           
 long getTotalBpelFootprint()
           
 void onScheduledJob(Scheduler.JobInfo jobInfo)
          Implements execution of the job.
 void registerMessageExchangeInterceptor(MessageExchangeInterceptor interceptor)
           
 void sendMyRoleFault(BpelProcess process, WorkEvent we, int causeCode)
           
 void setInstanceThrottledMaximumCount(int instanceThrottledMaximumCount)
           
 void setProcessSize(javax.xml.namespace.QName processId, boolean hydratedOnce)
           
 void setProcessThrottledMaximumCount(int hydrationThrottledMaximumCount)
           
 void setProcessThrottledMaximumSize(long hydrationThrottledMaximumSize)
           
 void unregisterMessageExchangeInterceptor(java.lang.Class interceptorClass)
           
 void unregisterMessageExchangeInterceptor(MessageExchangeInterceptor interceptor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BpelEngineImpl

public BpelEngineImpl(Contexts contexts)
Method Detail

getSharedEndpoints

public SharedEndpoints getSharedEndpoints()

createMessageExchange

public MyRoleMessageExchange createMessageExchange(java.lang.String clientKey,
                                                   javax.xml.namespace.QName targetService,
                                                   java.lang.String operation,
                                                   java.lang.String pipedMexId)
                                            throws BpelEngineException
Throws:
BpelEngineException

createMessageExchange

public MyRoleMessageExchange createMessageExchange(java.lang.String clientKey,
                                                   javax.xml.namespace.QName targetService,
                                                   java.lang.String operation)
Description copied from interface: BpelEngine
Create a "my role" message exchange for invoking a BPEL process.

Specified by:
createMessageExchange in interface BpelEngine
targetService - the service id of the process being called, if known
operation - name of the operation
Returns:
MyRoleMessageExchange the newly created message exchange

getMessageExchange

public MessageExchange getMessageExchange(java.lang.String mexId)
Description copied from interface: BpelEngine
Retrieve a message identified by the given identifer.

Specified by:
getMessageExchange in interface BpelEngine
Parameters:
mexId - message exhcange identifier
Returns:
associated message exchange

createPartnerRoleMessageExchangeImpl

protected PartnerRoleMessageExchangeImpl createPartnerRoleMessageExchangeImpl(MessageExchangeDAO mexdao,
                                                                              javax.wsdl.PortType ptype,
                                                                              javax.wsdl.Operation op,
                                                                              OPartnerLink plink,
                                                                              BpelProcess process)

getProcess

public BpelProcess getProcess(javax.xml.namespace.QName pid)

onScheduledJob

public void onScheduledJob(Scheduler.JobInfo jobInfo)
                    throws Scheduler.JobProcessorException
Description copied from interface: Scheduler.JobProcessor
Implements execution of the job.

Specified by:
onScheduledJob in interface Scheduler.JobProcessor
Parameters:
jobInfo - the job information
Throws:
Scheduler.JobProcessorException

registerMessageExchangeInterceptor

public void registerMessageExchangeInterceptor(MessageExchangeInterceptor interceptor)

unregisterMessageExchangeInterceptor

public void unregisterMessageExchangeInterceptor(MessageExchangeInterceptor interceptor)

unregisterMessageExchangeInterceptor

public void unregisterMessageExchangeInterceptor(java.lang.Class interceptorClass)

getTotalBpelFootprint

public long getTotalBpelFootprint()

getHydratedFootprint

public long getHydratedFootprint()

getHydratedProcessSize

public long getHydratedProcessSize(javax.xml.namespace.QName processName)
Specified by:
getHydratedProcessSize in interface BpelEngine

getHydratedProcessCount

public int getHydratedProcessCount(javax.xml.namespace.QName processName)
Specified by:
getHydratedProcessCount in interface BpelEngine

setInstanceThrottledMaximumCount

public void setInstanceThrottledMaximumCount(int instanceThrottledMaximumCount)

getInstanceThrottledMaximumCount

public int getInstanceThrottledMaximumCount()

setProcessThrottledMaximumCount

public void setProcessThrottledMaximumCount(int hydrationThrottledMaximumCount)

getProcessThrottledMaximumCount

public int getProcessThrottledMaximumCount()
Specified by:
getProcessThrottledMaximumCount in interface BpelEngine

setProcessThrottledMaximumSize

public void setProcessThrottledMaximumSize(long hydrationThrottledMaximumSize)

getProcessThrottledMaximumSize

public long getProcessThrottledMaximumSize()
Specified by:
getProcessThrottledMaximumSize in interface BpelEngine

setProcessSize

public void setProcessSize(javax.xml.namespace.QName processId,
                           boolean hydratedOnce)

dehydrateLastUnusedProcess

public boolean dehydrateLastUnusedProcess()
Returns true if the last used process was dehydrated because it was not in-use.

Specified by:
dehydrateLastUnusedProcess in interface BpelEngine

sendMyRoleFault

public void sendMyRoleFault(BpelProcess process,
                            WorkEvent we,
                            int causeCode)