public class CheckConfig extends AbstractPlugin
SharedActivatableServiceDescriptor or
NonActivatableServiceDescriptor, a check is made that the
command line arguments are not null or empty and that a
configuration can be instantiated from those arguments. The configuration is
searched for all occurrences of initialLookupGroups entries and
generates warnings for those set to ALL_GROUPS.| Modifier and Type | Class and Description |
|---|---|
static class |
CheckConfig.ConfigTask
Subtask to load the configuration
|
static class |
CheckConfig.GetGroupsTask
Subtask which obtains all
initialLookupGroups entries and
returns them in an array of GroupInfo objects. |
private static class |
CheckConfig.GroupInfo
Struct to hold entryName/Group pairs
|
| Modifier and Type | Field and Description |
|---|---|
private EnvCheck |
envCheck
reference to the plugin container
|
| Constructor and Description |
|---|
CheckConfig() |
| Modifier and Type | Method and Description |
|---|---|
private boolean |
checkArgs(NonActivatableServiceDescriptor d,
String source)
Check that the arguments array obtained by calling
getServerConfigArgs on the given service descriptor is
non-null and has length > 0. |
private boolean |
checkConfigLoad(NonActivatableServiceDescriptor d,
String source)
Execute the subtask which loads the configuration file.
|
private void |
checkForAllGroups(NonActivatableServiceDescriptor d,
String source)
Execute the subtask which checks for ALL_GROUPS.
|
private void |
checkServiceConfig(NonActivatableServiceDescriptor d,
String source)
Check the service configuration file by instantiating the configuration
in a subtask created using the same properties and arguments that would
be used to run the actual service.
|
void |
run(EnvCheck envCheck)
If configured to perform JSK checks, perform checks for each descriptor.
|
getBundle, getString, getString, getString, getString, handleUnexpectedSubtaskReturn, isPluginOption, taskNameprivate EnvCheck envCheck
public void run(EnvCheck envCheck)
envCheck - the plugin containerprivate boolean checkArgs(NonActivatableServiceDescriptor d, String source)
getServerConfigArgs on the given service descriptor is
non-null and has length > 0. This method is silent if the
check is successful.d - the NonActivatableServiceDescriptor to checkprivate void checkServiceConfig(NonActivatableServiceDescriptor d, String source)
initialLookupGroups entry of ALL_GROUPS.
A warning is output if such an entry is found.d - the NonActivatableServiceDescriptor to checkprivate boolean checkConfigLoad(NonActivatableServiceDescriptor d, String source)
d - the service descriptorsource - the source of the argumentsprivate void checkForAllGroups(NonActivatableServiceDescriptor d, String source)
d - the service descriptorsource - the source of the argumentsCopyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.