|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.snmp4j.agent.DefaultMOScope
org.snmp4j.agent.DefaultMOContextScope
public class DefaultMOContextScope
The DefaultMOContextScope is the default implementation of
a MOContextScope representing an OID scope that distinguishes between
different contexts.
| Field Summary |
|---|
| Fields inherited from class org.snmp4j.agent.DefaultMOScope |
|---|
lowerBound, lowerIncluded, upperBound, upperIncluded |
| Constructor Summary | |
|---|---|
DefaultMOContextScope(MOContextScope scope)
Creates a context scope from another context scope. |
|
DefaultMOContextScope(org.snmp4j.smi.OctetString context,
MOScope extendedScope)
Creates a context scope from a plain OID scope. |
|
DefaultMOContextScope(org.snmp4j.smi.OctetString context,
org.snmp4j.smi.OID lowerBound,
boolean lowerIncluded,
org.snmp4j.smi.OID upperBound,
boolean upperIncluded)
Creates a context scope from a context, upper, and lower bound OID. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
Indicates whether an object is equal to this one. |
org.snmp4j.smi.OctetString |
getContext()
Gets the context of the scope. |
int |
hashCode()
|
static boolean |
isContextMatching(MOScope a,
MOScope b)
Indicates whether the given scopes have a matching context. |
boolean |
isCovered(MOScope other)
Checks whether the supplied scope is covered by this scope. |
boolean |
isOverlapping(MOScope other)
Checks whether the supplied scope overlap with this one, thus sharing at least one OID with the supplied one. |
void |
setContext(org.snmp4j.smi.OctetString context)
Sets the context name for this scope. |
java.lang.String |
toString()
|
| Methods inherited from class org.snmp4j.agent.DefaultMOScope |
|---|
covers, covers, covers, getLowerBound, getUpperBound, isEmpty, isLowerIncluded, isUpperIncluded, overlaps, setLowerBound, setLowerIncluded, setUpperBound, setUpperIncluded, substractScope |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.snmp4j.agent.MOScope |
|---|
covers, getLowerBound, getUpperBound, isLowerIncluded, isUpperIncluded |
| Constructor Detail |
|---|
public DefaultMOContextScope(org.snmp4j.smi.OctetString context,
org.snmp4j.smi.OID lowerBound,
boolean lowerIncluded,
org.snmp4j.smi.OID upperBound,
boolean upperIncluded)
context - the context for which this scope is valid.lowerBound - the lower bound of the OID scope (must not be null).lowerIncluded - specifies whether the lower bound is included or not.upperBound - the upper bound of the OID scope (null for no upper limit).upperIncluded - specifies whether the upper bound is included or not.public DefaultMOContextScope(MOContextScope scope)
scope - a MOContextScope instance whose context and bounds are copied by
reference.
public DefaultMOContextScope(org.snmp4j.smi.OctetString context,
MOScope extendedScope)
context - the context name for the new context scope.extendedScope - the OID scope that defines the OID range of the new scope (boundaries
are copied by reference).| Method Detail |
|---|
public org.snmp4j.smi.OctetString getContext()
getContext in interface MOContextScopepublic void setContext(org.snmp4j.smi.OctetString context)
context - a context name.public boolean equals(java.lang.Object obj)
equals in class DefaultMOScopeobj - some object.
true only if obj is a MOContextScope
and if context and scope equals this one's.public int hashCode()
hashCode in class DefaultMOScope
public static boolean isContextMatching(MOScope a,
MOScope b)
MOContextScope instances and both
contexts are not null and different.
a - a MOScope instance.b - another MOScope instance.
true if both scopes have matching contexts (or at least one
has no context defined).public boolean isCovered(MOScope other)
MOScope
isCovered in interface MOScopeisCovered in class DefaultMOScopeother - the MOScope to check
true if the lower bound of other is greater
or equal than the lower bound of this scope and if the upper bound of
other is lower or equal than the upper bound of this scope.public java.lang.String toString()
toString in class DefaultMOScopepublic boolean isOverlapping(MOScope other)
MOScope
isOverlapping in interface MOScopeisOverlapping in class DefaultMOScopeother - a MOScope.
true if there exists at least one OID that is included in
both scopes.
|
Copyright 2005-2010 Frank Fock (SNMP4J.org) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||