public class SubjectDomainCombiner extends Object implements DomainCombiner
SubjectDomainCombiner更新protectiondomains与此相关的
Subject校长
SubjectDomainCombiner。
| Constructor and Description |
|---|
SubjectDomainCombiner(Subject subject)
联想提供的
Subject这个
SubjectDomainCombiner。
|
| Modifier and Type | Method and Description |
|---|---|
ProtectionDomain[] |
combine(ProtectionDomain[] currentDomains, ProtectionDomain[] assignedDomains)
从这个
SubjectDomainCombiner相关的
Subject校长更新相关protectiondomains。
|
Subject |
getSubject()
得到这个
SubjectDomainCombiner相关的
Subject。
|
public SubjectDomainCombiner(Subject subject)
Subject这个
SubjectDomainCombiner。
subject -
Subject是与这个
SubjectDomainCombiner。
public Subject getSubject()
SubjectDomainCombiner
Subject
相关。
Subject
SubjectDomainCombiner,或
null如果没有与此相关的
Subject
SubjectDomainCombiner。
SecurityException如果调用者没有权限得到
Subject这个
SubjectDomainCombiner相关。
public ProtectionDomain[] combine(ProtectionDomain[] currentDomains, ProtectionDomain[] assignedDomains)
SubjectDomainCombiner相关的
Subject校长更新相关protectiondomains。
一个新的ProtectionDomain实例在currentdomains阵列的每个ProtectionDomain创建。每一个新的ProtectionDomain实例使用的CodeSource创建,从currentdomains相应ProtectionDomain Permissions和ClassLoader,以及与此相关的Subject SubjectDomainCombiner校长。
所有的新实例化的protectiondomains组合成一个新的阵列。从assigneddomains阵列的protectiondomains附加到这个新的数组,并返回结果。
注意优化,如重复protectiondomains去除可能发生。此外,缓存protectiondomains不得。
combine 接口
DomainCombiner
currentDomains - protectiondomains与当前执行线程关联,到最近的特权
ProtectionDomain。是的protectiondomains在执行顺序列出,与最近执行
ProtectionDomain居住在数组的开始。这个参数可以
null如果当前执行的线程没有相关protectiondomains。
assignedDomains -从父线程继承protectiondomains,或protectiondomains从特权语境,如果调用doPrivileged(AccessController。…,语境)发生这个参数可以
null如果没有protectiondomains从父线程继承,或从特权语境。
null。
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.