org.jboss.ha.singleton
Class HASingletonProfileManager

java.lang.Object
  extended by org.jboss.ha.singleton.HASingletonProfileActivator
      extended by org.jboss.ha.singleton.HASingletonProfileManager
All Implemented Interfaces:
HASingletonProfileActivatorMBean, HASingletonProfileManagerMBean

public class HASingletonProfileManager
extends HASingletonProfileActivator
implements HASingletonProfileManagerMBean

Extends HASingletonProfileActivator by actually creating and registering a Profile from a configurable set of URIs during the start() phase, deregistering it in the stop() phase.

Version:
$Revision: 85945 $
Author:
Brian Stansberry

Field Summary
 
Fields inherited from class org.jboss.ha.singleton.HASingletonProfileActivator
DEFAULT_PROFILE_NAME, log
 
Constructor Summary
HASingletonProfileManager()
          Create a new HASingletonProfileManager.
 
Method Summary
protected  org.jboss.profileservice.spi.metadata.ProfileSourceMetaData createSource(URI[] uris, boolean hotDeployment)
          Create a profile repository source meta data.
 AbstractProfileFactory getProfileFactory()
           
 List<URI> getURIList()
          Get the uri list
 void setProfileFactory(AbstractProfileFactory profileFactory)
           
 void setURIList(List<URI> list)
          Set the uri list
 void start()
          Builds a profile from the URI list and registers it under the configured HASingletonProfileActivator.getProfileKey().
 void stop()
          Unregisters the profile registered in start().
 
Methods inherited from class org.jboss.ha.singleton.HASingletonProfileActivator
activateProfile, getProfileDomain, getProfileKey, getProfileName, getProfileServer, getProfileService, handleNoSuchProfileException, isActivated, releaseProfile, setProfileDomain, setProfileName, setProfileServer, setProfileService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HASingletonProfileManager

public HASingletonProfileManager()
Create a new HASingletonProfileManager.

Method Detail

getProfileFactory

public AbstractProfileFactory getProfileFactory()

setProfileFactory

public void setProfileFactory(AbstractProfileFactory profileFactory)

setURIList

public void setURIList(List<URI> list)
                throws IOException
Set the uri list

Specified by:
setURIList in interface HASingletonProfileManagerMBean
Parameters:
list - the list
Throws:
IOException

getURIList

public List<URI> getURIList()
Get the uri list

Specified by:
getURIList in interface HASingletonProfileManagerMBean
Returns:
the list

start

public void start()
           throws Exception
Builds a profile from the URI list and registers it under the configured HASingletonProfileActivator.getProfileKey().

Throws:
Exception

stop

public void stop()
          throws Exception
Unregisters the profile registered in start().

Throws:
Exception

createSource

protected org.jboss.profileservice.spi.metadata.ProfileSourceMetaData createSource(URI[] uris,
                                                                                   boolean hotDeployment)
Create a profile repository source meta data.

Parameters:
type - the repository type.
uri - the uri
Returns:
the profile source meta data.


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