Interface IAdditionalClassesProvider
-
public interface IAdditionalClassesProvider
Provides a list of additional classes (every class except service and implementation) used in your implementation.
Every time you're using any hand-written or generic class in your implementation, problems with loading this classes may occur since this mechanism uses RMI and RMI loads classes by it's special algorithm. In addition, if these classes are located somewhere different than service and implementation, a separate process have to know the location from where these classes should be loaded. For this reason, all of these classes should be known by this mechanism to load them by this bundle's classloader and calculate a location of these classes to provide them to the separate process. Provide these classes by implementation of this interface and provide an instance of this implementation in
IProcessManager#bind(String, Class, Class, ILibrariesProvider, IClassPathProvider, boolean)
method or inIImplementationProvider
instance provided toIProcessManager#bind(String, Class, IImplementationProvider)
method.Example:
<..> class ClassPathProvider implements IClassPathProvider { @Override public Class>[] getAdditionalClasses() { return new Class>[] { SomeClass.class }; } } <..> ProcessManager pm = <..>; <..> pm.bind(yourKey, YourInterface.class, YourImplementation.class, null, new ClassPathProvider(), isSingletone); <..>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Class<?>[]
getAdditionalClasses()
Provides a list of additional classes used in implementation.
-
-
-
Method Detail
-
getAdditionalClasses
Class<?>[] getAdditionalClasses()
Provides a list of additional classes used in implementation.
- Returns:
- a list of additional classes used in implementation (Not
null
)
-
-