View Javadoc

1   /**
2    * This file is part of GoldenGate Project (named also GoldenGate or GG).
3    * 
4    * Copyright 2009, Frederic Bregier, and individual contributors by the @author
5    * tags. See the COPYRIGHT.txt in the distribution for a full listing of
6    * individual contributors.
7    * 
8    * All GoldenGate Project is free software: you can redistribute it and/or
9    * modify it under the terms of the GNU General Public License as published by
10   * the Free Software Foundation, either version 3 of the License, or (at your
11   * option) any later version.
12   * 
13   * GoldenGate is distributed in the hope that it will be useful, but WITHOUT ANY
14   * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
15   * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16   * 
17   * You should have received a copy of the GNU General Public License along with
18   * GoldenGate . If not, see <http://www.gnu.org/licenses/>.
19   */
20  package goldengate.snmp.test;
21  
22  import goldengate.common.logging.GgInternalLogger;
23  import goldengate.common.logging.GgInternalLoggerFactory;
24  import goldengate.snmp.GgSnmpAgent;
25  import goldengate.snmp.interf.GgInterfaceMonitor;
26  
27  /**
28   * This implementation show how to support SNMP.
29   * 
30   * @author Frederic Bregier
31   * 
32   */
33  public class GgPrivateMonitor implements GgInterfaceMonitor {
34      /**
35       * Internal Logger
36       */
37      private static GgInternalLogger logger = GgInternalLoggerFactory
38              .getLogger(GgPrivateMonitor.class);
39  
40      public GgSnmpAgent agent;
41  
42      /**
43       * @return the agent
44       */
45      public GgSnmpAgent getAgent() {
46          return agent;
47      }
48  
49      /**
50       * @param agent
51       *            the agent to set
52       */
53      public void setAgent(GgSnmpAgent agent) {
54          this.agent = agent;
55      }
56  
57      /*
58       * (non-Javadoc)
59       * 
60       * @see goldengate.snmp.GgInterfaceMonitor#initialize()
61       */
62      @Override
63      public void initialize() {
64          // TODO Auto-generated method stub
65          logger.warn("Call");
66      }
67  
68      /*
69       * (non-Javadoc)
70       * 
71       * @see goldengate.snmp.GgInterfaceMonitor#releaseResources()
72       */
73      @Override
74      public void releaseResources() {
75          // TODO Auto-generated method stub
76          logger.warn("Call");
77  
78      }
79  
80      /*
81       * function to test if the computations need to be redone
82       * 
83       */
84      public void generalValuesUpdate() {
85          synchronized (agent) {
86              // TODO Auto-generated method stub
87  
88              logger.warn("Call");
89          }
90      }
91  
92      public void detailedValuesUpdate() {
93          synchronized (agent) {
94              // TODO Auto-generated method stub
95              logger.warn("Call");
96  
97          }
98      }
99  
100     public void errorValuesUpdate() {
101         synchronized (agent) {
102             // TODO Auto-generated method stub
103             logger.warn("Call");
104 
105         }
106     }
107 
108 }