TPTP 4.4.0 Platform Project
Public API Specification

org.eclipse.hyades.execution.local
Class EclipseExecutionComponentFactoryImpl

java.lang.Object
  extended byorg.eclipse.hyades.execution.local.ExecutionComponentFactoryImpl
      extended byorg.eclipse.hyades.execution.local.EclipseExecutionComponentFactoryImpl
All Implemented Interfaces:
IEclipseExecutionComponentFactory, IExecutionComponentFactory, IRemoteObject

public class EclipseExecutionComponentFactoryImpl
extends ExecutionComponentFactoryImpl
implements IEclipseExecutionComponentFactory

This specialization of ExecutionComponentFactoryImpl uses Eclipse IConfigurationElements instead of String classnames when registering execution components for local use. This allows the use of Eclipse classloaders, via createExecutableExtension(), so that execution components need not live in predetermined Hyades plugins.


Field Summary
 
Fields inherited from class org.eclipse.hyades.execution.local.ExecutionComponentFactoryImpl
components, instances, sessionContext
 
Constructor Summary
EclipseExecutionComponentFactoryImpl(ISession session)
           
 
Method Summary
 void addExecutionComponent(org.eclipse.core.runtime.IConfigurationElement configElement)
          This method adds registers the execution components specified by configElement.
 IExecutionComponent createExecutionComponentByType(java.lang.String type)
           
 IRemoteObject createRemoteObjectByType(java.lang.String type)
          Create a remote object and return its stub.
static IExecutionComponentFactory getInstance(ISession session)
          Get the component factory in this VM.
 
Methods inherited from class org.eclipse.hyades.execution.local.ExecutionComponentFactoryImpl
addExecutionComponent, addSkeleton, addStub, delegateRemoteCall, finalize, getDelegate, getSessionContext, getUniqueId, init, removeInstance, setDelegate, setSessionContext
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.hyades.execution.core.IEclipseExecutionComponentFactory
getSessionContext
 

Constructor Detail

EclipseExecutionComponentFactoryImpl

public EclipseExecutionComponentFactoryImpl(ISession session)
Parameters:
session -
Method Detail

getInstance

public static IExecutionComponentFactory getInstance(ISession session)
Get the component factory in this VM. Each VM has it's own factory. Each factory shares the same, well known id and provides the bootstrap for remote object instantiation.

Returns:

addExecutionComponent

public void addExecutionComponent(org.eclipse.core.runtime.IConfigurationElement configElement)
                           throws java.lang.ClassNotFoundException
This method adds registers the execution components specified by configElement. configElement is expected to have three attributes, named implClass, stubClass and skeletonClass. The implClass and StubClass will both be instantiated using createExecutableExtension(), and will thus use the Eclipse classloaders. Since the skeleton is only instantiated on the remote side, it will still use Class.forName.NewInstance().

Specified by:
addExecutionComponent in interface IEclipseExecutionComponentFactory
Parameters:
configElement - an Eclipse IConfigurationElement of the RegisteredExecutionComponentImpl schema for the execution component. the implementation class, stub, and skeleton must all have default constructors.
Throws:
java.lang.ClassNotFoundException - if the class is not available in any of the locations where it is required.
See Also:
IEclipseExecutionComponentFactory.addExecutionComponent(org.eclipse.core.runtime.IConfigurationElement)

createExecutionComponentByType

public IExecutionComponent createExecutionComponentByType(java.lang.String type)
Specified by:
createExecutionComponentByType in interface IEclipseExecutionComponentFactory
Overrides:
createExecutionComponentByType in class ExecutionComponentFactoryImpl
See Also:
IExecutionComponentFactory.createExecutionComponentByType(java.lang.String)

createRemoteObjectByType

public IRemoteObject createRemoteObjectByType(java.lang.String type)
Create a remote object and return its stub.

Overrides:
createRemoteObjectByType in class ExecutionComponentFactoryImpl
Parameters:
type -
Returns:

TPTP 4.4.0 Platform Project
Public API Specification