Android
javax.security.auth
public final class

javax.security.auth.Subject

java.lang.Object
javax.security.auth.Subject Serializable

Summary

Public Constructors

            Subject()
            Subject(boolean readOnly, Set<? extends Principal> subjPrincipals, Set<?> pubCredentials, Set<?> privCredentials)

Public Methods

      static    Object  doAs(Subject subject, PrivilegedExceptionAction action)
      static    Object  doAs(Subject subject, PrivilegedAction action)
      static    Object  doAsPrivileged(Subject subject, PrivilegedExceptionAction action, AccessControlContext context)
      static    Object  doAsPrivileged(Subject subject, PrivilegedAction action, AccessControlContext context)
          boolean  equals(Object obj)
Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison.
          Set<Principal getPrincipals()
        <T extends Principal Set<T>  getPrincipals(Class<T> c)
          Set<Object getPrivateCredentials()
        <T>  Set<T>  getPrivateCredentials(Class<T> c)
          Set<Object getPublicCredentials()
        <T>  Set<T>  getPublicCredentials(Class<T> c)
      static    Subject  getSubject(AccessControlContext context)
          int  hashCode()
Returns an integer hash code for the receiver.
          boolean  isReadOnly()
          void  setReadOnly()
          String  toString()
Returns a string containing a concise, human-readable description of the receiver.
Methods inherited from class java.lang.Object

Details

Public Constructors

public Subject()

public Subject(boolean readOnly, Set<? extends Principal> subjPrincipals, Set<?> pubCredentials, Set<?> privCredentials)

Public Methods

public static Object doAs(Subject subject, PrivilegedExceptionAction action)

public static Object doAs(Subject subject, PrivilegedAction action)

public static Object doAsPrivileged(Subject subject, PrivilegedExceptionAction action, AccessControlContext context)

public static Object doAsPrivileged(Subject subject, PrivilegedAction action, AccessControlContext context)

public boolean equals(Object obj)

Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison. The implementation in Object returns true only if the argument is the exact same object as the receiver (==).

Parameters

obj Object the object to compare with this object.

Returns

  • boolean true if the object is the same as this object false if it is different from this object.

public Set<Principal> getPrincipals()

public Set<T> getPrincipals(Class<T> c)

public Set<Object> getPrivateCredentials()

public Set<T> getPrivateCredentials(Class<T> c)

public Set<Object> getPublicCredentials()

public Set<T> getPublicCredentials(Class<T> c)

public static Subject getSubject(AccessControlContext context)

public int hashCode()

Returns an integer hash code for the receiver. Any two objects which answer true when passed to .equals must answer the same value for this method.

Returns

  • int the receiver's hash.

public boolean isReadOnly()

public void setReadOnly()

public String toString()

Returns a string containing a concise, human-readable description of the receiver.

Returns

  • String a printable representation for the receiver.
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:56