SMILA (incubation) API documentation

org.eclipse.smila.processing.bpel
Class PipeletManager

java.lang.Object
  extended by org.eclipse.smila.processing.bpel.ExtensionManager
      extended by org.eclipse.smila.processing.bpel.PipeletManager
All Implemented Interfaces:
PipeletTrackerListener

public final class PipeletManager
extends ExtensionManager
implements PipeletTrackerListener

Pipelet Manager and Invoker.

Author:
jschumacher

Method Summary
 void checkAvailability(ExtensionAdapter adapter, ODEWorkflowProcessor processor)
          check if element invoked by the adapter is already available.
 ProcessorMessage doInvoke(ExtensionAdapter adapter, ODEWorkflowProcessor processor, Blackboard blackboard, ProcessorMessage request)
          actually invoke the adapter.
 PipeletInstance doRegisterActivity(OProcess pipelineProcess, OExtensionActivity activity, org.w3c.dom.Element content, java.lang.String key)
          register extension actvity.
 java.lang.String getExtensionName()
          
static PipeletManager getInstance()
          singleton instance access method.
 void pipeletsAdded(java.util.Map<java.lang.String,java.lang.Class<? extends IPipelet>> pipeletClasses)
          learn about new pipelet classes and instantiate pipelets waiting for their classes.
 void pipeletsRemoved(java.util.Map<java.lang.String,java.lang.Class<? extends IPipelet>> pipeletClasses)
          forget pipelet classes and remove instances.
 void registerAsListener(BundleContext context)
          register this object as a listener to pipelet change events by SimplePipeletTracker.
 
Methods inherited from class org.eclipse.smila.processing.bpel.ExtensionManager
copyAnnotations, createErrorCompilationMessage, getActivityKey, getAdapters, getAttributeOfElement, getExtensionAdapter, getProcessor, invokeActivity, parseAnnotations, registerActivity, registerPipeline
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static PipeletManager getInstance()
singleton instance access method.

Returns:
singleton instance of SimpletonPipeletManager

registerAsListener

public void registerAsListener(BundleContext context)
register this object as a listener to pipelet change events by SimplePipeletTracker.

Parameters:
context - bundle context.

getExtensionName

public java.lang.String getExtensionName()

Specified by:
getExtensionName in class ExtensionManager
Returns:
local name of tag of watched extension activities
See Also:
ExtensionManager.getExtensionName()

doRegisterActivity

public PipeletInstance doRegisterActivity(OProcess pipelineProcess,
                                          OExtensionActivity activity,
                                          org.w3c.dom.Element content,
                                          java.lang.String key)
register extension actvity. Should throw a org.apache.ode.bpel.compiler.api.CompilationException if an error occurs.

Specified by:
doRegisterActivity in class ExtensionManager
Parameters:
pipelineProcess - process that contains the activity.
activity - the activity to register
content - XML content of actvity
key - key of actvity
Returns:
adapter for activity.
See Also:
org.eclipse.smila.processing.bpel.ExtensionManager#registerActivity(org.apache.ode.bpel.o.OProcess, org.apache.ode.bpel.o.OExtensionActivity, org.w3c.dom.Element, java.lang.String)

checkAvailability

public void checkAvailability(ExtensionAdapter adapter,
                              ODEWorkflowProcessor processor)
                       throws ProcessingException
check if element invoked by the adapter is already available.

Specified by:
checkAvailability in class ExtensionManager
Parameters:
adapter - adapter to check
processor - associated processor
Throws:
ProcessingException - if elements represented by adapter cannot be invoked.
See Also:
#checkAvailability(org.eclipse.smila.processing.bpel.ExtensionAdapter, org.eclipse.smila.processing.bpel.ODEWorkflowProcessor)

doInvoke

public ProcessorMessage doInvoke(ExtensionAdapter adapter,
                                 ODEWorkflowProcessor processor,
                                 Blackboard blackboard,
                                 ProcessorMessage request)
                          throws ProcessingException
actually invoke the adapter.

Specified by:
doInvoke in class ExtensionManager
Parameters:
adapter - adapter to invoke
processor - associated processor
blackboard - blackboard instance to work on.
request - record Ids of request.
Returns:
Ids of result records
Throws:
ProcessingException - error while processing.
See Also:
#doInvoke(org.eclipse.smila.processing.bpel.ExtensionAdapter, org.eclipse.smila.processing.bpel.ODEWorkflowProcessor, org.eclipse.smila.datamodel.id.Id[])

pipeletsAdded

public void pipeletsAdded(java.util.Map<java.lang.String,java.lang.Class<? extends IPipelet>> pipeletClasses)
learn about new pipelet classes and instantiate pipelets waiting for their classes. event: the given pipelets are now available for instantiation.

Specified by:
pipeletsAdded in interface PipeletTrackerListener
Parameters:
pipeletClasses - map of pipelet class names to new pipelet classes.
See Also:
PipeletTrackerListener.pipeletsAdded(java.util.Map)

pipeletsRemoved

public void pipeletsRemoved(java.util.Map<java.lang.String,java.lang.Class<? extends IPipelet>> pipeletClasses)
forget pipelet classes and remove instances. event: the given pipelets are not available anymore for instantiation. Current instances should be removed immediately.

Specified by:
pipeletsRemoved in interface PipeletTrackerListener
Parameters:
pipeletClasses - map of pipelet class names to removed pipelet classes.
See Also:
PipeletTrackerListener.pipeletsRemoved(java.util.Map)

SMILA (incubation) API documentation