org.jboss.system.server.profileservice
Class ProfileServiceBootstrap

java.lang.Object
  extended by org.jboss.system.server.profileservice.ProfileServiceBootstrap
All Implemented Interfaces:
org.jboss.bootstrap.spi.Bootstrap, org.jboss.kernel.spi.registry.KernelRegistryPlugin

public class ProfileServiceBootstrap
extends Object
implements org.jboss.bootstrap.spi.Bootstrap, org.jboss.kernel.spi.registry.KernelRegistryPlugin

Bootstraps the profile service

Version:
$Revision: 87958 $
Author:
Scott.Stark@jboss.org, adrian@jboss.org, Emanuel Muckenhuber

Field Summary
protected  org.jboss.deployers.client.spi.main.MainDeployer mainDeployer
          The server MainDeployer
protected  org.jboss.profileservice.spi.ProfileKey profileKey
          The root profile key.
protected  org.jboss.profileservice.spi.ProfileService profileService
          The server ProfileService
 
Constructor Summary
ProfileServiceBootstrap()
          Create a new ProfileServiceBootstrap.
 
Method Summary
protected  void deactivateProfiles(Collection<org.jboss.profileservice.spi.ProfileKey> profiles)
           
 Map<String,org.jboss.managed.api.ManagedDeployment> getBootstrapMDs()
           
 AbstractBootstrapProfileFactory getBootstrapProfileFactory()
           
 org.jboss.kernel.spi.config.KernelConfigurator getConfigurator()
           
 org.jboss.kernel.spi.registry.KernelRegistryEntry getEntry(Object name)
           
protected  org.jboss.managed.plugins.DefaultFieldsImpl getFields(String name, org.jboss.metatype.api.types.MetaType type)
          Create a DefaultFieldsImpl for the given property name and type
 org.jboss.deployers.client.spi.main.MainDeployer getMainDeployer()
          Return the MainDeployer bean.
 org.jboss.deployers.spi.deployer.managed.ManagedDeploymentCreator getMgtDeploymentCreator()
           
 org.jboss.managed.api.factory.ManagedObjectFactory getMof()
           
 org.jboss.profileservice.spi.ProfileKey getProfileKey()
           
 org.jboss.profileservice.spi.ProfileService getProfileService()
          Return the ProfileService bean.
protected  org.jboss.metatype.api.values.EnumValue getState(Object name, org.jboss.kernel.Kernel kernel)
          Get the state of a bean
protected  void initBootstrapMDs(org.jboss.bootstrap.spi.Server server)
          Create ManagedDeployments for the MCServer KernelDeployments.
 void prepareShutdown(org.jboss.bootstrap.spi.Server server)
           
 void setBootstrapMDs(Map<String,org.jboss.managed.api.ManagedDeployment> bootstrapMDs)
           
 void setBootstrapProfileFactory(AbstractBootstrapProfileFactory profileFactory)
           
 void setConfigurator(org.jboss.kernel.spi.config.KernelConfigurator configurator)
           
 void setMainDeployer(org.jboss.deployers.client.spi.main.MainDeployer mainDeployer)
           
 void setMgtDeploymentCreator(org.jboss.deployers.spi.deployer.managed.ManagedDeploymentCreator mgtDeploymentCreator)
           
 void setMof(org.jboss.managed.api.factory.ManagedObjectFactory mof)
           
 void setProfileKey(org.jboss.profileservice.spi.ProfileKey profileKey)
           
 void setProfileService(org.jboss.profileservice.spi.ProfileService profileService)
           
 void shutdown(org.jboss.bootstrap.spi.Server server)
           
 void start(org.jboss.bootstrap.spi.Server server)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

profileKey

protected org.jboss.profileservice.spi.ProfileKey profileKey
The root profile key.


mainDeployer

protected org.jboss.deployers.client.spi.main.MainDeployer mainDeployer
The server MainDeployer


profileService

protected org.jboss.profileservice.spi.ProfileService profileService
The server ProfileService

Constructor Detail

