KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*_############################################################################
2   _##
3   _## SNMP4J-Agent - MOScope.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
22 package org.snmp4j.agent;
23
24 import org.snmp4j.smi.OID;
25
26 /**
27  * A managed object scope defines a contiguos region within the global OID
28  * space.
29  *
30  * @author Frank Fock
31  * @version 1.0
32  */

33 public interface MOScope {
34
35   /**
36    * Gets the lower bound OID of the scope. Whether the lower bound is included
37    * or excluded from the scope's region is determined by
38    * {@link #isLowerIncluded()}.
39    *
40    * @return
41    * an OID.
42    */

43   OID getLowerBound();
44
45   /**
46    * Gets the upper bound OID of the scope. Whether the upper bound is included
47    * or excluded from the scope's region is determined by
48    * {@link #isUpperIncluded()}.
49
50    * @return OID
51    */

52   OID getUpperBound();
53
54   /**
55    * Indicates whether the lower bound OID is included in the scope or not.
56    * @return
57    * <code>true</code> if the lower bound is included.
58    */

59   boolean isLowerIncluded();
60
61   /**
62    * Indicates whether the upper bound OID is included in the scope or not.
63    * @return
64    * <code>true</code> if the upper bound is included.
65    */

66   boolean isUpperIncluded();
67
68   /**
69    * Checks whether the supplied scope is covered by this scope.
70    * @param other
71    * the <code>MOScope</code> to check
72    * @return
73    * <code>true</code> if the lower bound of <code>other</code> is greater
74    * or equal than the lower bound of this scope and if the upper bound of
75    * <code>other</code> is lower or equal than the upper bound of this scope.
76    */

77   boolean isCovered(MOScope other);
78
79   /**
80    * Checks whether the supplied scope overlap with this one, thus sharing at
81    * least one OID with the supplied one.
82    * @param other
83    * a <code>MOScope</code>.
84    * @return
85    * <code>true</code> if there exists at least one OID that is included in
86    * both scopes.
87    */

88   boolean isOverlapping(MOScope other);
89
90   /**
91    * Checks if this scope covers the supplied OID.
92    * @param oid
93    * an OID.
94    * @return
95    * <code>true</code> if <code>oid</code> is greater or equal the scope's
96    * lower bound and if it is less or equal its upper bound.
97    */

98   boolean covers(OID oid);
99
100 }
101
Popular Tags