public interface IModuleService
Modifier and Type | Method and Description |
---|---|
java.util.Collection<IPeerModule> |
getAllPeerModules()
Returns the list of deployed peer module.
|
<T extends IPeerModule> |
getPeerModule(java.lang.Class<T> peerClass)
Get the public services of a specific Java module.
|
IPeerModule |
getPeerModule(java.lang.String moduleName)
Get the public services of a specific Java module from its name.
|
java.util.Collection<IPeerModule> getAllPeerModules()
<T extends IPeerModule> T getPeerModule(java.lang.Class<T> peerClass)
This method needs the concrete interface of a module to return the loaded instance of this peer module.
For example, the following example shows a call of this method to return a specific module named MyMDAC:
IModelingSession session = Modelio.getInstance().getModelingSession();
IMyMDACPeerModule peerModule = (IMyMDACPeerModule)session.getModuleService().getPeerModule(IMyMDACPeerModule.class);
The returned peer module can be casted without risk to the right desired module, but only if a dependency exists between the returned module, and the one requesting the peer.
T
- The peer module type.peerClass
- The peer module class.NullPointerException
if no such module is loaded.IPeerModule getPeerModule(java.lang.String moduleName)
The returned peer module can be casted without risk to the right desired module, but only if a dependency exists between the returned module, and the one requesting the peer.
moduleName
- The module name.NullPointerException
if no such module is loaded.