Build 1.0_r1(from source)

java.security
Class GuardedObject

java.lang.Object
  extended by java.security.GuardedObject
All Implemented Interfaces:
Serializable

public class GuardedObject
extends Object
implements Serializable

GuardedObject controls access to an object, by checking all requests for the object with a Guard.

See Also:
Serialized Form

Constructor Summary
GuardedObject(Object object, Guard guard)
          Constructs a GuardedObject to protect access to the specified Object using the specified Guard.
 
Method Summary
 Object getObject()
          Checks whether access should be granted to the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GuardedObject

public GuardedObject(Object object,
                     Guard guard)
Constructs a GuardedObject to protect access to the specified Object using the specified Guard.

Parameters:
object - the Object to guard
guard - the Guard
Method Detail

getObject

public Object getObject()
                 throws SecurityException
Checks whether access should be granted to the object. If access is granted, this method returns the object. If it is not granted, then a SecurityException is thrown.

Returns:
the guarded object
Throws:
SecurityException - If access is not granted to the object

Build 1.0_r1(from source)

Please submit a feedback, bug or feature