|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.ha.singleton.HASingletonProfileActivator
public class HASingletonProfileActivator
Bean that activates a configurable Profile when notified by a singleton controller, and releases it when notified. TODO rename and move to another package, as there is nothing HASingleton-specific about what this bean does; it just exposes an operation an HASingletonController can use.
Field Summary | |
---|---|
static String |
DEFAULT_PROFILE_NAME
Default value for getProfileName() |
protected Logger |
log
|
Constructor Summary | |
---|---|
HASingletonProfileActivator()
Create a new HASingletonProfileActivator. |
Method Summary | |
---|---|
void |
activateProfile()
Tells the ProfileService to activate the profile . |
String |
getProfileDomain()
Gets the value that should be used for the domain portion of
the singleton @{link Profile}'s ProfileKey . |
org.jboss.profileservice.spi.ProfileKey |
getProfileKey()
Gets the key for the Profile that we activate and release. |
String |
getProfileName()
Gets the value that should be used for the name portion of
the singleton @{link Profile}'s ProfileKey . |
String |
getProfileServer()
Gets the value that should be used for the server portion of
the singleton @{link Profile}'s ProfileKey . |
org.jboss.profileservice.spi.ProfileService |
getProfileService()
Gets the ProfileService. |
protected void |
handleNoSuchProfileException(org.jboss.profileservice.spi.NoSuchProfileException e)
Handle a NoSuchProfileException thrown in activateProfile() . |
boolean |
isActivated()
Gets whether this object has activated its profile. |
void |
releaseProfile()
Tells the ProfileService to release the profile . |
void |
setProfileDomain(String profileDomain)
Sets the value that should be used for the domain portion of
the singleton @{link Profile}'s ProfileKey . |
void |
setProfileName(String profileName)
Sets the value that should be used for the name portion of
the singleton @{link Profile}'s ProfileKey . |
void |
setProfileServer(String profileServer)
Sets the value that should be used for the server portion of
the singleton @{link Profile}'s ProfileKey . |
void |
setProfileService(org.jboss.profileservice.spi.ProfileService profileService)
Sets the ProfileService reference. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_PROFILE_NAME
getProfileName()
protected final Logger log
Constructor Detail |
---|
public HASingletonProfileActivator()
Method Detail |
---|
public org.jboss.profileservice.spi.ProfileService getProfileService()
public void setProfileService(org.jboss.profileservice.spi.ProfileService profileService)
profileService
- the profileService. Cannot be null
IllegalArgumentException
- if profileService
is null
public String getProfileDomain()
domain
portion of
the singleton @{link Profile}'s ProfileKey
.
getProfileDomain
in interface HASingletonProfileActivatorMBean
null
if not setpublic void setProfileDomain(String profileDomain)
domain
portion of
the singleton @{link Profile}'s ProfileKey
.
profileDomain
- the domain, or null
public String getProfileServer()
server
portion of
the singleton @{link Profile}'s ProfileKey
.
getProfileServer
in interface HASingletonProfileActivatorMBean
null
if not setpublic void setProfileServer(String profileServer)
server
portion of
the singleton @{link Profile}'s ProfileKey
.
profileServer
- the server, or null
public String getProfileName()
name
portion of
the singleton @{link Profile}'s ProfileKey
.
getProfileName
in interface HASingletonProfileActivatorMBean
#DEFAULT_PROFILE_NAME
if not setpublic void setProfileName(String profileName)
name
portion of
the singleton @{link Profile}'s ProfileKey
.
profileName
- the name, or null
public boolean isActivated()
isActivated
in interface HASingletonProfileActivatorMBean
true
if HASingletonProfileActivatorMBean.activateProfile()
has successfully
completed and HASingletonProfileActivatorMBean.releaseProfile()
has not been called;
false
otherwise.public void activateProfile() throws Exception
activate the profile
.
Called by the HASingletonController when we become the singleton master.
activateProfile
in interface HASingletonProfileActivatorMBean
Exception
public void releaseProfile() throws Exception
release the profile
.
Called by the HASingletonController when we are no longer the singleton master.
releaseProfile
in interface HASingletonProfileActivatorMBean
Exception
public org.jboss.profileservice.spi.ProfileKey getProfileKey()
Profile
that we activate and release.
null
getProfileDomain()
,
getProfileServer()
,
getProfileName()
protected void handleNoSuchProfileException(org.jboss.profileservice.spi.NoSuchProfileException e)
activateProfile()
.
This base implementation just logs a WARN.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |