|
JBoss Log Manager 1.4.0.Beta1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Protectable
Allows objects to be locked for modification.
When an object isprotected, modifications to the object are not allowed. To allow
modifications for the object, the enableAccess(Object) or the unprotect(Object) methods must be
invoked.
To protect the object after enabling access, invoke the disableAccess()
access.
Note that enabling or disabling access only applies to the
current thread.
| Method Summary | |
|---|---|
void |
disableAccess()
Disable previous access to the object for modifications on the current thread. |
void |
enableAccess(Object protectKey)
Enable access to the object for modifications on the current thread. |
void |
protect(Object protectionKey)
Protect this object from modifications. |
void |
unprotect(Object protectionKey)
Allows the object to be modified if the protectionKey matches the key used to protect the object. |
| Method Detail |
|---|
void protect(Object protectionKey)
throws SecurityException
protectionKey - the key used to protect the object.
SecurityException - if the object is already protected.
void unprotect(Object protectionKey)
throws SecurityException
protectionKey matches the key used to protect the object.
protectionKey - the key used to protect the object.
SecurityException - if the object is protected and the key doesn't match.void enableAccess(Object protectKey)
protectKey - the key used to protect modifications.void disableAccess()
|
JBoss Log Manager 1.4.0.Beta1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||