Interface ISharedObjectInstantiator

public interface ISharedObjectInstantiator

Interface that must be implemented by extensions of the sharedObjectFactory extension point

Method Summary
 ISharedObject createInstance(SharedObjectTypeDescription typeDescription, java.lang.Object[] args)
          Create instance of ISharedObject.

Method Detail


ISharedObject createInstance(SharedObjectTypeDescription typeDescription,
                             java.lang.Object[] args)
                             throws SharedObjectCreateException
Create instance of ISharedObject. This is the interface that plugin implementations must implement for the sharedObjectFactory extension point. The caller may optionally specify both argument types and arguments that will be passed into this method (and therefore to the provider implementation implementing this method). For example:

SharedObjectFactory.getDefault().createSharedObject("foosharedobject",new String [] { java.lang.String }, new Object { "hello" });

typeDescription - the SharedObjectTypeDescription associated with the registered shared object provider implementation plugin
args - arguments specified by the caller. May be null if no arguments are passed in by caller to SharedObjectFactory.getDefault().createSharedObject(...)
ISharedObject instance. The provider implementation must return a valid object implementing ISharedObject OR throw a SharedObjectCreateException
SharedObjectCreateException - if shared object instance cannot be created