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
Permission
s和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.