|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요: 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 |
public interface DomainCombiner
DomainCombiner
에서는, 동적으로 현행의 AccessControlContext
에 관련한 ProtectionDomains 를 변경하는 수단을 제공합니다.
DomainCombiner
는,AccessControlContext
의 적절한 생성자 에 파라미터로서 건네받습니다. 다음에, 이 새롭게 구축된 문맥은,AccessController.doPrivileged(..., context)
메소드에게 건네져, 지정된 문맥과 거기에 관련한 DomainCombiner
를 현행의 실행 Thread 에 바인드 합니다. 그 후,AccessController.getContext
또는 AccessController.checkPermission
를 호출하면(자),DomainCombiner.combine
가 불려 갑니다.
combine 메소드에는 인수가 2 개 있습니다. 제 1 인수는, 현재 실행중의 Thread 의,AccessController.doPrivileged
를 마지막으로 호출하고 나서의, ProtectionDomains 의 배열을 나타냅니다. doPrivileged 의 호출이 없는 경우, 제 1 인수에는 실행중의 Thread 로부터의 모든 ProtectionDomains 가 포함됩니다. 제 2 인수는 상속된 ProtectionDomains 의 배열을 나타냅니다. 이 인수는 null
의 경우도 있습니다. ProtectionDomains 는 친 Thread 인가, 특권 첨부 문맥으로부터 상속됩니다. doPrivileged 의 호출이 없는 경우, 제 2 인수에 친 Thread 로부터 상속된 ProtectionDomains 가 포함됩니다. doPrivileged 가 1 회 이상 불려 가 최신의 호출이 doPrivileged(action, context)인 경우는, 제 2 인수에 특권 첨부 문맥으로부터의 ProtectDomains 이 포함됩니다. 최신의 호출이 doPrivileged(action)인 경우, 특권 첨부 문맥은 존재하지 않고, 제 2 인수는 null
가 됩니다.
combine
메소드에서는, ProtectionDomains 의 2 방법의 입력 배열을 조사해 변경된 ProtectionDomains 를 포함한 배치를 1 개 돌려줍니다. 무엇보다 단순한 경우,combine
메소드는, 2 개의 스택을 1 개에 통합합니다. 복잡하게 되면(자), 이 메소드는, ProtectionDomains 의 변경이 끝난 스택을 돌려줍니다. 변경에는, 신규 ProtectionDomains 의 추가, 특정의 ProtectionDomains 의 삭제, 또는 간단하게 변경된 기존의 ProtectionDomains 가 있습니다. ProtectionDomains 에 대한 재순서부와 그 외의 최적화도 또 허가됩니다. 일반적으로,combine
메소드는,DomainCombiner
로 캡슐화된 정보에 관한 메소드의 변경을 기본으로 합니다.
AccessController.getContext
메소드는, 짜 합쳐진 ProtectionDomains 의 스택을 DomainCombiner
로부터 받은 후,DomainCombiner
와 짜 합쳐진 ProtectionDomains 의 2 개를 가지는 신규 AccessControlContext 를 돌려줍니다.
AccessController
,
AccessControlContext
메소드의 개요 | |
---|---|
ProtectionDomain [] |
combine (ProtectionDomain [] currentDomains,
ProtectionDomain [] assignedDomains)
지정된 ProtectionDomains 를 변경 또는 갱신합니다. |
메소드의 상세 |
---|
ProtectionDomain [] combine(ProtectionDomain [] currentDomains, ProtectionDomain [] assignedDomains)
currentDomains
- 실행중의 Thread 에 관련한 ProtectionDomains. 최신의 특권 첨부 ProtectionDomain
에 따라서 다르다.
ProtectionDomains 는, 마지막에 실행한 ProtectionDomain
를 배열의 선두로 해, 실행된 순서로 열거된다. 실행중의 Thread 에 ProtectionDomain 를 관련지을 수 있지 않은 경우, 이 파라미터는 null
가 될 가능성이 있는assignedDomains
- 상속된 ProtectionDomains 의 배열.
ProtectionDomains 는 친 Thread 인가, 특권 첨부의 AccessControlContext
로부터 상속되고 있다. 상속된 ProtectionDomain 가 존재하지 않는 경우, 이 파라미터는 null
가 될 가능성이 있다
null
|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요: 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 |
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.