KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > jmx > snmp > daemon > SnmpAdaptorServerMBean


1 /*
2  * @(#)file SnmpAdaptorServerMBean.java
3  * @(#)author Sun Microsystems, Inc.
4  * @(#)version 1.45
5  * @(#)date 08/02/09
6  *
7  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
8  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
9  *
10  */

11
12
13 package com.sun.jmx.snmp.daemon;
14
15 // java import
16
import java.util.Vector JavaDoc;
17 import java.io.IOException JavaDoc;
18 import java.net.InetAddress JavaDoc;
19
20 // jmx imports
21
//
22
import com.sun.jmx.snmp.SnmpPduFactory;
23 import com.sun.jmx.snmp.SnmpStatusException;
24 import com.sun.jmx.snmp.SnmpVarBindList;
25 import com.sun.jmx.snmp.SnmpOid;
26 import com.sun.jmx.snmp.SnmpTimeticks;
27 import com.sun.jmx.snmp.SnmpIpAddress;
28 import com.sun.jmx.snmp.SnmpPduPacket;
29 import com.sun.jmx.snmp.InetAddressAcl;
30 import com.sun.jmx.snmp.SnmpPeer;
31
32 // SNMP Runtime imports
33
//
34
import com.sun.jmx.snmp.agent.SnmpMibAgent;
35 import com.sun.jmx.snmp.agent.SnmpMibHandler;
36 import com.sun.jmx.snmp.agent.SnmpUserDataFactory;
37
38 /**
39  * Exposes the remote management interface of the {@link SnmpAdaptorServer} MBean.
40  * <p><b>This API is a Sun Microsystems internal API and is subject
41  * to change without notice.</b></p>
42  */

