public interface ProfileProvisioningMBean
ProfileProvisiningMBean
interface defines management operations
for creating, removing, and interacting with profiles and profile tables.
The JMX Object Name of a ProfileProvisioningMBean
object is specified by
the OBJECT_NAME
constant. Alternatively, the Object Name can be obtained by
a management client via the SleeManagementMBean.getProfileProvisioningMBean()
method.
Modifier and Type | Field and Description |
---|---|
static String |
OBJECT_NAME
The JMX Object Name string of the SLEE Profile Provisioning MBean, equal to the
string "javax.slee.management:name=ProfileProvisioning".
|
Modifier and Type | Method and Description |
---|---|
ObjectName |
createProfile(String profileTableName,
String newProfileName)
Create a new profile with the specified name in the specified profile table.
|
void |
createProfileTable(ProfileSpecificationID id,
String newProfileTableName)
Create a new profile table from a profile specification.
|
ObjectName |
getDefaultProfile(String profileTableName)
Get the JMX Object Name of the Profile MBean for the default profile of a profile
table.
|
ObjectName |
getProfile(String profileTableName,
String profileName)
Get the JMX Object Name of the Profile MBean for an existing profile.
|
Collection |
getProfiles(String profileTableName)
Get a collection of
ProfileID objects that identify all the profiles
contained in the specified profile table. |
Collection |
getProfilesByAttribute(String profileTableName,
String attributeName,
Object attributeValue)
Get a collection of
ProfileID objects that identify the profiles contained
in the specified profile table where the specified profile attribute is set to the specified
value. |
Collection |
getProfilesByDynamicQuery(String profileTableName,
QueryExpression expr)
Get a collection of
ProfileID object that identify the profiles contained
in the specified profile table where the profiles satisfy the specified query
expression. |
Collection |
getProfilesByIndexedAttribute(String profileTableName,
String attributeName,
Object attributeValue)
Deprecated.
Replaced with
getProfilesByAttribute(profileTableName, attributeName, attributeValue) .
as SLEE 1.1 does not require an attribute to be indexed in order to perform
searches against that attribute. |
Collection |
getProfilesByStaticQuery(String profileTableName,
String queryName,
Object[] parameters)
Get a collection of
ProfileID objects that identify the profiles contained
in the specified profile table where the profiles satisfy a particular search criteria. |
ProfileSpecificationID |
getProfileSpecification(String profileTableName)
Get the component identifier of the profile specification that a profile table
was created with.
|
Collection |
getProfileTables()
Get a collection of
java.lang.String objects that identify the names
of all the profile tables that have been created in the SLEE. |
Collection |
getProfileTables(ProfileSpecificationID id)
Get a collection of
java.lang.String objects that identify the names
of the profile tables that have been created from the specified profile specification. |
ObjectName |
getProfileTableUsageMBean(String profileTableName)
Get the JMX Object Name of a
ProfileTableUsageMBean object for a profile
table. |
void |
removeProfile(String profileTableName,
String profileName)
Remove a profile from a profile table.
|
void |
removeProfileTable(String profileTableName)
Remove a profile table.
|
void |
renameProfileTable(String oldProfileTableName,
String newProfileTableName)
Rename a profile table.
|
static final String OBJECT_NAME
void createProfileTable(ProfileSpecificationID id, String newProfileTableName) throws NullPointerException, UnrecognizedProfileSpecificationException, InvalidArgumentException, ProfileTableAlreadyExistsException, ManagementException
id
- the component identifier of the profile specification that the
profile table should be created from.newProfileTableName
- the name of the profile table to create. The name
cannot include the '/' character.NullPointerException
- if newProfileTableName
is null
.UnrecognizedProfileSpecificationException
- if id
is not a
recognizable ProfileSpecificationID
for the SLEE or it does
not correspond with a profile specification installed in the SLEE.InvalidArgumentException
- if newProfileTableName
is zero-length
or contains a '/' character.ProfileTableAlreadyExistsException
- if a profile table with the same
name already exists.ManagementException
- if the profile table could not be created due to
a system-level failure.void removeProfileTable(String profileTableName) throws NullPointerException, UnrecognizedProfileTableNameException, ManagementException
profileTableName
- the name of the profile table to remove.NullPointerException
- if profileTableName
is null
.UnrecognizedProfileTableNameException
- if a profile table with the specified
name does not exist.ManagementException
- if the profile table could not be removed due to
a system-level failure.ProfileSpecificationID getProfileSpecification(String profileTableName) throws NullPointerException, UnrecognizedProfileTableNameException, ManagementException
profileTableName
- the name of the profile table.NullPointerException
- if profileTableName
is null
.UnrecognizedProfileTableNameException
- if a profile table with the specified
name does not exist.ManagementException
- if the component identifier could not be obtained
due to a system-level failure.void renameProfileTable(String oldProfileTableName, String newProfileTableName) throws NullPointerException, UnrecognizedProfileTableNameException, InvalidArgumentException, ProfileTableAlreadyExistsException, ManagementException
oldProfileTableName
- the name of the profile table to rename.newProfileTableName
- the new name for the profile table.NullPointerException
- if either argument is null
.UnrecognizedProfileTableNameException
- if a profile table with the name
oldProfileTableName
does not exist.InvalidArgumentException
- if newProfileTableName
is zero-length
or contains a '/' character.ProfileTableAlreadyExistsException
- if a profile table with the same
name as newProfileTableName
already exists.ManagementException
- if the profile table could not be renamed due to
a system-level failure.ObjectName getDefaultProfile(String profileTableName) throws NullPointerException, UnrecognizedProfileTableNameException, ManagementException
The JMX Object name of the Profile MBean for the default profile is composed of at least:
base name
svn specifying
the domain and type of the MBean
profile table name
property, with a value equal to profileTableName
profile name
property,
with a value equal to the empty (zero-length) string.
profileTableName
- the name of the profile table.NullPointerException
- if profileTableName
is null
.UnrecognizedProfileTableNameException
- if a profile table with the specified
name does not exist.ManagementException
- if the Object Name could not be obtained due to a
system-level failure.ObjectName createProfile(String profileTableName, String newProfileName) throws NullPointerException, UnrecognizedProfileTableNameException, InvalidArgumentException, ProfileAlreadyExistsException, ManagementException
ObjectName
returned by this method provides the management client with
the name of a Profile MBean for the created profile. This Profile MBean is in the
read-write state allowing the management client a chance to configure the initial
values for the profile attributes before it is added to the profile table. The new
profile is not visible in the profile table until the Profile MBean state is committed
using the ProfileMBean.commitProfile()
method. If the
ProfileMBean.restoreProfile()
method is invoked on the Profile
MBean before its state is committed, creation of the profile is rolled back and the
profile is considered never to have been created successfully.
The JMX Object name of the Profile MBean for the created profile is composed of at least:
base name
specifying
the domain and type of the MBean
profile table name
property, with a value equal to profileTableName
profile name
property,
with a value equal to newProfileName
.
profileTableName
- the name of the profile table to create the profile in.newProfileName
- the name of the new profile. The name must be unique
within the scope of the profile table.NullPointerException
- if either argument is null
.UnrecognizedProfileTableNameException
- if a profile table with the specified
name does not exist.InvalidArgumentException
- if newProfileName
is zero-length or
contains illegal characters.ProfileAlreadyExistsException
- if a profile with the same name already
exists in the profile table.ManagementException
- if the profile could not be created due to a
system-level failure.void removeProfile(String profileTableName, String profileName) throws NullPointerException, UnrecognizedProfileTableNameException, UnrecognizedProfileNameException, ManagementException
profileTableName
- the name of the profile table to remove the profile from.profileName
- the name of the profile to remove.NullPointerException
- if either argument is null
.UnrecognizedProfileTableNameException
- if a profile table with the specified
name does not exist.UnrecognizedProfileNameException
- if a profile with the specified name
does not exist in the profile table.ManagementException
- if the profile could not be removed due to a
system-level failure.ObjectName getProfile(String profileTableName, String profileName) throws NullPointerException, UnrecognizedProfileTableNameException, UnrecognizedProfileNameException, ManagementException
The JMX Object name of the Profile MBean is composed of at least:
base name
specifying
the domain and type of the MBean
profile table name
property, with a value equal to profileTableName
profile name
property,
with a value equal to profileName
.
profileTableName
- the name of the profile table to obtain the profile from.profileName
- the name of the profile.NullPointerException
- if either argument is null
.UnrecognizedProfileTableNameException
- if a profile table with the specified
name does not exist.UnrecognizedProfileNameException
- if a profile with the specified name
does not exist in the profile table.ManagementException
- if the ObjectName of the profile MBean could not be obtained
due to a system-level failure.Collection getProfileTables() throws ManagementException
java.lang.String
objects that identify the names
of all the profile tables that have been created in the SLEE.java.lang.String
objects identifying the names
of all the profile tables that have been created in the SLEE.ManagementException
- if the profile table names could not be obtained due to
a system-level failure.Collection getProfileTables(ProfileSpecificationID id) throws NullPointerException, UnrecognizedProfileSpecificationException, ManagementException
java.lang.String
objects that identify the names
of the profile tables that have been created from the specified profile specification.id
- the component identifier of the profile specification.java.lang.String
objects identifying the names
of the profile profile tables that have been created from the specified
profile specification.NullPointerException
- if id
is null
.UnrecognizedProfileSpecificationException
- if id
is not a
recognizable ProfileSpecificationID
for the SLEE or it does
not correspond with a profile specification installed in the SLEE.ManagementException
- if the profile table names could not be obtained due
to a system-level failure.Collection getProfiles(String profileTableName) throws NullPointerException, UnrecognizedProfileTableNameException, ManagementException
ProfileID
objects that identify all the profiles
contained in the specified profile table.
Note: A profile identifier for the profile table's default profile will not be included in the collection returned by this method as the default profile has no such identifier.
profileTableName
- the name of the profile table.ProfileID
objects identifying the profiles
contained in the specified profile table.NullPointerException
- if profileTableName
is null
.UnrecognizedProfileTableNameException
- if a profile table with the specified
name does not exist.ManagementException
- if the profile identifiers could not be obtained due to a
system-level failure.Collection getProfilesByIndexedAttribute(String profileTableName, String attributeName, Object attributeValue) throws NullPointerException, UnrecognizedProfileTableNameException, UnrecognizedAttributeException, AttributeNotIndexedException, AttributeTypeMismatchException, ManagementException
getProfilesByAttribute(profileTableName, attributeName, attributeValue)
.
as SLEE 1.1 does not require an attribute to be indexed in order to perform
searches against that attribute.ProfileID
objects that identify the profiles contained
in the specified profile table where the specified profile attribute is set to the specified
value. In the case of a profile attribute of an array type, the type of the specified
value must be the base component type of the array, not the array type itself, and the SLEE
will return the profile identifier of any profile that contains the value within the array.
Note: The profile table's default profile is not considered when determining matching profiles as it has no profile identifier that can be included in the collection returned by this method.
This method can only be invoked on profile tables created from SLEE 1.0 profile
specifications. Attempting to invoke it on a profile table created from a SLEE 1.1
profile specification causes a ManagementException
to be thrown.
profileTableName
- the name of the profile table.attributeName
- the name of the profile's attribute to check.attributeValue
- the value to compare the attribute with.ProfileID
objects identifying the profiles contained
in the specified profile table, where the specified attribute of each profile
equals the specified value.NullPointerException
- if any argument is null
.UnrecognizedProfileTableNameException
- if a profile table with the specified
name does not exist.UnrecognizedAttributeException
- if an attribute with the specified name is
not defined in the profile specification for the specified profile table.AttributeNotIndexedException
- if the specified attribute is not indexed
in the profile specification for the specified profile table.AttributeTypeMismatchException
- if the type of the supplied attribute value does
not match the type of the specified indexed attribute.ManagementException
- if the profile identifiers could not be obtained due to a
system-level failure, or if this method is invoked against a profile table
created from a SLEE 1.1 profile specification.Collection getProfilesByAttribute(String profileTableName, String attributeName, Object attributeValue) throws NullPointerException, UnrecognizedProfileTableNameException, UnrecognizedAttributeException, InvalidArgumentException, AttributeTypeMismatchException, ManagementException
ProfileID
objects that identify the profiles contained
in the specified profile table where the specified profile attribute is set to the specified
value. The type of the attribute must be a primitive type, an object wrapper of a primitive
type, java.lang.String
, or javax.slee.Address
.
Note: The profile table's default profile is not considered when determining matching profiles as it has no profile identifier that can be included in the collection returned by this method.
This method can only be invoked on profile tables created from SLEE 1.1 profile
specifications. Attempting to invoke it on a profile table created from a SLEE 1.0
profile specification causes a ManagementException
to be thrown.
profileTableName
- the name of the profile table.attributeName
- the name of the profile's attribute to check.attributeValue
- the value to compare the attribute with.ProfileID
objects identifying the profiles contained
in the specified profile table, where the specified attribute of each profile
equals the specified value.NullPointerException
- if any argument is null
.UnrecognizedProfileTableNameException
- if a profile table with the specified
name does not exist.UnrecognizedAttributeException
- if an attribute with the specified name is
not defined in the profile specification for the specified profile table.InvalidArgumentException
- if the type of the specified attribute is not one of
the permitted types.AttributeTypeMismatchException
- if the type of the supplied attribute value does
not match the type of the specified indexed attribute.ManagementException
- if the profile identifiers could not be obtained due to a
system-level failure, or if this method is invoked against a profile table
created from a SLEE 1.0 profile specification.Collection getProfilesByStaticQuery(String profileTableName, String queryName, Object[] parameters) throws NullPointerException, UnrecognizedProfileTableNameException, UnrecognizedQueryNameException, InvalidArgumentException, AttributeTypeMismatchException, ManagementException
ProfileID
objects that identify the profiles contained
in the specified profile table where the profiles satisfy a particular search criteria. The
queryName
argument identifies the search criteria by naming a static query
predefined in the deployment descriptor of the profile specification from which the profile
table was created.
Note: The profile table's default profile is not considered when determining matching profiles as it has no profile identifier that can be included in the collection returned by this method.
profileTableName
- the name of the profile table.queryName
- the name of a static query defined in the profile table's profile specification
deployment descriptor.parameters
- an array of parameter values to apply to parameters in the query.
May only be null
if the static query takes no arguments.ProfileID
objects identifying the profiles contained
in the specified profile table, where the profiles match the search criteria defined
in the named query.NullPointerException
- if either profileTable
or queryName
is null
, if parameters
is null
and the
query requires parameters, or if any of the provided parameter values are null
.UnrecognizedProfileTableNameException
- if a profile table with the specified
name does not exist.UnrecognizedQueryNameException
- if the profile specification deployment descriptor of
the profile table does not declare a static query of the specified query nameInvalidArgumentException
- if parameters
is not null and its length does
not match the number of parameters defined by the query.AttributeTypeMismatchException
- if the type of an attribute value included in the
query does not match the type of the attribute.ManagementException
- if the profile identifiers could not be obtained due to a
system-level failure.Collection getProfilesByDynamicQuery(String profileTableName, QueryExpression expr) throws NullPointerException, UnrecognizedProfileTableNameException, UnrecognizedAttributeException, AttributeTypeMismatchException, ManagementException
ProfileID
object that identify the profiles contained
in the specified profile table where the profiles satisfy the specified query
expression.
Note: The profile table's default profile is not considered when determining matching profiles as it has no profile identifier that can be included in the collection returned by this method.
profileTableName
- the name of the profile table.expr
- the query expression to apply to profiles in the profile table.ProfileID
objects identifying the profiles contained
in the specified profile table, where the profiles match the search criteria defined
by the search expressionNullPointerException
- if either argument is null
.UnrecognizedProfileTableNameException
- if a profile table with the specified
name does not exist.UnrecognizedAttributeException
- if the query expression references an attribute
that does not exist in the profile table's profile specification.AttributeTypeMismatchException
- if the type of the attribute is not valid for
the query expression, or if the type of an attribute value included in the query
expression does not match the type of the attribute.ManagementException
- if the profile identifiers could not be obtained due to a
system-level failure.ObjectName getProfileTableUsageMBean(String profileTableName) throws NullPointerException, UnrecognizedProfileTableNameException, InvalidArgumentException, ManagementException
ProfileTableUsageMBean
object for a profile
table.
The JMX Object name of the Profile Table Usage MBean is composed of at least:
base name
which specifies
the domain and type of the MBean
ProfileTableUsageMBean.PROFILE_TABLE_NAME_KEY
property, with a
value equal to profileTableName
profileTableName
- the name of the profile table.ProfileTableUsageMBean
object for the
specified profile table.NullPointerException
- if profileTableName
is null
.UnrecognizedProfileTableNameException
- if a profile table with the specified
name does not exist.InvalidArgumentException
- if the profile specification component that the
specified profile table was created from does not define a usage parameters
interface.ManagementException
- if the Object Name could not be obtained due to a
system-level failure.