|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
ÀüÀÇ Å¬·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
°³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå |
java.lang.Objectjavax.management.NotificationBroadcasterSupport
javax.management.timer.Timer
public class Timer
ŸÀÌ¸Ó MBean ±¸ÇöÀ» Á¦°øÇÕ´Ï´Ù. ŸÀÌ¸Ó MBean´Â ÁöÁ¤µÈ ½Ã°£¿¡ ¾Ë¶÷À» ¹ß½ÅÇÏ´Â °ÍÀ¸·Î½á, ŸÀÌ¸Ó ÅëÁö¸¦ ¼ö½ÅÇÏ´Â ¸®½º³Ê·Î¼ µî·ÏµÇ¾î ¸ðµç ¸®½º³Ê¸¦ ½ÃÀÛÇÕ´Ï´Ù.
ÀÌ Å¬·¡½º´Â ³¯Â¥¿Í ½Ã°£ÀÇ ÁöÁ¤µÈ ŸÀÌ¸Ó ÅëÁöÀÇ ¸®½ºÆ®¸¦ °ü¸®ÇÕ´Ï´Ù. ´ÜÀÏÀÇ ¸Þ¼µå·Î ÇÊ¿äÇÑ ¼öÀÇ ÅëÁö¸¦ Ãß°¡ ¶Ç´Â »èÁ¦ÇÒ ¼ö ÀÖ½À´Ï´Ù. ŸÀ̸ӺÎÅÍ ¹ßÇàµÈ ŸÀÌ¸Ó ÅëÁö´Â ³°¾ÆÁö¸é ÀÚµ¿ÀûÀ¸·Î ŸÀÌ¸Ó ÅëÁö ¸®½ºÆ®·ÎºÎÅÍ »èÁ¦µË´Ï´Ù.
Á¤±âÀûÀ¸·Î ¹Ýº¹ÇÏ´Â ÅëÁö·Î¼ ŸÀÌ¸Ó ÅëÁö¸¦ Ãß°¡ÇÒ ¼ö ÀÖ½À´Ï´Ù.
ÁÖ:
sendPastNotifications
Ç÷¡±× »óÅ (¿Í)´Â °ü°è¾ø´Â °ÍÀ¸·ÎaddNotification
¸Þ¼µå°¡ ºÒ·Á°¡±â ÀüÀÇ ¸ðµç ÅëÁö°¡ ¹«½ÃµË´Ï´Ù.
Timer
Ŭ·¡½º°¡ ·Îµå µÈ È£½ºÆ®ÀÇ ½Ã½ºÅÛ ½Ã°£¿¡
Á¸Çϰí ÀÖ½À´Ï´Ù. È£½ºÆ®ÀÇ ½Ã½ºÅÛ ½Ã°£ÀÌ Â÷À̰¡ ³ª¸é, ¸®½º³Ê°¡ ¿Ã¹Ù¸¥ ½Ã°¢¿¡ ÅëÁö¸¦ ³³µæÇÒ ¼ö ¾ø´Â °ÍÀÌ ÀÖ½À´Ï´Ù. ÀÌ·¯ÇÑ ¹®Á¦¸¦ ÇÇÇÏ·Á¸é,
ŸÀ̹ÖÀÇ ÇÊ¿äÇÑ ¸ðµç È£½ºÆ® ¸Ó½ÅÀÇ ½Ã½ºÅÛ ½Ã°£À» µ¿±âÈÇÕ´Ï´Ù.
Timer
·Î ÁöÁ¤µÇ°í ÀÖµµ·Ï fixed-delay ½ÇÇà schemaÀÔ´Ï´Ù. fixed-rate ½ÇÇà schema¸¦ »ç¿ëÇÏ·Á¸é,
overload µÈ addNotification(String, String, Object, Date, long, long, boolean)
¸Þ¼µå¸¦ »ç¿ëÇÕ´Ï´Ù.
NotificationBroadcasterSupport
¸¦
ÂüÁ¶ÇϽʽÿÀ.
ÇÊµå °³¿ä | |
---|---|
static long |
ONE_DAY
1 ÇϳªÀÇ ¹Ð¸® ¼¼ÄÁµå¼ö. |
static long |
ONE_HOUR
1 ½Ã°£ÀÇ ¹Ð¸® ¼¼ÄÁµå¼ö. |
static long |
ONE_MINUTE
1 ºÐÀÇ ¹Ð¸® ¼¼ÄÁµå¼ö. |
static long |
ONE_SECOND
1 ÃÊÀÇ ¹Ð¸® ¼¼ÄÁµå¼ö. |
static long |
ONE_WEEK
1 ÁÖ°£ÀÇ ¹Ð¸® ¼¼ÄÁµå¼ö. |
»ý¼ºÀÚ °³¿ä | |
---|---|
Timer ()
µðÆúÆ®ÀÇ »ý¼ºÀÚ ÀÔ´Ï´Ù. |
¸Þ¼µå °³¿ä | |
---|---|
Integer |
addNotification (String type,
String message,
Object userData,
Date date)
ÁöÁ¤µÈ type , message ¹× userData ·Î »õ·Î¿î ŸÀÌ¸Ó ÅëÁö¸¦ ÀÛ¼ºÇØ, À̰ÍÀ» ÁöÁ¤ÀÇ ³¯Â¥¿Í ½Ã°£, °£°Ý null ¹× ¹ßÇà¼ö¿Í ÇÔ²² ÅëÁö ¸®½ºÆ®¿¡ »ðÀÔÇÕ´Ï´Ù. |
Integer |
addNotification (String type,
String message,
Object userData,
Date date,
long period)
ÁöÁ¤µÈ type , message ¹× userData ·Î »õ·Î¿î ŸÀÌ¸Ó ÅëÁö¸¦ ÀÛ¼ºÇØ, À̰ÍÀ» ÁöÁ¤ÀÇ ³¯Â¥¿Í ½Ã°£, °£°Ý ¹× ¹ßÇà¼ö null¿Í
ÇÔ²² ÅëÁö ¸®½ºÆ®¿¡ »ðÀÔÇÕ´Ï´Ù. |
Integer |
addNotification (String type,
String message,
Object userData,
Date date,
long period,
long nbOccurences)
ÁöÁ¤µÈ type , message ¹× userData ·Î »õ·Î¿î ŸÀÌ¸Ó ÅëÁö¸¦ ÀÛ¼ºÇØ, À̰ÍÀ» ÁöÁ¤ÀÇ ³¯Â¥¿Í ½Ã°£, °£°Ý ¹× ¹ßÇà¼ö¿Í ÇÔ²² ÅëÁö ¸®½ºÆ®¿¡ »ðÀÔÇÕ´Ï´Ù. |
Integer |
addNotification (String type,
String message,
Object userData,
Date date,
long period,
long nbOccurences,
boolean fixedRate)
ÁöÁ¤µÈ type , message ¹× userData ·Î »õ·Î¿î ŸÀÌ¸Ó ÅëÁö¸¦ ÀÛ¼ºÇØ, À̰ÍÀ» ÁöÁ¤ÀÇ ³¯Â¥¿Í ½Ã°£, °£°Ý ¹× ¹ßÇà¼ö¿Í ÇÔ²² ÅëÁö ¸®½ºÆ®¿¡ »ðÀÔÇÕ´Ï´Ù. |
Vector |
getAllNotificationIDs ()
ÅëÁö ¸®½ºÆ®¿¡ µî·ÏµÇ¾î ¸ðµç ŸÀÌ¸Ó ÅëÁö ½Äº°ÀÚ¸¦ ÃëµæÇÕ´Ï´Ù. |
Date |
getDate (Integer id)
ŸÀÌ¸Ó ÅëÁö¿¡ °ü·ÃµÈ ³¯Â¥¿Í ½Ã°£ÀÇ º¹»çº»À» ÃëµæÇÕ´Ï´Ù. |
Boolean |
getFixedRate (Integer id)
Á¤±â ÅëÁö¸¦ fixed-delay ·Î ½ÇÇàÇÒ±î fixed-rate ·Î ½ÇÇàÇÏ´ÂÁö¸¦ ³ªÅ¸³»´Â Ç÷¡±×ÀÇ º¹»çº»À» ÃëµæÇÕ´Ï´Ù. |
int |
getNbNotifications ()
ÅëÁö ¸®½ºÆ®¿¡ µî·ÏµÇ¾î Àִ ŸÀÌ¸Ó ÅëÁöÀÇ ¼ö¸¦ ÃëµæÇÕ´Ï´Ù. |
Long |
getNbOccurences (Integer id)
ŸÀÌ¸Ó ÅëÁö¿¡ °ü·ÃµÈ ³ª¸ÓÁöÀÇ ¹ßÇà¼öÀÇ º¹»çº»À» ÃëµæÇÕ´Ï´Ù. |
Vector |
getNotificationIDs (String type)
ÁöÁ¤µÈ ÇüÅ¿¡ ´ëÀÀÇÏ´Â ¸ðµç ŸÀÌ¸Ó ÅëÁö ½Äº°ÀÚ¸¦ ÃëµæÇÕ´Ï´Ù. |
MBeanNotificationInfo [] |
getNotificationInfo ()
ÀÌ MBean°¡ ÅëÁö¸¦ ¼Û½ÅÇÒ ¶§¸¶´Ù, ±× ÅëÁöÀÇ Java Ŭ·¡½º¸í°ú ÅëÁöÇüÀ» ³ªÅ¸³»´Â ¹è¿À» ¸®ÅÏÇÕ´Ï´Ù. |
String |
getNotificationMessage (Integer id)
ÁöÁ¤µÈ ½Äº°ÀÚ¿¡ ´ëÀÀÇϴ ŸÀÌ¸Ó ÅëÁöÀÇ »ó¼¼ ¸Þ¼¼Áö¸¦ ÃëµæÇÕ´Ï´Ù. |
String |
getNotificationType (Integer id)
ÁöÁ¤µÈ ½Äº°ÀÚ¿¡ ´ëÀÀÇϴ ŸÀÌ¸Ó ÅëÁöÇüÀ» ÃëµæÇÕ´Ï´Ù. |
Object |
getNotificationUserData (Integer id)
ÁöÁ¤µÈ ½Äº°ÀÚ¿¡ ´ëÀÀÇϴ ŸÀÌ¸Ó ÅëÁöÀÇ »ç¿ëÀÚ µ¥ÀÌÅÍ °´Ã¼¸¦ ÃëµæÇÕ´Ï´Ù. |
Long |
getPeriod (Integer id)
ŸÀÌ¸Ó ÅëÁö¿¡ °ü·ÃµÈ °£°Ý (¹Ð¸® ¼¼ÄÁµå)ÀÇ º¹»çº»À» ÃëµæÇÕ´Ï´Ù. |
boolean |
getSendPastNotifications ()
ŸÀ̸Ӱ¡ °ú°ÅÀÇ ÅëÁö¸¦ ¼Û½ÅÇÒÁö ¾î¶³Áö¸¦ ÁöÁ¤ÇÏ´Â Ç÷¡±×¸¦ ÃëµæÇÕ´Ï´Ù. |
boolean |
isActive ()
ŸÀÌ¸Ó MBean°¡ Ȱ¼ºÈµÇ¾ú´Â°¡ ¾î¶²°¡¸¦ Å×½ºÆ®ÇÕ´Ï´Ù. |
boolean |
isEmpty ()
ŸÀÌ¸Ó ÅëÁöÀÇ ¸®½ºÆ®°¡ ºñ¾îÀÖ´ÂÁö ÆÇÁ¤ÇÕ´Ï´Ù. |
void |
postDeregister ()
MBean ¼¹ö·ÎºÎÅÍ µî·Ï ÇØÁ¦ÇÑµÚ Å¸ÀÌ¸Ó MBean°¡ ÇÊ¿äÇÑ ¿ÀÆÛ·¹À̼ÇÀ» ½ÇÇàÇÒ ¼ö ÀÖµµ·Ï ÇÕ´Ï´Ù. |
void |
postRegister (Boolean registrationDone)
MBean ¼¹ö¿¡ÀÇ µî·ÏÀÌ ¼º°ø ¶Ç´Â ½ÇÆÐÇÑµÚ Å¸ÀÌ¸Ó MBean°¡ ÇÊ¿äÇÑ ¿ÀÆÛ·¹À̼ÇÀ» ½ÇÇàÇÒ ¼ö ÀÖµµ·Ï ÇÕ´Ï´Ù. |
void |
preDeregister ()
MBean ¼¹ö·ÎºÎÅÍ µî·Ï ÇØÁ¦Çϱâ Àü¿¡ ŸÀÌ¸Ó MBean°¡ ÇÊ¿äÇÑ ¿ÀÆÛ·¹À̼ÇÀ» ½ÇÇàÇÒ ¼ö ÀÖµµ·Ï ÇÕ´Ï´Ù. |
ObjectName |
preRegister (MBeanServer server,
ObjectName name)
MBean ¼¹ö¿¡ µî·ÏÇϱâ Àü¿¡ ŸÀÌ¸Ó MBean°¡ ÇÊ¿äÇÑ ¿ÀÆÛ·¹À̼ÇÀ» ½ÇÇàÇÒ ¼ö ÀÖµµ·Ï ÇÕ´Ï´Ù. |
void |
removeAllNotifications ()
ÅëÁö ¸®½ºÆ®·ÎºÎÅÍ ¸ðµç ŸÀÌ¸Ó ÅëÁö¸¦ »èÁ¦ÇØ, ŸÀÌ¸Ó ÅëÁö ½Äº°ÀÚ¸¦ °»½ÅÇϱâ À§ÇÑ Ä«¿îÅ͸¦ ¸®¼Â ÇÕ´Ï´Ù. |
void |
removeNotification (Integer id)
ÁöÁ¤µÈ ½Äº°ÀÚ¿¡ ´ëÀÀÇϴ ŸÀÌ¸Ó ÅëÁö¸¦ ÅëÁö ¸®½ºÆ®·ÎºÎÅÍ »èÁ¦ÇÕ´Ï´Ù. |
void |
removeNotifications (String type)
ÁöÁ¤µÈ ÇüÅ¿¡ ´ëÀÀÇÏ´Â ¸ðµç ŸÀÌ¸Ó ÅëÁö¸¦ ÅëÁö ¸®½ºÆ®·ÎºÎÅÍ »èÁ¦ÇÕ´Ï´Ù. |
void |
setSendPastNotifications (boolean value)
ŸÀ̸Ӱ¡ °ú°ÅÀÇ ÅëÁö¸¦ ¼Û½ÅÇÒÁö ¾î¶³Áö¸¦ ÁöÁ¤ÇÏ´Â Ç÷¡±×¸¦ ¼³Á¤ÇÕ´Ï´Ù. |
void |
start ()
ŸÀ̸Ӹ¦ ½ÃÀÛÇÕ´Ï´Ù. |
void |
stop ()
ŸÀ̸Ӹ¦ Á¤ÁöÇÕ´Ï´Ù. |
Ŭ·¡½º javax.management. NotificationBroadcasterSupport ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼µå |
---|
addNotificationListener,
handleNotification,
removeNotificationListener,
removeNotificationListener,
sendNotification |
Ŭ·¡½º java.lang. Object ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼µå |
---|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
ÇʵåÀÇ »ó¼¼ |
---|
public static final long ONE_SECOND
addNotification
¸Þ¼µå·Î »ç¿ëµÇ´Â Á¤¼ö
public static final long ONE_MINUTE
addNotification
¸Þ¼µå·Î »ç¿ëµÇ´Â Á¤¼ö
public static final long ONE_HOUR
addNotification
¸Þ¼µå·Î »ç¿ëµÇ´Â Á¤¼ö
public static final long ONE_DAY
addNotification
¸Þ¼µå·Î »ç¿ëµÇ´Â Á¤¼ö
public static final long ONE_WEEK
addNotification
¸Þ¼µå·Î »ç¿ëµÇ´Â Á¤¼ö
»ý¼ºÀÚ »ó¼¼ |
---|
public Timer()
¸Þ¼µåÀÇ »ó¼¼ |
---|
public ObjectName preRegister(MBeanServer server, ObjectName name) throws Exception
ÀÌ ÄÁÅØ½ºÆ®¿¡ ¼´Â »ç¿ëÇÏÁö ¾Ê½À´Ï´Ù.
MBeanRegistration
³»ÀÇ preRegister
server
- MBean ¼¹ö. ŸÀÌ¸Ó MBean´Â ¿©±â¿¡ µî·ÏµÇ´Âname
- ŸÀÌ¸Ó MBean
°´Ã¼¸í
Exception
- public void postRegister(Boolean registrationDone)
ÀÌ ÄÁÅØ½ºÆ®¿¡ ¼´Â »ç¿ëÇÏÁö ¾Ê½À´Ï´Ù.
MBeanRegistration
³»ÀÇ postRegister
registrationDone
- MBean°¡ MBean ¼¹ö¿¡ Á¤»óÀûÀ¸·Î µî·ÏµÇ¾ú´ÂÁö ¾î¶°Çß´ÂÁö¸¦ ³ªÅ¸³½´Ù. µî·Ï¿¡ ½ÇÆÐÇßÀ» °æ¿ìÀÇ °ªÀº falsepublic void preDeregister() throws Exception
ŸÀ̸Ӹ¦ Á¤ÁöÇÕ´Ï´Ù.
MBeanRegistration
³»ÀÇ preDeregister
Exception
- public void postDeregister()
ÀÌ ÄÁÅØ½ºÆ®¿¡ ¼´Â »ç¿ëÇÏÁö ¾Ê½À´Ï´Ù.
MBeanRegistration
³»ÀÇ postDeregister
public MBeanNotificationInfo [] getNotificationInfo()
NotificationBroadcaster
±â¼ú: ÀÌ MBean°¡ ÅëÁö¸¦ ¼Û½ÅÇÒ ¶§¸¶´Ù, ±× ÅëÁöÀÇ Java Ŭ·¡½º¸í°ú ÅëÁöÇüÀ» ³ªÅ¸³»´Â ¹è¿À» ¸®ÅÏÇÕ´Ï´Ù.
MBean °¡ ÀÌ ¹è¿¿¡ ±â¼úµÇ¾î ÀÖÁö ¾ÊÀº ÅëÁö¸¦ ¼Û½ÅÇÒ ¼ö ¾ø½À´Ï´Ù. ´Ù¸¸, ÀϺÎÀÇ MBean ¼¹ö Ŭ¶óÀÌ¾ðÆ®´Â ÇöÀçÀÇ ±â´É¿¡ ÀÇÇØ ¿Ï¼ºÇÏ´Â ¹è¿¿¡ Á¸Çϰí ÀÖ´Â °æ¿ì°¡ ÀÖ½À´Ï´Ù.
NotificationBroadcaster
³»ÀÇ getNotificationInfo
NotificationBroadcasterSupport
³»ÀÇ getNotificationInfo
public void start()
ÅëÁö ¸®½ºÆ®³»¿¡
±× ½Ã°£º¸´Ù Àü¿¡ ¹ßÇàµÈ ŸÀÌ¸Ó ÅëÁö°¡ 1°³
ÀÌ»ó ÀÖ´Â °æ¿ì, ÀÌ ÅëÁö´Â sendPastNotifications
Ç÷¡±×¿¡ µû¶ó ¼Û½ÅµÇ¾î °£°Ý°ú ³ª¸ÓÁöÀÇ ¹ßÇà¼ö¿¡ µû¶ó °»½ÅµË´Ï´Ù. ŸÀÌ¸Ó ÅëÁöÀÇ ³¯Â¥¿Í ½Ã°£°¡ ÇöÀçÀÇ ³¯Â¥¿Í ½Ã°£º¸´Ù ÀüÀÇ °æ¿ì, ÀÌ ÅëÁö´Â ÅëÁö ¸®½ºÆ®·ÎºÎÅÍ »èÁ¦µË´Ï´Ù.
TimerMBean
³»ÀÇ start
public void stop()
TimerMBean
³»ÀÇ stop
public Integer addNotification(String type, String message, Object userData, Date date, long period, long nbOccurences, boolean fixedRate) throws IllegalArgumentException
type
, message
¹× userData
·Î »õ·Î¿î ŸÀÌ¸Ó ÅëÁö¸¦ ÀÛ¼ºÇØ, À̰ÍÀ» ÁöÁ¤ÀÇ ³¯Â¥¿Í ½Ã°£, °£°Ý ¹× ¹ßÇà¼ö¿Í ÇÔ²² ÅëÁö ¸®½ºÆ®¿¡ »ðÀÔÇÕ´Ï´Ù.
»ðÀԵǴ ŸÀÌ¸Ó ÅëÁöÀÇ ³¯Â¥¿Í ½Ã°£°¡ ÇöÀçÀÇ ³¯Â¥¿Í ½Ã°£º¸´Ù ÀüÀÇ °æ¿ì, ÀÌ ¸Þ¼µå´Â ÁöÁ¤µÈ ³¯Â¥¿Í ½Ã°£°¡ ÇöÀçÀÇ ³¯Â¥¿Í ½Ã°£ÀÌ´Ù°í ÇÏ¿© µ¿ÀÛÇÕ´Ï´Ù.
1ȸ
¸¸ÀÇ ÅëÁö´Â Áï½Ã Àü´ÞµË´Ï´Ù.
Á¤±âÀûÀÎ ÅëÁöÀÇ °æ¿ì, ÃÖÃÊÀÇ ÅëÁö´Â Áï½Ã Àü´ÞµÈ ÀÌÈÄÀÇ ÅëÁö´Â °£°Ý ÆÄ¶ó¹ÌÅÍ·Î ÁöÁ¤µÈ °£°ÝÀ¸·Î Àü´ÞµË´Ï´Ù.
ŸÀÌ¸Ó ÅëÁö°¡ ÅëÁö ¸®½ºÆ®¿¡ Ãß°¡µÈµÚ °ü·ÃµÈ ³¯Â¥¿Í ½Ã°£, °£°Ý ¹× ¹ßÇà¼ö¸¦ °»½ÅÇÒ ¼ö ¾ø½À´Ï´Ù.
Á¤±â ÅëÁöÀÇ °æ¿ì, Timer
·Î ÁöÁ¤µÇ°í ÀÖµµ·Ï, fixedRate ÆÄ¶ó¹ÌÅÍÀÇ °ªÀÌ ½ÇÇà schemaÀÇ ÁöÁ¤¿¡ »ç¿ëµË´Ï´Ù.
TimerMBean
³»ÀÇ addNotification
type
- ŸÀÌ¸Ó ÅëÁöÇümessage
- ŸÀÌ¸Ó ÅëÁöÀÇ »ó¼¼ ¸Þ¼¼ÁöuserData
- ŸÀÌ¸Ó ÅëÁöÀÇ »ç¿ëÀÚ
µ¥ÀÌÅÍ °´Ã¼date
- ÅëÁö°¡ ¹ßÇàµÇ´Â ³¯Â¥¿Í ½Ã°£period
- ŸÀÌ¸Ó ÅëÁöÀÇ °£°Ý (¹Ð¸® ¼¼ÄÁµå)nbOccurences
- ¹ßÇàµÇ´Â ŸÀÌ¸Ó ÅëÁöÀÇ ÇÕ°è¼öfixedRate
- true
À̸ç, Á¤±â ÅëÁöÀÎ °æ¿ì, fixed-rate ½ÇÇà schema·Î ½ºÄÉÁÙ µÈ´Ù. false
À̸ç, Á¤±â ÅëÁöÀÎ °æ¿ì, fixed-delay ½ÇÇà schema·Î ½ºÄÉÁÙ µÈ´Ù. Á¤±â ÅëÁö°¡ ¾Æ´Ñ °æ¿ì´Â ¹«½ÃµÈ´Ù
IllegalArgumentException
- °£°Ý ¶Ç´Â ¹ßÇà¼ö°¡ À߸øµÈ °ª
ÀÇ °æ¿ìaddNotification(String, String, Object, Date, long, long)
public Integer addNotification(String type, String message, Object userData, Date date, long period, long nbOccurences) throws IllegalArgumentException
type
, message
¹× userData
·Î »õ·Î¿î ŸÀÌ¸Ó ÅëÁö¸¦ ÀÛ¼ºÇØ, À̰ÍÀ» ÁöÁ¤ÀÇ ³¯Â¥¿Í ½Ã°£, °£°Ý ¹× ¹ßÇà¼ö¿Í ÇÔ²² ÅëÁö ¸®½ºÆ®¿¡ »ðÀÔÇÕ´Ï´Ù.
»ðÀԵǴ ŸÀÌ¸Ó ÅëÁöÀÇ ³¯Â¥¿Í ½Ã°£°¡ ÇöÀçÀÇ ³¯Â¥¿Í ½Ã°£º¸´Ù ÀüÀÇ °æ¿ì, ÀÌ ¸Þ¼µå´Â ÁöÁ¤µÈ ³¯Â¥¿Í ½Ã°£°¡ ÇöÀçÀÇ ³¯Â¥¿Í ½Ã°£ÀÌ´Ù°í ÇÏ¿© µ¿ÀÛÇÕ´Ï´Ù.
1ȸ
¸¸ÀÇ ÅëÁö´Â Áï½Ã Àü´ÞµË´Ï´Ù.
Á¤±âÀûÀÎ ÅëÁöÀÇ °æ¿ì, ÃÖÃÊÀÇ ÅëÁö´Â Áï½Ã Àü´ÞµÈ ÀÌÈÄÀÇ ÅëÁö´Â °£°Ý ÆÄ¶ó¹ÌÅÍ·Î ÁöÁ¤µÈ °£°ÝÀ¸·Î Àü´ÞµË´Ï´Ù.
ŸÀÌ¸Ó ÅëÁö°¡ ÅëÁö ¸®½ºÆ®¿¡ Ãß°¡µÈµÚ °ü·ÃµÈ ³¯Â¥¿Í ½Ã°£, °£°Ý ¹× ¹ßÇà¼ö¸¦ °»½ÅÇÒ ¼ö ¾ø½À´Ï´Ù.
Á¤±â ÅëÁöÀÇ °æ¿ì, Timer
·Î ÁöÁ¤µÇ°í ÀÖµµ·Ï fixed-delay ½ÇÇà schema¸¦ »ç¿ëÇÕ´Ï´Ù. fixed-rate ½ÇÇà schema¸¦ »ç¿ëÇÏ·Á¸é,
´ë½Å¿¡ addNotification(String, String, Object, Date, long, long, boolean)
¸¦
»ç¿ëÇÕ´Ï´Ù.
TimerMBean
³»ÀÇ addNotification
type
- ŸÀÌ¸Ó ÅëÁöÇümessage
- ŸÀÌ¸Ó ÅëÁöÀÇ »ó¼¼ ¸Þ¼¼ÁöuserData
- ŸÀÌ¸Ó ÅëÁöÀÇ »ç¿ëÀÚ
µ¥ÀÌÅÍ °´Ã¼date
- ÅëÁö°¡ ¹ßÇàµÇ´Â ³¯Â¥¿Í ½Ã°£period
- ŸÀÌ¸Ó ÅëÁöÀÇ °£°Ý (¹Ð¸® ¼¼ÄÁµå)nbOccurences
- ¹ßÇàµÇ´Â ŸÀÌ¸Ó ÅëÁöÀÇ ÇÕ°è¼ö
IllegalArgumentException
- °£°Ý ¶Ç´Â ¹ßÇà¼ö°¡ À߸øµÈ °ª
ÀÇ °æ¿ìaddNotification(String, String, Object, Date, long, long, boolean)
public Integer addNotification(String type, String message, Object userData, Date date, long period) throws IllegalArgumentException
type
, message
¹× userData
·Î »õ·Î¿î ŸÀÌ¸Ó ÅëÁö¸¦ ÀÛ¼ºÇØ, À̰ÍÀ» ÁöÁ¤ÀÇ ³¯Â¥¿Í ½Ã°£, °£°Ý ¹× ¹ßÇà¼ö null¿Í
ÇÔ²² ÅëÁö ¸®½ºÆ®¿¡ »ðÀÔÇÕ´Ï´Ù.
ŸÀÌ¸Ó ÅëÁö´Â Timer
·Î ÁöÁ¤µÇ°í ÀÖµµ·Ï, fixed-delay ½ÇÇà schema¸¦ »ç¿ëÇϴ ŸÀÌ¸Ó °£°ÝÀ¸·Î ¿¬¼ÓÀûÀ¸·Î ¹Ýº¹ÇØÁý´Ï´Ù. fixed-rate ½ÇÇà schema¸¦ »ç¿ëÇÏ·Á¸é,
´ë½Å¿¡ addNotification(String, String, Object, Date, long, long, boolean)
¸¦
»ç¿ëÇÕ´Ï´Ù.
»ðÀԵǴ ŸÀÌ¸Ó ÅëÁöÀÇ ³¯Â¥¿Í ½Ã°£°¡ ÇöÀçÀÇ ³¯Â¥¿Í ½Ã°£º¸´Ù ÀüÀÇ °æ¿ì, ÀÌ ¸Þ¼µå´Â ÁöÁ¤µÈ ³¯Â¥¿Í ½Ã°£°¡ ÇöÀçÀÇ ³¯Â¥¿Í ½Ã°£ÀÌ´Ù°í ÇÏ¿© µ¿ÀÛÇÕ´Ï´Ù. ÃÖÃÊÀÇ ÅëÁö´Â Áï½Ã Àü´ÞµÈ ÀÌÈÄÀÇ ÅëÁö´Â °£°Ý ÆÄ¶ó¹ÌÅÍ·Î ÁöÁ¤µÈ °£°ÝÀ¸·Î Àü´ÞµË´Ï´Ù.
TimerMBean
³»ÀÇ addNotification
type
- ŸÀÌ¸Ó ÅëÁöÇümessage
- ŸÀÌ¸Ó ÅëÁöÀÇ »ó¼¼ ¸Þ¼¼ÁöuserData
- ŸÀÌ¸Ó ÅëÁöÀÇ »ç¿ëÀÚ
µ¥ÀÌÅÍ °´Ã¼date
- ÅëÁö°¡ ¹ßÇàµÇ´Â ³¯Â¥¿Í ½Ã°£period
- ŸÀÌ¸Ó ÅëÁöÀÇ °£°Ý (¹Ð¸® ¼¼ÄÁµå)
IllegalArgumentException
- ³¯Â¥¿Í ½Ã°£°¡ À߸øµÈ °ª
Àΰ¡ ÅëÁöÀÇ ³¯Â¥¿Í ½Ã°£°¡ ÇöÀçÀÇ ³¯Â¥¿Í ½Ã°£º¸´Ù Àüpublic Integer addNotification(String type, String message, Object userData, Date date) throws IllegalArgumentException
type
, message
¹× userData
·Î »õ·Î¿î ŸÀÌ¸Ó ÅëÁö¸¦ ÀÛ¼ºÇØ, À̰ÍÀ» ÁöÁ¤ÀÇ ³¯Â¥¿Í ½Ã°£, °£°Ý null ¹× ¹ßÇà¼ö¿Í ÇÔ²² ÅëÁö ¸®½ºÆ®¿¡ »ðÀÔÇÕ´Ï´Ù.
ŸÀÌ¸Ó ÅëÁö´Â ÁöÁ¤µÈ ³¯Â¥¿Í ½Ã°£¿¡ Á¤¸®ÇØ Ã³¸®µË´Ï´Ù.
»ðÀԵǴ ŸÀÌ¸Ó ÅëÁöÀÇ ³¯Â¥¿Í ½Ã°£°¡ ÇöÀçÀÇ ³¯Â¥¿Í ½Ã°£º¸´Ù ÀüÀÇ °æ¿ì, ÀÌ ¸Þ¼µå´Â ÁöÁ¤µÈ ³¯Â¥¿Í ½Ã°£°¡ ÇöÀçÀÇ ³¯Â¥¿Í ½Ã°£ÀÌ´Ù°í ÇÏ¿© µ¿ÀÛÇÕ´Ï´Ù. ÅëÁö´Â Áï½Ã Àü´ÞµË´Ï´Ù.
TimerMBean
³»ÀÇ addNotification
type
- ŸÀÌ¸Ó ÅëÁöÇümessage
- ŸÀÌ¸Ó ÅëÁöÀÇ »ó¼¼ ¸Þ¼¼ÁöuserData
- ŸÀÌ¸Ó ÅëÁöÀÇ »ç¿ëÀÚ
µ¥ÀÌÅÍ °´Ã¼date
- ÅëÁö°¡ ¹ßÇàµÇ´Â ³¯Â¥¿Í ½Ã°£
IllegalArgumentException
- ÅëÁöÀÇ ³¯Â¥¿Í ½Ã°£°¡ ÇöÀçÀÇ ³¯Â¥¿Í ½Ã°£º¸´Ù Àüpublic void removeNotification(Integer id) throws InstanceNotFoundException
TimerMBean
³»ÀÇ removeNotification
id
- ŸÀÌ¸Ó ÅëÁö ½Äº°ÀÚ
InstanceNotFoundException
- ÀÌ Å¸ÀÌ¸Ó MBean
ÅëÁö ¸®½ºÆ®³»¿¡
ÁöÁ¤µÈ ½Äº°ÀÚ¿¡ ´ëÀÀÇϴ ŸÀÌ¸Ó ÅëÁö°¡ Á¸ÀçÇÏÁö ¾Ê´Â´Ùpublic void removeNotifications(String type) throws InstanceNotFoundException
TimerMBean
³»ÀÇ removeNotifications
type
- ŸÀÌ¸Ó ÅëÁöÇü
InstanceNotFoundException
- ÀÌ Å¸ÀÌ¸Ó MBean
ÅëÁö ¸®½ºÆ®³»¿¡
ÁöÁ¤µÈ ÇüÅ¿¡ ´ëÀÀÇϴ ŸÀÌ¸Ó ÅëÁö°¡ Á¸ÀçÇÏÁö ¾Ê´Â´Ùpublic void removeAllNotifications()
TimerMBean
³»ÀÇ removeAllNotifications
public int getNbNotifications()
TimerMBean
³»ÀÇ getNbNotifications
public Vector getAllNotificationIDs()
TimerMBean
³»ÀÇ getAllNotificationIDs
Integer
°´Ã¼ º¤ÅÍ. public Vector getNotificationIDs(String type)
TimerMBean
³»ÀÇ getNotificationIDs
type
- ŸÀÌ¸Ó ÅëÁöÇü
type
¸ðµç ŸÀÌ¸Ó ÅëÁö ½Äº°ÀÚ¸¦ Æ÷ÇÔÇÑ Integer
°´Ã¼ º¤ÅÍ. type
ŸÀÌ¸Ó ÅëÁö°¡ µî·ÏµÇÁö ¾ÊÀº °æ¿ì´Â ºñ¾îÀÖÀ½public String getNotificationType(Integer id)
TimerMBean
³»ÀÇ getNotificationType
id
- ŸÀÌ¸Ó ÅëÁö ½Äº°ÀÚ
public String getNotificationMessage(Integer id)
TimerMBean
³»ÀÇ getNotificationMessage
id
- ŸÀÌ¸Ó ÅëÁö ½Äº°ÀÚ
public Object getNotificationUserData(Integer id)
TimerMBean
³»ÀÇ getNotificationUserData
id
- ŸÀÌ¸Ó ÅëÁö ½Äº°ÀÚ
public Date getDate(Integer id)
TimerMBean
³»ÀÇ getDate
id
- ŸÀÌ¸Ó ÅëÁö ½Äº°ÀÚ
public Long getPeriod(Integer id)
TimerMBean
³»ÀÇ getPeriod
id
- ŸÀÌ¸Ó ÅëÁö ½Äº°ÀÚ
public Long getNbOccurences(Integer id)
TimerMBean
³»ÀÇ getNbOccurences
id
- ŸÀÌ¸Ó ÅëÁö ½Äº°ÀÚ
public Boolean getFixedRate(Integer id)
TimerMBean
³»ÀÇ getFixedRate
id
- ŸÀÌ¸Ó ÅëÁö ½Äº°ÀÚ
public boolean getSendPastNotifications()
false
ÀÔ´Ï´Ù.
TimerMBean
³»ÀÇ getSendPastNotifications
setSendPastNotifications(boolean)
public void setSendPastNotifications(boolean value)
false
ÀÔ´Ï´Ù.
TimerMBean
³»ÀÇ setSendPastNotifications
value
- °ú°ÅÀÇ ÅëÁö¸¦ ¼Û½ÅÇÒÁö ¾î¶³Áö¸¦ ÁöÁ¤ÇÏ´Â Ç÷¡±×Ä¡getSendPastNotifications()
public boolean isActive()
start
¸Þ¼µå°¡ ºÒ·Á°¡
¸é Ȱ¼ºÈ
µÇ¾î, stop
¸Þ¼µå°¡ ºÒ·Á°¡
¸é ºñȰ¼ºÈ
µË´Ï´Ù. false
ÀÔ´Ï´Ù.
TimerMBean
³»ÀÇ isActive
true
, ±×·¸Áö ¾ÊÀº °æ¿ì´Â false
public boolean isEmpty()
TimerMBean
³»ÀÇ isEmpty
true
, ±×·¸Áö ¾ÊÀº °æ¿ì´Â false
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
ÀüÀÇ Å¬·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
°³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå |
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy µµ ÂüÁ¶ÇϽʽÿÀ.