ProfileServiceBootstrap

public ProfileServiceBootstrap()
Create a new ProfileServiceBootstrap.

Method Detail

getMainDeployer

public org.jboss.deployers.client.spi.main.MainDeployer getMainDeployer()
Return the MainDeployer bean.

Returns:
the MainDeployer bean if bootstrap succeeded, null otherwise.

setMainDeployer

public void setMainDeployer(org.jboss.deployers.client.spi.main.MainDeployer mainDeployer)

getConfigurator

public org.jboss.kernel.spi.config.KernelConfigurator getConfigurator()

setConfigurator

public void setConfigurator(org.jboss.kernel.spi.config.KernelConfigurator configurator)

getProfileService

public org.jboss.profileservice.spi.ProfileService getProfileService()
Return the ProfileService bean.

Returns:
the ProfileService bean if bootstrap succeeded, null otherwise

setProfileService

public void setProfileService(org.jboss.profileservice.spi.ProfileService profileService)

getProfileKey

public org.jboss.profileservice.spi.ProfileKey getProfileKey()

setProfileKey

public void setProfileKey(org.jboss.profileservice.spi.ProfileKey profileKey)

getMof

public org.jboss.managed.api.factory.ManagedObjectFactory getMof()

setMof

public void setMof(org.jboss.managed.api.factory.ManagedObjectFactory mof)

getMgtDeploymentCreator

public org.jboss.deployers.spi.deployer.managed.ManagedDeploymentCreator getMgtDeploymentCreator()

setMgtDeploymentCreator

public void setMgtDeploymentCreator(org.jboss.deployers.spi.deployer.managed.ManagedDeploymentCreator mgtDeploymentCreator)

getBootstrapProfileFactory

public AbstractBootstrapProfileFactory getBootstrapProfileFactory()

setBootstrapProfileFactory

public void setBootstrapProfileFactory(AbstractBootstrapProfileFactory profileFactory)

getBootstrapMDs

public Map<String,org.jboss.managed.api.ManagedDeployment> getBootstrapMDs()

setBootstrapMDs

public void setBootstrapMDs(Map<String,org.jboss.managed.api.ManagedDeployment> bootstrapMDs)

start

public void start(org.jboss.bootstrap.spi.Server server)
           throws Exception
Specified by:
start in interface org.jboss.bootstrap.spi.Bootstrap
Throws:
Exception

prepareShutdown

public void prepareShutdown(org.jboss.bootstrap.spi.Server server)
Specified by:
prepareShutdown in interface org.jboss.bootstrap.spi.Bootstrap

shutdown

public void shutdown(org.jboss.bootstrap.spi.Server server)
Specified by:
shutdown in interface org.jboss.bootstrap.spi.Bootstrap

getEntry

public org.jboss.kernel.spi.registry.KernelRegistryEntry getEntry(Object name)
Specified by:
getEntry in interface org.jboss.kernel.spi.registry.KernelRegistryPlugin

deactivateProfiles

protected void deactivateProfiles(Collection<org.jboss.profileservice.spi.ProfileKey> profiles)

initBootstrapMDs

protected void initBootstrapMDs(org.jboss.bootstrap.spi.Server server)
Create ManagedDeployments for the MCServer KernelDeployments. This allows the bootstrap deployments outside of the profile service to be visible in the ManagementView

Parameters:
server - - the Bootstrap.start Server instance. This must be an MCServer in order for there to be KernelDeployments available.
See Also:
ManagementView}

getFields

protected org.jboss.managed.plugins.DefaultFieldsImpl getFields(String name,
                                                                org.jboss.metatype.api.types.MetaType type)
Create a DefaultFieldsImpl for the given property name and type

Parameters:
name - - the property name
type - - the property type
Returns:
return the fields implementation

getState

protected org.jboss.metatype.api.values.EnumValue getState(Object name,
                                                           org.jboss.kernel.Kernel kernel)
Get the state of a bean

Parameters:
name - the bean name
Returns:
state enum value


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.