1 /*
   2  * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 package com.sun.jmx.snmp.agent;
  26 
  27 import javax.management.ObjectName;
  28 import com.sun.jmx.snmp.SnmpStatusException;
  29 import com.sun.jmx.snmp.SnmpOid;
  30 import com.sun.jmx.snmp.agent.SnmpMibTable;
  31 
  32 /**
  33  * This interface ensures the synchronization between Metadata table objects
  34  * and bean-like table objects.
  35  *
  36  * It is used between mibgen generated table meta and table classes.
  37  * <p><b><i>
  38  * You should never need to use this interface directly.
  39  * </p></b></i>
  40  *
  41  * <p><b>This API is a Sun Microsystems internal API  and is subject
  42  * to change without notice.</b></p>
  43  **/
  44 public interface SnmpTableCallbackHandler {
  45     /**
  46      * This method is called by the SNMP runtime after a new entry
  47      * has been added to the table.
  48      *
  49      * If an SnmpStatusException is raised, the entry will be removed
  50      * and the operation will be aborted. In this case, the removeEntryCb()
  51      * callback will not be called.
  52      *
  53      * <p><b><i>
  54      * You should never need to use this method directly.
  55      * </p></b></i>
  56      *
  57      **/
  58     public void addEntryCb(int pos, SnmpOid row, ObjectName name,
  59                            Object entry, SnmpMibTable meta)
  60         throws SnmpStatusException;
  61 
  62     /**
  63      * This method is called by the SNMP runtime after a new entry
  64      * has been removed from the table.
  65      *
  66      * If raised, SnmpStatusException will be ignored.
  67      *
  68      * <p><b><i>
  69      * You should never need to use this method directly.
  70      * </p></b></i>
  71      *
  72      **/
  73     public void removeEntryCb(int pos, SnmpOid row, ObjectName name,
  74                               Object entry, SnmpMibTable meta)
  75         throws SnmpStatusException;
  76 }