KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > jmx > adaptor > snmp > agent > SnmpAgentServiceMBean


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.jmx.adaptor.snmp.agent;
23
24 import java.net.UnknownHostException JavaDoc;
25
26 import javax.management.ObjectName JavaDoc;
27
28 import org.jboss.mx.util.ObjectNameFactory;
29 import org.jboss.system.ListenerServiceMBean;
30
31 /**
32  * SnmpAgentService MBean interface.
33  *
34  * @author <a HREF="mailto:dimitris@jboss.org">Dimitris Andreadis</a>
35  * @version $Revision: 44604 $
36  */

37 public interface SnmpAgentServiceMBean extends ListenerServiceMBean
38 {
39    /** Default ObjectName */
40    ObjectName JavaDoc OBJECT_NAME = ObjectNameFactory.create("jboss.jmx:name=SnmpAgent,service=snmp,type=adaptor");
41    
42    // Attributes ----------------------------------------------------
43

44    /** The name of the file containing SNMP manager specifications */
45    void setManagersResName(String JavaDoc managersResName);
46    String JavaDoc getManagersResName();
47
48    /** The name of the file containing the notification/trap mappings */
49    void setNotificationMapResName(String JavaDoc notificationMapResName);
50    String JavaDoc getNotificationMapResName();
51
52    /** The resource file name containing get/set mappings */
53    void setRequestHandlerResName(String JavaDoc requestHandlerResName);
54    String JavaDoc getRequestHandlerResName();
55    
56    /** The utilised trap factory name */
57    void setTrapFactoryClassName(String JavaDoc name);
58    String JavaDoc getTrapFactoryClassName();
59
60    /** The RequestHandler implementation class */
61    void setRequestHandlerClassName(String JavaDoc requestHandlerClassName);
62    String JavaDoc getRequestHandlerClassName();
63    
64    /** The utilised timer MBean name */
65    void setTimerName(ObjectName JavaDoc timerName);
66    ObjectName JavaDoc getTimerName();
67
68    /** Enables/disables dynamic subscriptions */
69    void setDynamicSubscriptions(boolean dynamicSubscriptions);
70    boolean getDynamicSubscriptions();
71    
72    /** The agent bind address */
73    void setBindAddress(String JavaDoc bindAddress) throws UnknownHostException JavaDoc;
74    String JavaDoc getBindAddress();
75    
76    /** The heartbeat period (in seconds) - 0 disables heartbeat */
77    void setHeartBeatPeriod(int heartBeatPeriod);
78    int getHeartBeatPeriod();
79
80    /** The agent listening port number */
81    void setPort(int port);
82    int getPort();
83    
84    /** The number of threads in the agent request processing thread pool */
85    void setNumberOfThreads(int numberOfThreads);
86    int getNumberOfThreads();
87
88    /** The snmp protocol version */
89    void setSnmpVersion(int snmpVersion);
90    int getSnmpVersion();
91
92    /** The read community (no getter) */
93    void setReadCommunity(String JavaDoc readCommunity);
94
95    /** The write community (no getter) */
96    void setWriteCommunity(String JavaDoc writeCommunity);
97    
98    /** The time difference (in msecs) between instantiation time and epoch (midnight, January 1, 1970 UTC) */
99    long getInstantiationTime();
100
101    /** The up-time, in msecs. */
102    long getUptime();
103
104    /** The current trap counter reading */
105    long getTrapCount();
106
107    // Operations ----------------------------------------------------
108

109    /**
110     * Reconfigures the RequestHandler, that is
111     * reponsible for handling get requests etc.
112     */

113    void reconfigureRequestHandler() throws Exception JavaDoc;
114    
115 }
116
Popular Tags