43
44 public interface SnmpAdaptorServerMBean extends CommunicatorServerMBean {
45
46     // GETTERS AND SETTERS
47
//--------------------
48

49     /**
50      * Returns the Ip address based ACL used by this SNMP protocol adaptor.
51      * @return The <CODE>InetAddressAcl</CODE> implementation.
52      *
53      * @since 1.5
54      */

55     public InetAddressAcl getInetAddressAcl();
56     /**
57      * Returns the port used by this SNMP protocol adaptor for sending traps.
58      * By default, port 162 is used.
59      *
60      * @return The port number for sending SNMP traps.
61      */

62     public Integer JavaDoc getTrapPort();
63   
64     /**
65      * Sets the port used by this SNMP protocol adaptor for sending traps.
66      *
67      * @param port The port number for sending SNMP traps.
68      */

69     public void setTrapPort(Integer JavaDoc port);
70   
71     /**
72      * Returns the port used by this SNMP protocol adaptor for sending inform requests.
73      * By default, port 162 is used.
74      *
75      * @return The port number for sending SNMP inform requests.
76      */

77     public int getInformPort();
78   
79     /**
80      * Sets the port used by this SNMP protocol adaptor for sending inform requests.
81      *
82      * @param port The port number for sending SNMP inform requests.
83      */

84     public void setInformPort(int port);
85     
86     /**
87      * Gets the number of managers that have been processed by this SNMP protocol adaptor
88      * since its creation.
89      *
90      * @return The number of managers handled by this SNMP protocol adaptor
91      * since its creation. This counter is not reset by the <CODE>stop</CODE> method.
92      */

93     public int getServedClientCount();
94     
95     /**
96      * Gets the number of managers currently being processed by this
97      * SNMP protocol adaptor.
98      *
99      * @return The number of managers currently being processed by this
100      * SNMP protocol adaptor.
101      */

102     public int getActiveClientCount();
103     
104     /**
105      * Gets the maximum number of managers that this SNMP protocol adaptor can
106      * process concurrently.
107      *
108      * @return The maximum number of managers that this SNMP protocol adaptor can
109      * process concurrently.
110      */

111     public int getMaxActiveClientCount();
112
113     /**
114      * Sets the maximum number of managers this SNMP protocol adaptor can
115      * process concurrently.
116      *
117      * @param c The number of managers.
118      *
119      * @exception java.lang.IllegalStateException This method has been invoked
120      * while the communicator was <CODE>ONLINE</CODE> or <CODE>STARTING</CODE>.
121      */

122     public void setMaxActiveClientCount(int c) throws java.lang.IllegalStateException JavaDoc;
123     
124     /**
125      * Returns the protocol of this SNMP protocol adaptor.
126      *
127      * @return The string "snmp".
128      */

129     public String JavaDoc getProtocol();
130     
131     /**
132      * Returns the buffer size of this SNMP protocol adaptor.
133      * By default, buffer size 1024 is used.
134      *
135      * @return The buffer size.
136      */

137     public Integer JavaDoc getBufferSize();
138
139     /**
140      * Sets the buffer size of this SNMP protocol adaptor.
141      *
142      * @param s The buffer size.
143      *
144      * @exception java.lang.IllegalStateException This method has been invoked
145      * while the communicator was <CODE>ONLINE</CODE> or <CODE>STARTING</CODE>.
146      */

147     public void setBufferSize(Integer JavaDoc s) throws java.lang.IllegalStateException JavaDoc;
148   
149     /**
150      * Gets the number of times to try sending an inform request before giving up.
151      * @return The maximun number of tries.
152      */

153     public int getMaxTries();
154     
155     /**
156      * Changes the maximun number of times to try sending an inform request before giving up.
157      * @param newMaxTries The maximun number of tries.
158      */

159     public void setMaxTries(int newMaxTries);
160     
161     /**
162      * Gets the timeout to wait for an inform response from the manager.
163      * @return The value of the timeout property.
164      */

165     public int getTimeout();
166     
167     /**
168      * Changes the timeout to wait for an inform response from the manager.
169      * @param newTimeout The timeout (in milliseconds).
170      */

171     public void setTimeout(int newTimeout);
172     
173     /**
174      * Returns the message factory of this SNMP protocol adaptor.
175      *
176      * @return The factory object.
177      */

178     public SnmpPduFactory getPduFactory();
179     
180     /**
181      * Sets the message factory of this SNMP protocol adaptor.
182      *
183      * @param factory The factory object (null means the default factory).
184      */

185     public void setPduFactory(SnmpPduFactory factory);
186
187
188     /**
189      * Set the user-data factory of this SNMP protocol adaptor.
190      *
191      * @param factory The factory object (null means no factory).
192      * @see com.sun.jmx.snmp.agent.SnmpUserDataFactory
193      */

194     public void setUserDataFactory(SnmpUserDataFactory factory);
195   
196     /**
197      * Get the user-data factory associated with this SNMP protocol adaptor.
198      *
199      * @return The factory object (null means no factory).
200      * @see com.sun.jmx.snmp.agent.SnmpUserDataFactory
201      */

202     public SnmpUserDataFactory getUserDataFactory();
203
204     /**
205      * Returns <CODE>true</CODE> if authentication traps are enabled.
206      * <P>
207      * When this feature is enabled, the SNMP protocol adaptor sends
208      * an <CODE>authenticationFailure</CODE> trap each time an authentication fails.
209      * <P>
210      * The default behaviour is to send authentication traps.
211      *
212      * @return <CODE>true</CODE> if authentication traps are enabled, <CODE>false</CODE> otherwise.
213      */

214     public boolean getAuthTrapEnabled();
215   
216     /**
217      * Sets the flag indicating if traps need to be sent in case of authentication failure.
218      *
219      * @param enabled Flag indicating if traps need to be sent.
220      */

221     public void setAuthTrapEnabled(boolean enabled);
222
223     /**
224      * Returns <code>true</code> if this SNMP protocol adaptor sends a response in case
225      * of authentication failure.
226      * <P>
227      * When this feature is enabled, the SNMP protocol adaptor sends a response with <CODE>noSuchName</CODE>
228      * or <CODE>readOnly</CODE> when the authentication failed. If the flag is disabled, the
229      * SNMP protocol adaptor trashes the PDU silently.
230      * <P>
231      * The default behavior is to send responses.
232      *
233      * @return <code>true</code> if responses are sent.
234      */

235     public boolean getAuthRespEnabled();
236
237     /**
238      * Sets the flag indicating if responses need to be sent in case of authentication failure.
239      *
240      * @param enabled Flag indicating if responses need to be sent.
241      */

242     public void setAuthRespEnabled(boolean enabled);
243     
244     /**
245      * Returns the enterprise OID. It is used by {@link #snmpV1Trap snmpV1Trap} to fill
246      * the 'enterprise' field of the trap request.
247      *
248      * @return The OID in string format "x.x.x.x".
249      */

250     public String JavaDoc getEnterpriseOid();
251
252     /**
253      * Sets the enterprise OID.
254      *
255      * @param oid The OID in string format "x.x.x.x".
256      *
257      * @exception IllegalArgumentException The string format is incorrect
258      */

259     public void setEnterpriseOid(String JavaDoc oid) throws IllegalArgumentException JavaDoc;
260     
261     /**
262      * Returns the names of the MIBs available in this SNMP protocol adaptor.
263      *
264      * @return An array of MIB names.
265      */

266     public String JavaDoc[] getMibs();
267     
268     // GETTERS FOR SNMP GROUP (MIBII)
269
//-------------------------------
270

271     /**
272      * Returns the <CODE>snmpOutTraps</CODE> value defined in MIB-II.
273      *
274      * @return The <CODE>snmpOutTraps</CODE> value.
275      */

276     public Long JavaDoc getSnmpOutTraps();
277   
278     /**
279      * Returns the <CODE>snmpOutGetResponses</CODE> value defined in MIB-II.
280      *
281      * @return The <CODE>snmpOutGetResponses</CODE> value.
282      */

283     public Long JavaDoc getSnmpOutGetResponses();
284   
285     /**
286      * Returns the <CODE>snmpOutGenErrs</CODE> value defined in MIB-II.
287      *
288      * @return The <CODE>snmpOutGenErrs</CODE> value.
289      */

290     public Long JavaDoc getSnmpOutGenErrs();
291   
292     /**
293      * Returns the <CODE>snmpOutBadValues</CODE> value defined in MIB-II.
294      *
295      * @return The <CODE>snmpOutBadValues</CODE> value.
296      */

297     public Long JavaDoc getSnmpOutBadValues();
298   
299     /**
300      * Returns the <CODE>snmpOutNoSuchNames</CODE> value defined in MIB-II.
301      *
302      * @return The <CODE>snmpOutNoSuchNames</CODE> value.
303      */

304     public Long JavaDoc getSnmpOutNoSuchNames();
305   
306     /**
307      * Returns the <CODE>snmpOutTooBigs</CODE> value defined in MIB-II.
308      *
309      * @return The <CODE>snmpOutTooBigs</CODE> value.
310      */

311     public Long JavaDoc getSnmpOutTooBigs();
312   
313     /**
314      * Returns the <CODE>snmpInASNParseErrs</CODE> value defined in MIB-II.
315      *
316      * @return The <CODE>snmpInASNParseErrs</CODE> value.
317      */

318     public Long JavaDoc getSnmpInASNParseErrs();
319   
320     /**
321      * Returns the <CODE>snmpInBadCommunityUses</CODE> value defined in MIB-II.
322      *
323      * @return The <CODE>snmpInBadCommunityUses</CODE> value.
324      */

325     public Long JavaDoc getSnmpInBadCommunityUses();
326   
327     /**
328      * Returns the <CODE>snmpInBadCommunityNames</CODE> value defined in MIB-II.
329      *
330      * @return The <CODE>snmpInBadCommunityNames</CODE> value.
331      */

332     public Long JavaDoc getSnmpInBadCommunityNames();
333   
334     /**
335      * Returns the <CODE>snmpInBadVersions</CODE> value defined in MIB-II.
336      *
337      * @return The <CODE>snmpInBadVersions</CODE> value.
338      */

339     public Long JavaDoc getSnmpInBadVersions();
340   
341     /**
342      * Returns the <CODE>snmpOutPkts</CODE> value defined in MIB-II.
343      *
344      * @return The <CODE>snmpOutPkts</CODE> value.
345      */

346     public Long JavaDoc getSnmpOutPkts();
347   
348     /**
349      * Returns the <CODE>snmpInPkts</CODE> value defined in MIB-II.
350      *
351      * @return The <CODE>snmpInPkts</CODE> value.
352      */

353     public Long JavaDoc getSnmpInPkts();
354   
355     /**
356      * Returns the <CODE>snmpInGetRequests</CODE> value defined in MIB-II.
357      *
358      * @return The <CODE>snmpInGetRequests</CODE> value.
359      */

360     public Long JavaDoc getSnmpInGetRequests();
361   
362     /**
363      * Returns the <CODE>snmpInGetNexts</CODE> value defined in MIB-II.
364      *
365      * @return The <CODE>snmpInGetNexts</CODE> value.
366      */

367     public Long JavaDoc getSnmpInGetNexts();
368   
369     /**
370      * Returns the <CODE>snmpInSetRequests</CODE> value defined in MIB-II.
371      *
372      * @return The <CODE>snmpInSetRequests</CODE> value.
373      */

374     public Long JavaDoc getSnmpInSetRequests();
375   
376     /**
377      * Returns the <CODE>snmpInTotalSetVars</CODE> value defined in MIB-II.
378      *
379      * @return The <CODE>snmpInTotalSetVars</CODE> value.
380      */

381     public Long JavaDoc getSnmpInTotalSetVars();
382   
383     /**
384      * Returns the <CODE>snmpInTotalReqVars</CODE> value defined in MIB-II.
385      *
386      * @return The <CODE>snmpInTotalReqVars</CODE> value.
387      */

388     public Long JavaDoc getSnmpInTotalReqVars();
389
390     /**
391      * Returns the <CODE>snmpSilentDrops</CODE> value defined in rfc 1907 NMPv2-MIB .
392      *
393      * @return The <CODE>snmpSilentDrops</CODE> value.
394      *
395      * @since 1.5
396      */

397     public Long JavaDoc getSnmpSilentDrops();
398     
399     /**
400      * Returns the <CODE>snmpProxyDrops</CODE> value defined in rfc 1907 NMPv2-MIB .
401      *
402      * @return The <CODE>snmpProxyDrops</CODE> value.
403      *
404      * @since 1.5
405      */

406     public Long JavaDoc getSnmpProxyDrops();
407     
408     // PUBLIC METHODS
409
//---------------
410

411     /**
412      * Adds a new MIB in the SNMP MIB handler.
413      * This method is called automatically by {@link com.sun.jmx.snmp.agent.SnmpMibAgent#setSnmpAdaptor(SnmpMibHandler)}
414      * and {@link com.sun.jmx.snmp.agent.SnmpMibAgent#setSnmpAdaptorName(ObjectName)}
415      * and should not be called directly.
416      *
417      * @param mib The MIB to add.
418      *
419      * @return A reference to the SNMP MIB handler.
420      *
421      * @exception IllegalArgumentException If the parameter is null.
422      */

423     public SnmpMibHandler addMib(SnmpMibAgent mib) throws IllegalArgumentException JavaDoc;
424   
425     /**
426      * Adds a new MIB in the SNMP MIB handler.
427      *
428      * @param mib The MIB to add.
429      * @param oids The set of OIDs this agent implements.
430      *
431      * @return A reference to the SNMP MIB handler.
432      *
433      * @exception IllegalArgumentException If the parameter is null.
434      *
435      * @since 1.5
436      */

437     public SnmpMibHandler addMib(SnmpMibAgent mib, SnmpOid[] oids) throws IllegalArgumentException JavaDoc;
438   
439     /**
440      * Removes the specified MIB from the SNMP protocol adaptor.
441      * This method is called automatically by {@link com.sun.jmx.snmp.agent.SnmpMibAgent#setSnmpAdaptor(SnmpMibHandler)}
442      * and {@link com.sun.jmx.snmp.agent.SnmpMibAgent#setSnmpAdaptorName(ObjectName)}
443      * and should not be called directly.
444      *
445      * @param mib The MIB to be removed.
446      *
447      * @return <code>true</code> if the specified <CODE>mib</CODE> was a MIB included in the SNMP MIB handler,
448      * <code>false</code> otherwise.
449      */

450     public boolean removeMib(SnmpMibAgent mib);
451     
452     /**
453      * Sends a trap using SNMP V1 trap format.
454      * <BR>The trap is sent to each destination defined in the ACL file (if available).
455      * If no ACL file or no destinations are available, the trap is sent to the local host.
456      *
457      * @param generic The generic number of the trap.
458      * @param specific The specific number of the trap.
459      * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null.
460      *
461      * @exception IOException An I/O error occured while sending the trap.
462      * @exception SnmpStatusException If the trap exceeds the limit defined by <CODE>bufferSize</CODE>.
463      */

464     public void snmpV1Trap(int generic, int specific, SnmpVarBindList varBindList) throws IOException JavaDoc, SnmpStatusException;
465     
466     
467     /**
468      * Sends a trap using SNMP V1 trap format.
469      * <BR>The trap is sent to the specified <CODE>InetAddress</CODE> destination
470      * using the specified community string (and the ACL file is not used).
471      *
472      * @param address The <CODE>InetAddress</CODE> destination of the trap.
473      * @param cs The community string to be used for the trap.
474      * @param generic The generic number of the trap.
475      * @param specific The specific number of the trap.
476      * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null.
477      *
478      * @exception IOException An I/O error occurred while sending the trap.
479      * @exception SnmpStatusException If the trap exceeds the limit defined by <CODE>bufferSize</CODE>.
480      */

481     public void snmpV1Trap(InetAddress JavaDoc address, String JavaDoc cs, int generic, int specific, SnmpVarBindList varBindList)
482         throws IOException JavaDoc, SnmpStatusException;
483     
484     
485     /**
486      * Sends a trap using SNMP V1 trap format.
487      * <BR>The trap is sent to the specified <CODE>SnmpPeer</CODE> destination.
488      * The community string used is the one located in the <CODE>SnmpPeer</CODE> parameters (<CODE>SnmpParameters.getRdCommunity() </CODE>).
489      *
490      * @param peer The <CODE>SnmpPeer</CODE> destination of the trap.
491      * @param agentAddr The agent address to be used for the trap.
492      * @param enterpOid The enterprise OID to be used for the trap.
493      * @param generic The generic number of the trap.
494      * @param specific The specific number of the trap.
495      * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null.
496      * @param time The time stamp (overwrite the current time).
497      *
498      * @exception IOException An I/O error occurred while sending the trap.
499      * @exception SnmpStatusException If the trap exceeds the limit defined by <CODE>bufferSize</CODE>.
500      *
501      * @since 1.5
502      */

503     public void snmpV1Trap(SnmpPeer peer,
504                SnmpIpAddress agentAddr,
505                SnmpOid enterpOid,
506                int generic,
507                int specific,
508                SnmpVarBindList varBindList,
509                SnmpTimeticks time) throws IOException JavaDoc, SnmpStatusException;
510     
511     /**
512      * Sends a trap using SNMP V2 trap format.
513      * <BR>The trap is sent to the specified <CODE>SnmpPeer</CODE> destination.
514      * <BR>The community string used is the one located in the <CODE>SnmpPeer</CODE> parameters (<CODE>SnmpParameters.getRdCommunity() </CODE>).
515      * <BR>The variable list included in the outgoing trap is composed of the following items:
516      * <UL>
517      * <LI><CODE>sysUpTime.0</CODE> with the value specified by <CODE>time</CODE>
518      * <LI><CODE>snmpTrapOid.0</CODE> with the value specified by <CODE>trapOid</CODE>
519      * <LI><CODE>all the (oid,values)</CODE> from the specified <CODE>varBindList</CODE>
520      * </UL>
521      *
522      * @param peer The <CODE>SnmpPeer</CODE> destination of the trap.
523      * @param trapOid The OID identifying the trap.
524      * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null.
525      * @param time The time stamp (overwrite the current time).
526      *
527      * @exception IOException An I/O error occurred while sending the trap.
528      * @exception SnmpStatusException If the trap exceeds the limit defined by <CODE>bufferSize</CODE>.
529      *
530      * @since 1.5
531      */

532     public void snmpV2Trap(SnmpPeer peer,
533                SnmpOid trapOid,
534                SnmpVarBindList varBindList,
535                SnmpTimeticks time) throws IOException JavaDoc, SnmpStatusException;
536
537     /**
538      * Sends a trap using SNMP V2 trap format.
539      * <BR>The trap is sent to each destination defined in the ACL file (if available).
540      * If no ACL file or no destinations are available, the trap is sent to the local host.
541      * <BR>The variable list included in the outgoing trap is composed of the following items:
542      * <UL>
543      * <LI><CODE>sysUpTime.0</CODE> with its current value
544      * <LI><CODE>snmpTrapOid.0</CODE> with the value specified by <CODE>trapOid</CODE>
545      * <LI><CODE>all the (oid,values)</CODE> from the specified <CODE>varBindList</CODE>
546      * </UL>
547      *
548      * @param trapOid The OID identifying the trap.
549      * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null.
550      *
551      * @exception IOException An I/O error occured while sending the trap.
552      * @exception SnmpStatusException If the trap exceeds the limit defined by <CODE>bufferSize</CODE>.
553      */

554     public void snmpV2Trap(SnmpOid trapOid, SnmpVarBindList varBindList) throws IOException JavaDoc, SnmpStatusException;
555     
556     
557     /**
558      * Sends a trap using SNMP V2 trap format.
559      * <BR>The trap is sent to the specified <CODE>InetAddress</CODE> destination
560      * using the specified community string (and the ACL file is not used).
561      * <BR>The variable list included in the outgoing trap is composed of the following items:
562      * <UL>
563      * <LI><CODE>sysUpTime.0</CODE> with its current value
564      * <LI><CODE>snmpTrapOid.0</CODE> with the value specified by <CODE>trapOid</CODE>
565      * <LI><CODE>all the (oid,values)</CODE> from the specified <CODE>varBindList</CODE>
566      * </UL>
567      *
568      * @param address The <CODE>InetAddress</CODE> destination of the trap.
569      * @param cs The community string to be used for the trap.
570      * @param trapOid The OID identifying the trap.
571      * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null.
572      *
573      * @exception IOException An I/O error occurred while sending the trap.
574      * @exception SnmpStatusException If the trap exceeds the limit defined by <CODE>bufferSize</CODE>.
575      */

576     public void snmpV2Trap(InetAddress JavaDoc address, String JavaDoc cs, SnmpOid trapOid, SnmpVarBindList varBindList)
577         throws IOException JavaDoc, SnmpStatusException;
578
579     /**
580      * Send the specified trap PDU to the passed <CODE>InetAddress</CODE>.
581      * @param address The destination address.
582      * @param pdu The pdu to send.
583      * @exception IOException An I/O error occurred while sending the trap.
584      * @exception SnmpStatusException If the trap exceeds the limit defined by <CODE>bufferSize</CODE>.
585      *
586      * @since 1.5
587      */

588     public void snmpPduTrap(InetAddress JavaDoc address, SnmpPduPacket pdu)
589         throws IOException JavaDoc, SnmpStatusException;
590     /**
591      * Send the specified trap PDU to the passed <CODE>SnmpPeer</CODE>.
592      * @param peer The destination peer. The Read community string is used of <CODE>SnmpParameters</CODE> is used as the trap community string.
593      * @param pdu The pdu to send.
594      * @exception IOException An I/O error occurred while sending the trap.
595      * @exception SnmpStatusException If the trap exceeds the limit defined by <CODE>bufferSize</CODE>.
596      * @since 1.5
597      */

598     public void snmpPduTrap(SnmpPeer peer,
599                 SnmpPduPacket pdu)
600         throws IOException JavaDoc, SnmpStatusException;
601            
602     /**
603      * Sends an inform using SNMP V2 inform request format.
604      * <BR>The inform request is sent to each destination defined in the ACL file (if available).
605      * If no ACL file or no destinations are available, the inform request is sent to the local host.
606      * <BR>The variable list included in the outgoing inform request is composed of the following items:
607      * <UL>
608      * <LI><CODE>sysUpTime.0</CODE> with its current value
609      * <LI><CODE>snmpTrapOid.0</CODE> with the value specified by <CODE>trapOid</CODE>
610      * <LI><CODE>all the (oid,values)</CODE> from the specified <CODE>varBindList</CODE>
611      * </UL>
612      * To send an inform request, the SNMP adaptor server must be active.
613      *
614      * @param cb The callback that is invoked when a request is complete.
615      * @param trapOid The OID identifying the trap.
616      * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null.
617      *
618      * @return A vector of {@link com.sun.jmx.snmp.daemon.SnmpInformRequest} objects.
619      * <P>If there is no destination host for this inform request, the returned vector will be empty.
620      *
621      * @exception IllegalStateException This method has been invoked while the SNMP adaptor server was not active.
622      * @exception IOException An I/O error occurred while sending the inform request.
623      * @exception SnmpStatusException If the inform request exceeds the limit defined by <CODE>bufferSize</CODE>.
624      */

625     public Vector JavaDoc snmpInformRequest(SnmpInformHandler cb, SnmpOid trapOid, SnmpVarBindList varBindList)
626         throws IllegalStateException JavaDoc, IOException JavaDoc, SnmpStatusException;
627         
628     /**
629      * Sends an inform using SNMP V2 inform request format.
630      * <BR>The inform is sent to the specified <CODE>InetAddress</CODE> destination
631      * using the specified community string.
632      * <BR>The variable list included in the outgoing inform request is composed of the following items:
633      * <UL>
634      * <LI><CODE>sysUpTime.0</CODE> with its current value
635      * <LI><CODE>snmpTrapOid.0</CODE> with the value specified by <CODE>trapOid</CODE>
636      * <LI><CODE>all the (oid,values)</CODE> from the specified <CODE>varBindList</CODE>
637      * </UL>
638      * To send an inform request, the SNMP adaptor server must be active.
639      *
640      * @param address The <CODE>InetAddress</CODE> destination for this inform request.
641      * @param cs The community string to be used for the inform request.
642      * @param cb The callback that is invoked when a request is complete.
643      * @param trapOid The OID identifying the trap.
644      * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null.
645      *
646      * @return The inform request object.
647      *
648      * @exception IllegalStateException This method has been invoked while the SNMP adaptor server was not active.
649      * @exception IOException An I/O error occurred while sending the inform request.
650      * @exception SnmpStatusException If the inform request exceeds the limit defined by <CODE>bufferSize</CODE>.
651      */

652     public SnmpInformRequest snmpInformRequest(InetAddress JavaDoc address, String JavaDoc cs, SnmpInformHandler cb,
653                                                SnmpOid trapOid, SnmpVarBindList varBindList)
654         throws IllegalStateException JavaDoc, IOException JavaDoc, SnmpStatusException;
655
656     
657     /**
658      * Sends an inform using SNMP V2 inform request format.
659      * <BR>The inform is sent to the specified <CODE>SnmpPeer</CODE> destination.
660      * <BR> The community string used is the one located in the <CODE>SnmpPeer</CODE> parameters (<CODE>SnmpParameters.getInformCommunity() </CODE>).
661      * <BR>The variable list included in the outgoing inform is composed of the following items:
662      * <UL>
663      * <LI><CODE>sysUpTime.0</CODE> with its current value
664      * <LI><CODE>snmpTrapOid.0</CODE> with the value specified by <CODE>trapOid</CODE>
665      * <LI><CODE>all the (oid,values)</CODE> from the specified <CODE>varBindList</CODE>
666      * </UL>
667      * To send an inform request, the SNMP adaptor server must be active.
668      *
669      * @param peer The <CODE>SnmpPeer</CODE> destination for this inform request.
670      * @param cb The callback that is invoked when a request is complete.
671      * @param trapOid The OID identifying the trap.
672      * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null.
673      *
674      * @return The inform request object.
675      *
676      * @exception IllegalStateException This method has been invoked while the SNMP adaptor server was not active.
677      * @exception IOException An I/O error occurred while sending the inform request.
678      * @exception SnmpStatusException If the inform request exceeds the limit defined by <CODE>bufferSize</CODE>.
679      *
680      * @since 1.5
681      */

682     public SnmpInformRequest snmpInformRequest(SnmpPeer peer,
683                            SnmpInformHandler cb,
684                            SnmpOid trapOid,
685                            SnmpVarBindList varBindList) throws IllegalStateException JavaDoc, IOException JavaDoc, SnmpStatusException;
686 }
687
Popular Tags