Todo
reusability of this class needs to be improved.
| Modifier and Type | Class and Description |
|---|---|
| private static class | Main.
This filter matches against the name, including only matching a ModuleStartup with no name if name is null (unlike a normal "null" returned from name, which acts as a wildcard for the name) |
| Modifier and Type | Field and Description |
|---|---|
| public static final String | |
| private ClassLoader |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public ServiceLocator | createServiceLocator(ModulesRegistry mr, StartupContext context, List<PopulatorPostProcessor> postProcessors, DescriptorFileFinder descriptorFileFinder)
|
| protected void | |
| public ModuleStartup | findStartupService(ModulesRegistry registry, ServiceLocator serviceLocator, String mainModuleName, StartupContext context)
Return the ModuleStartup service configured to be used to start the system. |
| protected File | Returns: the path to the jar file containing this class. always returns non-null.We need to determine which jar file has been used to load this class Using the getResourceURL we can get this information, after that, it is just a bit of detective work to get the file path for the jar file. |
| protected ClassLoader | |
| public ServiceLocator | |
| public ModuleStartup | Returns: The ModuleStartup serviceThe module that will provide mainModuleName, StartupContext ModuleStartup. If null,
one will be auto-discovered.startup context instance context)Launches the module system and hand over the execution to the
|
| protected void | |
| public static void | |
| public void | |
| public void |
| DEFAULT_NAME | back to summary |
|---|---|
| public static final String DEFAULT_NAME | |
| parentClassLoader | back to summary |
|---|---|
| private ClassLoader parentClassLoader | |
| Main | back to summary |
|---|---|
| public Main() | |
| addDescriptorFileFinder | back to summary |
|---|---|
| private void addDescriptorFileFinder(ServiceLocator serviceLocator, DescriptorFileFinder descriptorFileFinder) | |
| createServiceLocator | back to summary |
|---|---|
| public ServiceLocator createServiceLocator(ModulesRegistry mr, StartupContext context, List<PopulatorPostProcessor> postProcessors, DescriptorFileFinder descriptorFileFinder) throws BootException | |
| defineParentClassLoader | back to summary |
|---|---|
| protected void defineParentClassLoader() throws BootException | |
| findStartupService | back to summary |
|---|---|
| public ModuleStartup findStartupService(ModulesRegistry registry, ServiceLocator serviceLocator, String mainModuleName, StartupContext context) throws BootException Return the ModuleStartup service configured to be used to start the system.
| |
| getBootstrapFile | back to summary |
|---|---|
| protected File getBootstrapFile() throws BootException We need to determine which jar file has been used to load this class Using the getResourceURL we can get this information, after that, it is just a bit of detective work to get the file path for the jar file.
| |
| getParentClassLoader | back to summary |
|---|---|
| protected ClassLoader getParentClassLoader() | |
| getServiceLocator | back to summary |
|---|---|
| public ServiceLocator getServiceLocator() | |
| launch | back to summary |
|---|---|
| public ModuleStartup launch(ModulesRegistry registry, String mainModuleName, StartupContext context) throws BootException Launches the module system and hand over the execution to the
| |
| launch | back to summary |
|---|---|
| protected void launch(ModuleStartup startupCode, StartupContext context) throws BootException | |
| main | back to summary |
|---|---|
| public static void main(final String[] args) | |
| run | back to summary |
|---|---|
| public void run(final String[] args) | |
| start | back to summary |
|---|---|
| public void start(String[] args) throws BootException Start the server from the command line
| |
| Access | Constructor and Description |
|---|---|
| private | MainFilter(String
The name of the ModuleStartup to find. If
null this Filter will only match ModuleStartups with
no name name)The name given here will match the ModuleStartup |
| Modifier and Type | Method and Description |
|---|---|
| public String | getAdvertisedContract()
Implements org. If this returns non-null then this index will be used to limit the set of Descriptors that will be passed to the matches method. |
| public String | getName()
Implements org. If this returns non-null then this name will be used to limit the set of Descriptors that will be passed to the matches method. |
| public boolean | matches(Descriptor d)
Implements org. Returns true if this filter matches the given object |
| name | back to summary |
|---|---|
| private final String name | |
| MainFilter | back to summary |
|---|---|
| private MainFilter(String name) The name given here will match the ModuleStartup
| |
| getAdvertisedContract | back to summary |
|---|---|
| public String getAdvertisedContract() Implements org. Doc from org. If this returns non-null then this index will be used to limit the set of Descriptors that will be passed to the matches method. Only those descriptors that have an AdverisedContract of this value will be passed to the matches method.
| |
| getName | back to summary |
|---|---|
| public String getName() Implements org. Doc from org. If this returns non-null then this name will be used to limit the set of Descriptors that will be passed to the matches method. Only those descriptors that has an name of this value will be passed to the matches method.
| |
| matches | back to summary |
|---|---|
| public boolean matches(Descriptor d) Implements org. Doc from org. Returns true if this filter matches the given object
| |