T - The type of the initial service which is provided after the first
phase of bootstrapping.public class TwoPhaseBootstrap<T extends ADEPT2Service> extends BootstrapRegistry
shutdownToInitialService() and BootstrapRegistry.shutdown(boolean). Shutting down
may also be done in one step by just calling BootstrapRegistry.shutdown(boolean). Be sure to
call BootstrapRegistry.shutdown(boolean) in a finally-clause so that it will be
done under all circumstances.
If no initial service is provided, this registry will just act like the
BootstrapRegistry, that is first and second phase will be one
phase.
ServiceRegistry.ConfigurationValidatorLocalServiceRegistry.ServiceExportInformation, LocalServiceRegistry.ServiceNameResolution, LocalServiceRegistry.ServiceStarterPluginRegistry.URLClassloaderPrivilegedActionAbstractRegistry.DefaultNameResolution, AbstractRegistry.InstanceInformation, AbstractRegistry.InstantiationModeAbstractADEPT2Service.ActiveSessions| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Class<T> |
initialServiceCls
The class of the initial service.
|
protected java.lang.String |
initialServiceType
The type name of the initial service.
|
instanceNameclusterName, 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| Constructor and Description |
|---|
TwoPhaseBootstrap(java.lang.Class<T> initialServiceCls,
java.lang.String initialServiceType,
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 |
autoStartServices()
Prepares the global security manager, authenticates this registry, provides
the data sources for the runtime configurations to the configuration
manager if appropriate, and starts all services to be automatically started
at startup of this registry.
|
protected void |
bootstrap()
Bootstraps this registry and therefore the platform.
|
protected GlobalRegistry |
continueBootstrap()
Continues the bootstrap.
|
protected T |
getInitialService()
Gets the initial service that is provided in the first phase of
bootstrapping.
|
void |
shutdownToInitialService()
Shuts down all services until the initial service.
|
getClientService, getRegistry, prepareGlobalSecurityManager, resolveInstanceName, shutdown, terminatecheckServiceURI, 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.Class<T extends ADEPT2Service> initialServiceCls
protected final java.lang.String initialServiceType
public TwoPhaseBootstrap(java.lang.Class<T> initialServiceCls, java.lang.String initialServiceType, UrlConfigurationManager confMgr, java.lang.Class<? extends BootstrapRegistry> bootstrapClass) throws AbortServiceException
initialServiceCls - The class of the initial service. If this is
null, this registry will act like the normal
BootstrapRegistry.initialServiceType - The type name of the initial service. If this is
null or the empty string, this registry will act like
the normal BootstrapRegistry.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.AbortServiceException - If the initialisation or starting of the
registry fails, an AbortServiceException will be
thrown. If the registry configuration is invalid, a
ConfigurationExceptionwill be thrown.protected void autoStartServices()
throws AbortServiceException
LocalServiceRegistryautoStartServices in class ServiceRegistryAbortServiceException - If there are problems preparing the security
manager or starting one of the services to be automatically
started, an AbortServiceException will be thrown.protected T getInitialService()
null if no initial service is
specified.protected void bootstrap()
throws AbortServiceException
BootstrapRegistrybootstrap in class BootstrapRegistryAbortServiceException - If the initialisation or starting of the
registry fails, an AbortServiceException will be
thrown.protected GlobalRegistry continueBootstrap() throws AbortServiceException
AbortServiceException - If there are problems preparing the security
manager or starting one of the services to be automatically
started, an AbortServiceException will be thrown.ServiceRegistry.autoStartServices()public void shutdownToInitialService()