-
- All Superinterfaces:
MOContextScope,MOScope
- All Known Implementing Classes:
DefaultMOQuery,MOQueryWithSource
public interface MOQuery extends MOContextScope
A managed object query is used to lookup managed objects, for example in aMOServerrepository.- Version:
- 1.1
- Author:
- Frank Fock
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MOContextScopegetScope()Gets the search range of this query.booleanisWriteAccessQuery()Indicates whether this query is issued on behalf of an intended write access on the ManagedObjects matched by this query.booleanmatchesQuery(ManagedObject<?> managedObject)Checks whether a managed object matches the internal query criteria defined by this query.voidsubstractScope(MOScope scope)Changes the query to no longer match (cover) the specified scope.-
Methods inherited from interface org.snmp4j.agent.MOContextScope
getContext
-
Methods inherited from interface org.snmp4j.agent.MOScope
covers, getLowerBound, getUpperBound, isCovered, isLowerIncluded, isOverlapping, isUpperIncluded
-
-
-
-
Method Detail
-
getScope
MOContextScope getScope()
Gets the search range of this query.- Returns:
- a
MORangeinstance denoting upper and lower bound of this queries scope.
-
matchesQuery
boolean matchesQuery(ManagedObject<?> managedObject)
Checks whether a managed object matches the internal query criteria defined by this query.- Parameters:
managedObject- theManagedObjectinstance to check.- Returns:
trueif themanagedObjectmatches the query.
-
substractScope
void substractScope(MOScope scope)
Changes the query to no longer match (cover) the specified scope. If the query's scope is immutable (does not implement theMutableMOScopeinterface, then this method will throw anUnsupportedOperationException.- Parameters:
scope- aMOScopeinstance that defines the range of OIDs that should be no longer in the scope of this query.
-
isWriteAccessQuery
boolean isWriteAccessQuery()
Indicates whether this query is issued on behalf of an intended write access on the ManagedObjects matched by this query. This information can be used to optimize query evaluation or to control resource allocation.- Returns:
trueif this query is performed to change or create a managed object matching this query andfalseif the query is for read-only access on the matched managed objects.- Since:
- 1.1
-
-