public class DomainModelControllerService extends AbstractControllerService implements DomainController, HostModelUtil.HostModelRegistrar
ModelController
for a Host Controller process.Modifier and Type | Field and Description |
---|---|
static org.jboss.msc.service.ServiceName |
SERVICE_NAME |
authorizer, BOOT_STACK_SIZE_PROPERTY, DEFAULT_BOOT_STACK_SIZE, processType
Modifier and Type | Method and Description |
---|---|
protected void |
boot(BootContext context)
Boot the controller.
|
RunningMode |
getCurrentRunningMode()
Gets the domain controller's current running mode.
|
ExpressionResolver |
getExpressionResolver() |
ExtensionRegistry |
getExtensionRegistry() |
HostFileRepository |
getLocalFileRepository()
Gets the file repository backing this domain controller
|
LocalHostControllerInfo |
getLocalHostInfo()
Gets the local host controller info.
|
org.jboss.dmr.ModelNode |
getProfileOperations(String profileName)
Get the operations needed to create the given profile.
|
HostFileRepository |
getRemoteFileRepository()
Gets the file repository backing the master domain controller
|
void |
initializeMasterDomainRegistry(ManagementResourceRegistration root,
ExtensibleConfigurationPersister configurationPersister,
ContentRepository contentRepository,
HostFileRepository fileRepository,
ExtensionRegistry extensionRegistry,
PathManagerService pathManager) |
void |
initializeSlaveDomainRegistry(ManagementResourceRegistration root,
ExtensibleConfigurationPersister configurationPersister,
ContentRepository contentRepository,
HostFileRepository fileRepository,
LocalHostControllerInfo hostControllerInfo,
ExtensionRegistry extensionRegistry,
IgnoredDomainResourceRegistry ignoredDomainResourceRegistry,
PathManagerService pathManagery) |
protected void |
initModel(Resource rootResource,
ManagementResourceRegistration rootRegistration) |
boolean |
isHostRegistered(String id)
Check if a Host Controller is already registered with this domain controller.
|
protected void |
performControllerInitialization(org.jboss.msc.service.ServiceTarget target,
Resource rootResource,
ManagementResourceRegistration rootRegistration) |
void |
pingRemoteHost(String id)
Asynchronously ping the slave host with the given
hostName to validate its connection. |
void |
registerHostModel(String hostName,
ManagementResourceRegistration root) |
void |
registerRemoteHost(String hostName,
ManagementChannelHandler handler,
Transformers transformers,
Long remoteConnectionId,
DomainControllerRuntimeIgnoreTransformationEntry runtimeIgnoreTransformation)
Registers a slave Host Controller with this domain controller.
|
void |
registerRunningServer(ProxyController serverControllerClient)
Registers a running server in the domain model
|
void |
start(org.jboss.msc.service.StartContext context) |
void |
stop(org.jboss.msc.service.StopContext context) |
protected void |
stopAsynchronous(org.jboss.msc.service.StopContext context)
Hook for subclasses to perform work during the asynchronous task started by
AbstractControllerService.stop(org.jboss.msc.service.StopContext) . |
void |
stopLocalHost()
Stops this host controller
|
void |
stopLocalHost(int exitCode)
Stop this host controller with a specific exit code.
|
void |
unregisterRemoteHost(String id,
Long remoteConnectionId)
Unregisters a previously registered Host Controller.
|
void |
unregisterRunningServer(String serverName)
Unregisters a running server from the domain model
|
boot, bootThreadDone, executeReadOnlyOperation, finishBoot, getAuditLogger, getExecutorServiceInjector, getValue, internalExecute, internalExecute, runPerformControllerInitialization, setConfigurationPersister
public RunningMode getCurrentRunningMode()
DomainController
getCurrentRunningMode
in interface DomainController
public LocalHostControllerInfo getLocalHostInfo()
DomainController
getLocalHostInfo
in interface DomainController
public void registerRemoteHost(String hostName, ManagementChannelHandler handler, Transformers transformers, Long remoteConnectionId, DomainControllerRuntimeIgnoreTransformationEntry runtimeIgnoreTransformation) throws SlaveRegistrationException
DomainController
registerRemoteHost
in interface DomainController
hostName
- the name of the slave hosthandler
- handler for communications with the hosttransformers
- transformation handler for converting resources and operations to forms appropriate for the slaveremoteConnectionId
- long identifying this specific connection to the host, or null
if the host did not provide such an idruntimeIgnoreTransformation
- The runtime ignore transformation utility for the hostSlaveRegistrationException
- if there is a problem registering the hostpublic boolean isHostRegistered(String id)
DomainController
isHostRegistered
in interface DomainController
id
- the name of the host controllertrue
if there is such a host controller registered, false
otherwisepublic void unregisterRemoteHost(String id, Long remoteConnectionId)
DomainController
unregisterRemoteHost
in interface DomainController
id
- the name of the previously
registered Host ControllerremoteConnectionId
- long identifying the specific connection to the host, or null
. If null
the host's registration will be removed regardless of any remote connection id
that was provided at registration. If not null
, the registration will only
be removed if the currently registered id matches the given idpublic void pingRemoteHost(String id)
DomainController
hostName
to validate its connection.pingRemoteHost
in interface DomainController
id
- the name of the slave hostpublic void registerRunningServer(ProxyController serverControllerClient)
DomainController
registerRunningServer
in interface DomainController
serverControllerClient
- client the controller can use to communicate with the server.public void unregisterRunningServer(String serverName)
DomainController
unregisterRunningServer
in interface DomainController
serverName
- the name of the serverpublic org.jboss.dmr.ModelNode getProfileOperations(String profileName)
DomainController
getProfileOperations
in interface DomainController
profileName
- the name of the profilepublic HostFileRepository getLocalFileRepository()
DomainController
getLocalFileRepository
in interface DomainController
public HostFileRepository getRemoteFileRepository()
DomainController
getRemoteFileRepository
in interface DomainController
public void start(org.jboss.msc.service.StartContext context) throws org.jboss.msc.service.StartException
start
in interface org.jboss.msc.service.Service<ModelController>
start
in class AbstractControllerService
org.jboss.msc.service.StartException
protected void initModel(Resource rootResource, ManagementResourceRegistration rootRegistration)
initModel
in class AbstractControllerService
protected void boot(BootContext context) throws ConfigurationPersistenceException
AbstractControllerService
boot
in class AbstractControllerService
context
- the boot contextConfigurationPersistenceException
- if the configuration failed to be loadedprotected void performControllerInitialization(org.jboss.msc.service.ServiceTarget target, Resource rootResource, ManagementResourceRegistration rootRegistration)
performControllerInitialization
in class AbstractControllerService
public void stop(org.jboss.msc.service.StopContext context)
stop
in interface org.jboss.msc.service.Service<ModelController>
stop
in class AbstractControllerService
protected void stopAsynchronous(org.jboss.msc.service.StopContext context)
AbstractControllerService
AbstractControllerService.stop(org.jboss.msc.service.StopContext)
. This base method does nothing.
Subclasses must not invoke LifecycleContext.complete()
stopAsynchronous
in class AbstractControllerService
context
- the stop contextpublic void stopLocalHost()
DomainController
stopLocalHost
in interface DomainController
public void stopLocalHost(int exitCode)
DomainController
stopLocalHost
in interface DomainController
exitCode
- the exit code passed to the ProcessControllerpublic void registerHostModel(String hostName, ManagementResourceRegistration root)
registerHostModel
in interface HostModelUtil.HostModelRegistrar
public void initializeMasterDomainRegistry(ManagementResourceRegistration root, ExtensibleConfigurationPersister configurationPersister, ContentRepository contentRepository, HostFileRepository fileRepository, ExtensionRegistry extensionRegistry, PathManagerService pathManager)
initializeMasterDomainRegistry
in interface DomainController
public void initializeSlaveDomainRegistry(ManagementResourceRegistration root, ExtensibleConfigurationPersister configurationPersister, ContentRepository contentRepository, HostFileRepository fileRepository, LocalHostControllerInfo hostControllerInfo, ExtensionRegistry extensionRegistry, IgnoredDomainResourceRegistry ignoredDomainResourceRegistry, PathManagerService pathManagery)
initializeSlaveDomainRegistry
in interface DomainController
public ExtensionRegistry getExtensionRegistry()
getExtensionRegistry
in interface DomainController
public ExpressionResolver getExpressionResolver()
getExpressionResolver
in interface DomainController
Copyright © 2014 JBoss by Red Hat. All rights reserved.