SecurityManager.getSecurityContext

SecurityManager.getSecurityContext

Class Overview | Class Members | This Package | All Packages

Syntax
public Object getSecurityContext()
Returns
an implementation-dependent object that encapsulates sufficient information about the current execution environment to perform some security checks later.
Description
Creates an object that encapsulates the current execution environment. The result of this method is used by the three-argument checkConnect method and by the two-argument checkRead method.

These methods are needed because a trusted method may be called on to read a file or open a socket on behalf of another method. The trusted method needs to determine if the other (possibly untrusted) method would be allowed to perform the operation on its own.

See Also
checkConnect, checkRead