KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > jmx > snmp > agent > SnmpTableEntryFactory


1 /*
2  * @(#)file SnmpTableEntryFactory.java
3  * @(#)author Sun Microsystems, Inc.
4  * @(#)version 1.9
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 package com.sun.jmx.snmp.agent;
12
13 import com.sun.jmx.snmp.SnmpStatusException;
14 import com.sun.jmx.snmp.SnmpOid;
15 import com.sun.jmx.snmp.agent.SnmpMibTable;
16 import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
17
18 /**
19  * This interface is implemented by mibgen generated table objects
20  * inheriting from {@link com.sun.jmx.snmp.agent.SnmpTableSupport}.
21  * <p>
22  * It is used internally by the metadata whenever a remote SNMP manager
23  * requests the creation of a new entry through an SNMP SET.
24  * </p>
25  * <p>
26  * At creation, the mibgen generated table object retrieves its
27  * corresponding metadata from the MIB and registers with
28  * this metadata as a SnmpTableEntryFactory.
29  * </p>
30  *
31  * <p><b>This API is a Sun Microsystems internal API and is subject
32  * to change without notice.</b></p>
33  **/

34
35 public interface SnmpTableEntryFactory extends SnmpTableCallbackHandler {
36
37     /**
38      * This method is called by the SNMP runtime whenever a new entry
39      * creation is requested by a remote manager.
40      *
41      * The factory is responsible for instantiating the appropriate MBean
42      * and for registering it with the appropriate metadata object.
43      *
44      * Usually this method will:
45      * <ul>
46      * <li>Check whether the creation can be accepted
47      * <li>Instantiate a new entry
48      * <li>Possibly register this entry with the MBeanServer, if needed.
49      * <li>Call <code>addEntry()</code> on the given <code>meta</code> object.
50      * </ul>
51      * This method is usually generated by <code>mibgen</code> on table
52      * objects (inheriting from
53      * {@link com.sun.jmx.snmp.agent.SnmpTableSupport}). <br>
54      *
55      * <p><b><i>
56      * This method is called internally by the SNMP runtime whenever a
57      * new entry creation is requested by a remote SNMP manager.
58      * You should never need to call this method directlty.
59      * </i></b></p>
60      *
61      * @param request The SNMP subrequest containing the sublist of varbinds
62      * for the new entry.
63      * @param rowOid The OID indexing the conceptual row (entry) for which
64      * the creation was requested.
65      * @param depth The depth reached in the OID tree (the position at
66      * which the columnar object ids start in the OIDs
67      * included in the varbind).
68      * @param meta The metadata object impacted by the subrequest
69      *
70      * @exception SnmpStatusException The new entry cannot be created.
71      *
72      **/

73     public void createNewEntry(SnmpMibSubRequest request, SnmpOid rowOid,
74                    int depth, SnmpMibTable meta)
75     throws SnmpStatusException;
76 }
77
78
Popular Tags