public interface IModuleService
Modifier and Type | Method and Description |
---|---|
Collection<IPeerMdac> |
getAllPeerMdacs()
Returns the list of deployed peer module.
|
<T extends IPeerMdac> |
getPeerMdac(Class<T> peerClass)
Get the public services of a specific Java module.
|
IPeerMdac |
getPeerMdac(String moduleName)
Get the public services of a specific Java module from its name.
|
Collection<IPeerMdac> getAllPeerMdacs()
<T extends IPeerMdac> T getPeerMdac(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();
IMyMDACPeerMdac peerModule = (IMyMDACPeerMdac)session.getModuleService().getPeerMdac(IMyMDACPeerMdac.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.IPeerMdac getPeerMdac(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.