@ConfigurationDescription(properties={@Property(name="Components.ClientService",isRequired=true,description="A required service to provide clients convenient access to platform services."),,,,,,}) public class BootstrapRegistry extends ServiceRegistry
The configuration of a bootstrap registry requires the client service, a security manager identifying an org model manager which will be used for authentication in the platform as well as an arbitrary instance name for the registry. The name is used for logging and identifying the API user of the registry (client service and registry wrapper).
ServiceRegistry.ConfigurationValidatorLocalServiceRegistry.ServiceExportInformation, LocalServiceRegistry.ServiceNameResolution, LocalServiceRegistry.ServiceStarterPluginRegistry.URLClassloaderPrivilegedActionAbstractRegistry.DefaultNameResolution, AbstractRegistry.InstanceInformation, AbstractRegistry.InstantiationModeAbstractADEPT2Service.ActiveSessions| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
instanceName
The name of the bootstrap registry, which equals the configured name of the
platform (client or server).
|
clusterName, globalRegCache, hierInstName, protocolPriorityautoStartServices, failedServices, gsmAvailable, nodeName, release, serviceStarterPool, shuttingDown, startedServices, startingLock, startingRequiredServices, startingServiceusedInstancesdeclaredPluginTypes, defaultInstances, dynamicPlugins, pluginInstances, runtimePlugins, runtimePluginTypeCLs, singletonPluginscomponentInterfaces, configurationManager, declaredInstances, INIT_INSTANTIATED_OBJECT_METHOD, nameResolution, singletonInstancesCFG_EARLY_SERVICEAUTH_ORGPOSID, CFG_EARLY_SERVICEAUTH_ORGPOSNAME, CFG_EARLY_SERVICEAUTH_PASSWORD, CFG_EARLY_SERVICEAUTH_USERNAME, CFG_SERVICEAUTH_ORGPOSID, CFG_SERVICEAUTH_ORGPOSNAME, CFG_SERVICEAUTH_PASSWORD, CFG_SERVICEAUTH_USERNAMECONF_CSV_LOGGING, configuration, logger, registry, runtimeRequiredServices, startupRequiredServices| Modifier | Constructor and Description |
|---|---|
protected |
BootstrapRegistry(UrlConfigurationManager confMgr,
java.lang.Class<? extends BootstrapRegistry> bootstrapClass)
Creates a new bootstrap registry having the designated configuration manager.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
bootstrap()
Bootstraps this registry and therefore the platform.
|
protected ClientService |
getClientService()
Gets the client service providing convenient access to the services
provided by this registry and needed by client components.
|
protected Registry |
getRegistry()
Gets the wrapper for access to this registry via the
Registry
-interface. |
GlobalSecurityManager |
prepareGlobalSecurityManager()
Prepares the security manager that is, the global security manager will be
retrieved (and started) if necessary.
|
protected Pair<java.lang.String,java.lang.String> |
resolveInstanceName(Configuration conf)
Gets the cluster and the instance name for this registry from the
designated configuration.
|
void |
shutdown(boolean emergency)
Shut down all started services.
|
protected void |
terminate(boolean emergency,
java.lang.String hierServName)
Terminates all started services or until the designated service and signals
the shutdown of this registry.
|
autoStartServices, checkServiceURI, chooseAppropriateURI, createMBeanName, createRegistryWrapper, exportService, getCommunicationService, getGlobalRegistry, getInstanceNameFromServiceURI, getInvocationTarget, getLocallyExportedService, getLocalServiceObject, getService, getService, getServiceInformation, globalRegistryChanged, init, initExportServices, invalidateGlobalRegistry, prepareExport, prioritiseProtocols, readMetaConfiguration, start, unpublishServicecheckServiceInterface, checkServiceUriSyntax, checkStartupRequiredService, createLocalServiceURI, determineNodeName, getAndCheckRequiredService, getConfiguredPlugin, getGlobalSequence, getInstantiationMode, getRegistry, getSecurityManager, getServiceForInstance, notifyDataSourceToConfMgr, registryActive, renewConfiguration, startLocalService, syncExecute, terminateServicegetUsedComponentInstanceNameForInstance, getUsedObjectForInstancecreatePluginLoader, getConfiguredPlugin, getConfiguredPlugin, getConfiguredPlugins, prepareRuntimePlugin, readMetaConfigurationcheckAndStoreProvidedObject, checkConfiguration, checkImplementingClass, checkSupertype, createInstanceForInterface, getAppropriateMethod, getArbitrarilyNamedObject, getComponentType, getFormattedSignature, getHierarchicalInstanceName, getInstanceInformation, getInterfaceForComponentType, getObjectForInstanceName, getObjectForInstanceName, getObjectForInstanceName, getSimpleInstanceName, initialiseInstantiatedObject_sessionActive, authenticateService, awaitActiveSessions, createChildSession, createSession, getAgent, getSessionFactory, getStartupRequired, getTopLevelAgent, getUserCredentials, globalSecurityManagerAvailable, isEarlyService, sessionHasCapability_sessionFinished, activeOrInvalidServiceStateException, changeLogContext, changeLogContext, changeLogContext, consoleLog, csvLoggingEnabled, getClassSpecificJulLogger, getDependencyRegistry, getLocalUris, getLogger, getRelease, getRuntimeRequiredServices, getServiceInstanceName, getStartupRequiredServices, getURIs, isActive, isSessionActive, isShutdown, logMethodEntry, logMethodEntry, logMethodEntry, logMethodExit, logMethodExit, ping, preShutdown, privilegeSession, privilegeThread, revertLogContextChanges, sessionActive, sessionActive, sessionActive, sessionActive, sessionFinished, sessionFinished, signalShutdown, signalStart, unprivilegeThreadclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetLocalUris, getRelease, getRuntimeRequiredServices, getServiceInstanceName, getStartupRequiredServices, getURIs, ping, preShutdownprotected final java.lang.String instanceName
protected BootstrapRegistry(UrlConfigurationManager confMgr, java.lang.Class<? extends BootstrapRegistry> bootstrapClass) throws AbortServiceException
confMgr - The initial configuration manager that provides the root configuration and
configurations for the loaded component instances.bootstrapClass - The class the root configuration is validated against the configuration
description. Use this class unless you have a subclass that has its own configuration
description. This class is also used for retrieving the release information from the
version file.ConfigurationException - If the registry configuration is invalid, a
ConfigurationExceptionwill be thrown.AbortServiceException - If the initialisation or starting of the registry fails, an
AbortServiceException will be thrown.protected void bootstrap()
throws AbortServiceException
AbortServiceException - If the initialisation or starting of the
registry fails, an AbortServiceException will be
thrown.public void shutdown(boolean emergency)
LocalServiceRegistryshutdown in interface ADEPT2Serviceshutdown in class LocalServiceRegistryemergency - Whether the shutdown will be an emergency shutdown.protected void terminate(boolean emergency,
java.lang.String hierServName)
LocalServiceRegistrynull as service
name.terminate in class LocalServiceRegistryemergency - Whether it is an emergency shutdown.hierServName - The hierarchical name of the service until which to
shutdown all services started later. If this is null,
all services and the registry will be shut down.protected Pair<java.lang.String,java.lang.String> resolveInstanceName(Configuration conf) throws ConfigurationException
ServiceRegistryNote that this method is called from the constructor and must not rely on instance fields!
resolveInstanceName in class ServiceRegistryconf - The configuration to retrieve the instance name from.null.ConfigurationException - If the instance name does not exist in the
configuration, a ConfigurationException will be
thrown. However, this should never happen if the configuration is
validated beforehand.public GlobalSecurityManager prepareGlobalSecurityManager() throws ServiceNotKnownException
LocalServiceRegistryprepareGlobalSecurityManager in class LocalServiceRegistryServiceNotKnownException - If the security manager could not be
retrieved, a ServiceNotKnownException will be
thrown. The registry must not continue starting in this case!!protected ClientService getClientService() throws ServiceNotKnownException
ServiceNotKnownException - If there are problems loading the registry,
a ServiceNotKnownException will be thrown.protected Registry getRegistry() throws ServiceNotKnownException
Registry
-interface. This is used by (server) services to access the registry.
Clients should always use an appropriate client
service. Only use this registry for very special purposes.ServiceNotKnownException - If there are problems loading the
registry, a ServiceNotKnownException will be thrown.