public interface Profile
Additional method declarations
A Profile Specification Developer may define or implement a number of additional
methods in the profile abstract class that follow certain design patterns. These are:
javax.slee.SLEEException
if the operation could not be successfully
completed due to a system-level failure.
public abstract <usage-parameters-interface-name>
getDefaultUsageParameterSet();
public abstract <usage-parameters-interface-name>
getUsageParameterSet(String paramSetName) throws
javax.slee.usage.UnrecognizedUsageParameterSetNameException;
where:
usage-parameters-interface-name
is the name of the profile
specification's usage parameters interface.
These methods run in an unspecified transaction context, therefore an active transaction is not necessary in order for these methods to be successfully invoked. Additionally these method may be invoked by a profile object in any state.
Modifier and Type | Method and Description |
---|---|
void |
profileActivate()
The SLEE invokes this method on a Profile object in the Pooled state when the SLEE
reassigns the Profile object to an existing Profile.
|
void |
profileInitialize()
The SLEE invokes this method on a Profile object in the Pooled state only when the
default Profile for a Profile Table is created.
|
void |
profileLoad()
The SLEE invokes this method on a Profile object in the Ready state when the state of
the Profile object needs to be synchronized with the state in the underlying data source.
|
void |
profilePassivate()
The SLEE invokes this method on a Profile object in the Ready state when the SLEE
needs to reclaim the Profile object.
|
void |
profilePostCreate()
The SLEE invokes this method on a Profile object in the Pooled state when a new
Profile is created.
|
void |
profileRemove()
The SLEE invokes this method on a Profile object in the Ready state when a Profile is
removed.
|
void |
profileStore()
The SLEE invokes this method on a Profile object in the Ready state when the state of
the underlying data source needs to be synchronized with the state of the Profile object.
|
void |
profileVerify()
The SLEE invokes this method in response to a request made by the Administrator via the
JMX management interface to commit any changes made to a Profile.
|
void |
setProfileContext(ProfileContext context)
Set the
ProfileContext object for the Profile object. |
void |
unsetProfileContext()
Unset the
ProfileContext object for the Profile object. |
void setProfileContext(ProfileContext context)
ProfileContext
object for the Profile object. The SLEE invokes
this method immediately after a new Profile object has been created. If the Profile
object needs to use the ProfileContext
object during its lifetime, it
should store the ProfileContext
object reference in an instance variable.
This method is invoked with an unspecified transaction context. The Profile object cannot access its persistent CMP state or invoke mandatory transactional methods during this method invocation.
context
- the ProfileContext
object given to the Profile object by
the SLEE.void unsetProfileContext()
ProfileContext
object for the Profile object. If the Profile
object stored a reference to the ProfileContext
object given to it in
the setProfileContext(javax.slee.profile.ProfileContext)
method, the Profile object should clear that reference
during this method.
This is the last method invoked on a Profile object before it becomes a candidate for garbage collection.
This method is invoked with an unspecified transaction context. The Profile object cannot access its persistent CMP state or invoke mandatory transactional methods during this method invocation.
void profileInitialize()
This method is invoked with an active transaction context.
The SLEE follows a call to this method with a call to profilePostCreate()
,
and profileStore()
in the same transaction.
void profilePostCreate() throws CreateException
profileInitialize()
method. For all other profiles, the CMP fields are
prepopulated with a copy of the values stored in the default Profile.
The Profile object enters the Ready state after this method returns.
If the default Profile is being created, this method is invoked with the same transaction
context that the corresponding profileInitialize()
method was invoked with.
CreateException
- this exception may be thrown by the profile code if the Profile
could not be created successfully.void profileActivate()
This method is invoked with an unspecified transaction context. The Profile object cannot access its persistent CMP state or invoke mandatory transactional methods during this method invocation.
void profilePassivate()
profileActivate()
method, that should not be held while the Profile object
is in the Pooled state.
This method is invoked with an unspecified transaction context. The Profile object cannot access its persistent CMP state or invoke mandatory transactional methods during this method invocation.
void profileLoad()
This method is invoked with an active transaction context.
void profileStore()
This method is invoked with an active transaction context.
void profileRemove()
profilePostCreate()
or profileActivate()
should be released by the Profile object. The Profile object
transitions to the Pooled state after this method returns.
This method is invoked with an active transaction context.
void profileVerify() throws ProfileVerificationException
ProfileVerificationException
should be thrown.
The profileStore()
method is invoked in the same transaction context before this
method in order to ensure that the CMP fields of the Profile object are synchronized with
any transient state stored by the Profile object.
ProfileVerificationException
- if the Profile fails any verification check.