javax.slee.profile
Interface ProfileMBean


public interface ProfileMBean

This interface is implemented by a Profile MBean Class generated by the SLEE for a profile specification. This interface contains essential operations for managaing the life-cycle of Profile MBean objects.

The base JMX Object Name of a ProfileMBean object is specified by the BASE_OBJECT_NAME constant. The PROFILE_TABLE_NAME_KEY and PROFILE_NAME_KEY constants define additional Object Name properties that uniquely identify a profile. The complete Object Name for a Profile MBean can be obtained by a management client via various methods in the ProfileProvisioningMBean interface.


Field Summary
static java.lang.String BASE_OBJECT_NAME
          The base JMX Object Name string of all SLEE Profile MBeans.
static java.lang.String PROFILE_NAME_KEY
          The JMX Object Name property key that identifies a Profile MBean as representing the profile specified by the value of this key in the Object Name.
static java.lang.String PROFILE_TABLE_NAME_KEY
          The JMX Object Name property key that identifies a Profile MBean as representing a profile belonging to the profile table specified by the value of this key in the Object Name.
 
Method Summary
 void closeProfile()
          Notify the SLEE that the profile is no longer required by the management client.
 void commitProfile()
          Request that changes made to a profile be committed by the SLEE.
 void editProfile()
          Request that the client be granted read/write access to the profile so that it may be updated.
 boolean isProfileDirty()
          Determine if the profile has been modified since the request to edit the profile.
 boolean isProfileWriteable()
          Get the current read-write status of the profile.
 void restoreProfile()
          Request that changes made to profile should be discarded by the SLEE.
 

Field Detail

BASE_OBJECT_NAME

static final java.lang.String BASE_OBJECT_NAME
The base JMX Object Name string of all SLEE Profile MBeans. This string is equal to "javax.slee.profile:type=Profile" and the string BASE_OBJECT_NAME + ",*" defines a JMX Object Name property pattern which matches with all Profile MBeans that are registered with the MBean Server. A Profile MBean is registered with the MBean Server using this base name in conjunction with properties whose keys are specified by the PROFILE_TABLE_NAME_KEY and PROFILE_NAME_KEY constants.

Since:
SLEE 1.1
See Also:
Constant Field Values

PROFILE_TABLE_NAME_KEY

static final java.lang.String PROFILE_TABLE_NAME_KEY
The JMX Object Name property key that identifies a Profile MBean as representing a profile belonging to the profile table specified by the value of this key in the Object Name. This key is equal to the string "profileTableName".

Since:
SLEE 1.1
See Also:
BASE_OBJECT_NAME, PROFILE_NAME_KEY, Constant Field Values

PROFILE_NAME_KEY

static final java.lang.String PROFILE_NAME_KEY
The JMX Object Name property key that identifies a Profile MBean as representing the profile specified by the value of this key in the Object Name. This key is equal to the string "profileName".

Since:
SLEE 1.1
See Also:
BASE_OBJECT_NAME, PROFILE_TABLE_NAME_KEY, Constant Field Values
Method Detail

editProfile

void editProfile()
                 throws ManagementException
Request that the client be granted read/write access to the profile so that it may be updated. If the client already has read/write access to the profile, this method returns silently.

Throws:
ManagementException - if the profile could not be opened in read/write mode due to a system-level failure.

commitProfile

void commitProfile()
                   throws InvalidStateException,
                          ProfileVerificationException,
                          ManagementException
Request that changes made to a profile be committed by the SLEE. If this method returns successfully, the SLEE must again permit the client read-only access to the profile.

Throws:
InvalidStateException - if the client does not have read/write access to the profile, ie isProfileWriteable() returns false.
ProfileVerificationException - if thrown by the Profile.profileVerify() callback method in the profile's Management Profile Abstract Class. This exception can also be thrown by the profile MBean if the deployment descriptor for the profile specification documents an indexed attribute as requiring unique values and a non-unique value has been supplied in the profile.
ManagementException - if the commit operation could not be successfully completed due to a system-level failure.

restoreProfile

void restoreProfile()
                    throws InvalidStateException,
                           ManagementException
Request that changes made to profile should be discarded by the SLEE. This method is typically invoked by a management client, but may also be invoked by the SLEE if a client session times out. If this method returns successfully, the SLEE must again permit the client read-only access to the profile.

Throws:
InvalidStateException - if the client does not have read/write access to the profile, ie isProfileWriteable() returns false.
ManagementException - if the restore operation could not be successfully completed due to a system-level failure.

closeProfile

void closeProfile()
                  throws InvalidStateException,
                         ManagementException
Notify the SLEE that the profile is no longer required by the management client. As the SLEE may subsequently deregister the profile from the MBean server if no other client is currently accessing the profile, a client that invokes this method should assume that the Object Name they had for the profile is no longer valid once this method returns.

Throws:
InvalidStateException - if the profile is in read-write mode and contains uncommitted changes.
ManagementException - if the profile could not be closed by the SLEE due to a system-level failure.

isProfileDirty

boolean isProfileDirty()
                       throws ManagementException
Determine if the profile has been modified since the request to edit the profile.

Returns:
true if the profile has been modified in the current editing session, false if the profile hasn't been modified or the profile is read-only to the client.
Throws:
ManagementException - if it could not be determined if the profile has been modified due to a system-level failure.

isProfileWriteable

boolean isProfileWriteable()
                           throws ManagementException
Get the current read-write status of the profile.

Returns:
true if the profile MBean may be changed by the management client, ie. editProfile() has been successfully invoked, false otherwise.
Throws:
ManagementException - if the read-write status of the profile could not be interrogated due to a system-level failure.


Copyright © 2008. All Rights Reserved.