- java.lang.Object
-
- javax.security.auth.SubjectDomainCombiner
-
- All Implemented Interfaces:
- DomainCombiner
public class SubjectDomainCombiner extends Object implements DomainCombiner
ASubjectDomainCombiner
updates ProtectionDomains with Principals from theSubject
associated with thisSubjectDomainCombiner
.
-
-
Constructor Summary
Constructors Constructor and Description SubjectDomainCombiner(Subject subject)
Associate the providedSubject
with thisSubjectDomainCombiner
.
-
Method Summary
Methods Modifier and Type Method and Description ProtectionDomain[]
combine(ProtectionDomain[] currentDomains, ProtectionDomain[] assignedDomains)
Update the relevant ProtectionDomains with the Principals from theSubject
associated with thisSubjectDomainCombiner
.Subject
getSubject()
Get theSubject
associated with thisSubjectDomainCombiner
.
-
-
-
Constructor Detail
-
SubjectDomainCombiner
public SubjectDomainCombiner(Subject subject)
Associate the providedSubject
with thisSubjectDomainCombiner
.- Parameters:
subject
- theSubject
to be associated with with thisSubjectDomainCombiner
.
-
-
Method Detail
-
getSubject
public Subject getSubject()
Get theSubject
associated with thisSubjectDomainCombiner
.- Returns:
- the
Subject
associated with thisSubjectDomainCombiner
, ornull
if noSubject
is associated with thisSubjectDomainCombiner
. - Throws:
SecurityException
- if the caller does not have permission to get theSubject
associated with thisSubjectDomainCombiner
.
-
combine
public ProtectionDomain[] combine(ProtectionDomain[] currentDomains, ProtectionDomain[] assignedDomains)
Update the relevant ProtectionDomains with the Principals from theSubject
associated with thisSubjectDomainCombiner
.A new
ProtectionDomain
instance is created for eachProtectionDomain
in the currentDomains array. Each newProtectionDomain
instance is created using theCodeSource
,Permission
s andClassLoader
from the correspondingProtectionDomain
in currentDomains, as well as with the Principals from theSubject
associated with thisSubjectDomainCombiner
.All of the newly instantiated ProtectionDomains are combined into a new array. The ProtectionDomains from the assignedDomains array are appended to this new array, and the result is returned.
Note that optimizations such as the removal of duplicate ProtectionDomains may have occurred. In addition, caching of ProtectionDomains may be permitted.
- Specified by:
combine
in interfaceDomainCombiner
- Parameters:
currentDomains
- the ProtectionDomains associated with the current execution Thread, up to the most recent privilegedProtectionDomain
. The ProtectionDomains are are listed in order of execution, with the most recently executingProtectionDomain
residing at the beginning of the array. This parameter may benull
if the current execution Thread has no associated ProtectionDomains.assignedDomains
- the ProtectionDomains inherited from the parent Thread, or the ProtectionDomains from the privileged context, if a call to AccessController.doPrivileged(..., context) had occurred This parameter may benull
if there were no ProtectionDomains inherited from the parent Thread, or from the privileged context.- Returns:
- a new array consisting of the updated ProtectionDomains,
or
null
.
-
-
Traduction non disponible
Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.
Version en cache
21/11/2024 21:56:36 Cette version de la page est en cache (à la date du 21/11/2024 21:56:36) afin d'accélérer le traitement. Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la dernère version de la page.Document créé le 01/09/2006, dernière modification le 04/03/2020
Source du document imprimé : https://www.gaudry.be/java-api-rf-javax/security/auth/subjectdomaincombiner.html
L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.
Références
Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.