KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > snmp4j > agent > MOServerLookupEvent


1 /*_############################################################################
2   _##
3   _## SNMP4J-Agent - MOServerLookupEvent.java
4   _##
5   _## Copyright (C) 2005-2007 Frank Fock (SNMP4J.org)
6   _##
7   _## Licensed under the Apache License, Version 2.0 (the "License");
8   _## you may not use this file except in compliance with the License.
9   _## You may obtain a copy of the License at
10   _##
11   _## http://www.apache.org/licenses/LICENSE-2.0
12   _##
13   _## Unless required by applicable law or agreed to in writing, software
14   _## distributed under the License is distributed on an "AS IS" BASIS,
15   _## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   _## See the License for the specific language governing permissions and
17   _## limitations under the License.
18   _##
19   _##########################################################################*/

20
21 package org.snmp4j.agent;
22
23 import java.util.EventObject JavaDoc;
24
25 /**
26  * A <code>MOServerLookupEvent</code> describes a lookup of a managed object
27  * within a {@link MOServer} repository. Such an event can be used to update
28  * {@link ManagedObject}s before they are accessed and processed by a command
29  * responder (agent).
30  *
31  * @author Frank Fock
32  * @version 1.0
33  */

34 public class MOServerLookupEvent extends EventObject JavaDoc {
35
36   private static final long serialVersionUID = -6148932595537688122L;
37
38   private ManagedObject lookupResult;
39   private MOQuery query;
40
41   public MOServerLookupEvent(Object JavaDoc source,
42                              ManagedObject lookupResult,
43                              MOQuery query) {
44     super(source);
45     this.lookupResult = lookupResult;
46     this.query = query;
47   }
48
49   /**
50    * Returns the <code>ManagedObject</code> that has been looked up.
51    * @return
52    * a <code>ManagedObject</code>.
53    */

54   public ManagedObject getLookupResult() {
55     return lookupResult;
56   }
57
58   /**
59    * Returns the query that has been used to lookup the managed object.
60    * @return
61    * a <code>MOQuery</code> instance that triggered the event.
62    */

63   public MOQuery getQuery() {
64     return query;
65   }
66
67 }
68
Popular Tags