public static class RemoteProfiles.UncommittedProfile<T> extends Object
Modifier and Type | Method and Description |
---|---|
void |
closeProfile()
Close the profile.
|
void |
commitProfile()
Commit the profile.
|
ObjectName |
getObjectName()
Retrieve the ObjectName for the new profile.
|
ProfileMBean |
getProfileMBean()
Retrieve the ProfileMBean proxy instance for the new profile.
|
T |
getProfileProxy()
Retrieve a proxy instance for the profile itself, if this UncommittedProfile was created using
RemoteProfiles.createUncommittedProfile(javax.management.MBeanServerConnection,String,String,Class) . |
void |
restoreProfile()
Restore the profile.
|
void |
setAttribute(String name,
Object value)
Set a single attribute of this uncommitted profile.
|
void |
setAttributes(AttributeList attrs)
Set several attributes of this uncommitted profile using an
AttributeList . |
public ProfileMBean getProfileMBean()
public ObjectName getObjectName()
public T getProfileProxy()
RemoteProfiles.createUncommittedProfile(javax.management.MBeanServerConnection,String,String,Class)
.
This proxy can be used to set individual attributes by directly invoking their set method. Note that this
will make one remote MBean call per invocation of a set method and is not recommended in situations where
performance is important. (RemoteProfiles.setAttributes(javax.management.MBeanServerConnection, javax.management.ObjectName, javax.management.AttributeList)
will set all attributes in one request, and is therefore more efficient.)public void restoreProfile() throws ManagementException, InvalidStateException
getProfileMBean().restoreProfile()
.public void commitProfile() throws InvalidStateException, ProfileVerificationException, ManagementException
getProfileMBean().commitProfile()
.public void closeProfile() throws InvalidStateException, ManagementException
getProfileMBean().closeProfile()
.public void setAttribute(String name, Object value) throws AttributeNotFoundException, InvalidAttributeValueException, ManagementException
mBeanServerConnection.setAttribute(uncommmittedProfile.getObjectName(), new Attribute(name, value))
.name
- the attribute namevalue
- value to setAttributeNotFoundException
InvalidAttributeValueException
ManagementException
- if the profile attributes could not be set due to a system-level failure.public void setAttributes(AttributeList attrs) throws ManagementException
AttributeList
. Equivalent to calling
mBeanServerConnection.setAttributes(uncommmittedProfile.getObjectName(), attrs)
.attrs
- a JMX AttributeList object containing the attributes to be setManagementException
- if the profile attributes could not be set due to a system-level failure.