KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > monitor > services > TimerServiceMBean


1 /*
2  * JBoss, Home of Professional Open Source
3  * Copyright 2005, JBoss Inc., and individual contributors as indicated
4  * by the @authors tag. See the copyright.txt in the distribution for a
5  * full listing of individual contributors.
6  *
7  * This is free software; you can redistribute it and/or modify it
8  * under the terms of the GNU Lesser General Public License as
9  * published by the Free Software Foundation; either version 2.1 of
10  * the License, or (at your option) any later version.
11  *
12  * This software is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this software; if not, write to the Free
19  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21  */

22 package org.jboss.monitor.services;
23
24 import javax.management.ObjectName JavaDoc;
25
26 import org.jboss.system.ServiceMBean;
27
28 /**
29  * MBean interface for a simple service used to configure the
30  * periodic emition of notifications by a standard JMX Timer.
31  *
32  * @see javax.management.timer.Timer
33  *
34  * @author <a HREF="mailto:dimitris@jboss.org">Dimitris Andreadis</a>
35  * @version $Revision: 46247 $
36  */

37 public interface TimerServiceMBean extends ServiceMBean
38 {
39    // Attributes ----------------------------------------------------
40

41    /**
42     * The type of the emitted notifications
43     */

44    void setNotificationType(String JavaDoc type);
45    String JavaDoc getNotificationType();
46    
47    /**
48     * The message carried by the emitted notifications
49     */

50    void setNotificationMessage(String JavaDoc message);
51    String JavaDoc getNotificationMessage();
52    
53    /**
54     * Timer period in milliseconds; accepts suffix modifiers
55     * e.g. "1000", "500msec", "10sec", "5min", "1h"
56     */

57    void setTimerPeriod(String JavaDoc timerPeriod);
58    String JavaDoc getTimerPeriod();
59    
60    /**
61     * Number of occurences
62     */

63    void setRepeatitions(long repeatitions);
64    long getRepeatitions();
65    
66    /**
67     * The execution mode, true==fixed-rate, false==fixed-delay (default)
68     */

69    void setFixedRate(boolean fixedRate);
70    boolean getFixedRate();
71    
72    /**
73     * The utilized TimerMBean
74     */

75    void setTimerMBean(ObjectName JavaDoc timerMBean);
76    ObjectName JavaDoc getTimerMBean();
77
78 }
79
Popular Tags