|
JavaTM 2 Platform Std. Ed. v1. 4.0 |
||||||||||
ÀüÀÇ Å¬·¡½º ´ÙÀ½ÀÇ Å¬·¡½º | ÇÁ·¹ÀÓ ÀÖ¾î ÇÁ·¹ÀÓ ¾øÀ½ | ||||||||||
°³¿ä: »óÀÚ | Çʵå | constructor | ¸Þ¼Òµå | »ó¼¼: Çʵå | constructor | ¸Þ¼Òµå |
DomainCombiner
¿¡¼´Â µ¿ÀûÀ¸·Î ÇöÇàÀÇ AccessControlContext
¿¡ °ü·ÃÇÑ ProtectionDomains ¸¦ º¯°æÇÏ´Â ¼ö´ÜÀ» Á¦°øÇÕ´Ï´Ù.
DomainCombiner
´Â AccessControlContext
ÀÇ ÀûÀýÇÑ constructor ¿¡ ÆÄ¶ó¹ÌÅͷμ °Ç³×¹Þ½À´Ï´Ù. ´ÙÀ½¿¡, ÀÌ »õ·Ó°Ô ±¸ÃàµÈ ¹®¸ÆÀº 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 ¸¦ º¯°æ ¶Ç´Â °»½ÅÇÕ´Ï´Ù. |
¸Þ¼ÒµåÀÇ »ó¼¼ |
public ProtectionDomain [] combine(ProtectionDomain [] currentDomains, ProtectionDomain [] assignedDomains)
currentDomains
- ½ÇÇàÁßÀÇ Thread ¿¡ °ü·ÃÇÑ ProtectionDomains ´Â ÃÖÁ¾ Ư±Ç ÷ºÎ ProtectionDomain
¿¡ µû¶ó¼ ´Ù¸£´Ù. ProtectionDomains ´Â ¸¶Áö¸·¿¡ ½ÇÇàÇÑ ProtectionDomain
¸¦ ¹è¿ÀÇ ¼±µÎ·Î ÇØ, ½ÇÇàµÈ ¼ø¼·Î ¿°ÅµÈ´Ù. ½ÇÇàÁßÀÇ Thread °¡ °ü·ÃÇÑ ProtectionDomains ¸¦ °¡ÁöÁö ¾Ê´Â °æ¿ì, ÀÌ ÆÄ¶ó¹ÌÅÍ´Â null
ÀÇ °¡´É¼ºÀÌ ÀÖ´Ù
assignedDomains
- °è½ÂµÈ ProtectionDomains ÀÇ ¹è¿. ProtectionDomains ´Â Ä£ Thread Àΰ¡, Ư±Ç ÷ºÎÀÇ AccessControlContext
·ÎºÎÅÍ °è½ÂÇϰí ÀÖ´Ù. °è½ÂµÈ ProtectionDomains °¡ ¾ø´Â °æ¿ì, ÀÌ ÆÄ¶ó¹ÌÅÍ´Â null
null
|
JavaTM 2 Platform Std. Ed. v1. 4.0 |
||||||||||
ÀüÀÇ Å¬·¡½º ´ÙÀ½ÀÇ Å¬·¡½º | ÇÁ·¹ÀÓ ÀÖ¾î ÇÁ·¹ÀÓ ¾øÀ½ | ||||||||||
°³¿ä: »óÀÚ | Çʵå | constructor | ¸Þ¼Òµå | »ó¼¼: Çʵå | constructor | ¸Þ¼Òµå |
Java, Java 2 D, ¹× JDBC ´Â ¹Ì±¹ ¹× ±× ¿ÜÀÇ ³ª¶ó¿¡ ÀÖ¾î¼ÀÇ ¹Ì±¹ Sun Microsystems, Inc. ÀÇ »óÇ¥ ȤÀº µî·Ï»óÇ¥ÀÔ´Ï´Ù.
Copyright 1993-2002 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.