Package org.snmp4j.agent.agentx.master
Class AgentXNodeQuery
java.lang.Object
org.snmp4j.agent.DefaultMOQuery
org.snmp4j.agent.agentx.master.AgentXNodeQuery
- All Implemented Interfaces:
org.snmp4j.agent.MOContextScope,org.snmp4j.agent.MOQuery,org.snmp4j.agent.MOScope
public class AgentXNodeQuery
extends org.snmp4j.agent.DefaultMOQuery
The
AgentXNodeQuery extends the DefaultMOQuery to allow on-the-fly query modifications and special
matchesQuery(ManagedObject) support for explicitly match or not match AgentXNodes only.- Author:
- Frank Fock
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intQueryAgentXNodes only.static final intQuery allManagedObjects.static final intQuery non-AgentXNodes only. -
Constructor Summary
ConstructorsConstructorDescriptionAgentXNodeQuery(org.snmp4j.smi.OctetString context, org.snmp4j.agent.MOScope scope, int queryMode) Creates aAgentXNodeQuerywith query mode. -
Method Summary
Modifier and TypeMethodDescriptionorg.snmp4j.agent.DefaultMOContextScopeReturns its scope as mutable, to allow query modification on-the-fly.booleanmatchesQuery(org.snmp4j.agent.ManagedObject<?> managedObject) Check if the providedManagedObjectmatches this query type.voidsubtractScope(org.snmp4j.agent.MOScope scope) Subtract the given scope from the query scope, i.e.Methods inherited from class org.snmp4j.agent.DefaultMOQuery
clone, covers, getContext, getLowerBound, getScope, getSource, getUpperBound, isCovered, isEmpty, isLowerIncluded, isOverlapping, isUpperIncluded, isWriteAccessQuery, setNewExclusiveLowerBound, toString
-
Field Details
-
QUERY_AGENTX_NODES
public static final int QUERY_AGENTX_NODESQueryAgentXNodes only.- See Also:
-
QUERY_NON_AGENTX_NODES
public static final int QUERY_NON_AGENTX_NODESQuery non-AgentXNodes only.- See Also:
-
QUERY_ALL
public static final int QUERY_ALLQuery allManagedObjects.- See Also:
-
-
Constructor Details
-
AgentXNodeQuery
public AgentXNodeQuery(org.snmp4j.smi.OctetString context, org.snmp4j.agent.MOScope scope, int queryMode) Creates aAgentXNodeQuerywith query mode.- Parameters:
context- the SNMPv3 context for the query.scope- the scope of the query.queryMode- an integer value specifying the search mode:QUERY_NON_AGENTX_NODES..QUERY_ALL.
-
-
Method Details
-
getMutableScope
public org.snmp4j.agent.DefaultMOContextScope getMutableScope()Returns its scope as mutable, to allow query modification on-the-fly.- Returns:
- the internal
DefaultMOContextScopefor modification.
-
matchesQuery
public boolean matchesQuery(org.snmp4j.agent.ManagedObject<?> managedObject) Check if the providedManagedObjectmatches this query type.- Specified by:
matchesQueryin interfaceorg.snmp4j.agent.MOQuery- Overrides:
matchesQueryin classorg.snmp4j.agent.DefaultMOQuery- Parameters:
managedObject- aManagedObject- Returns:
trueifmanagedObjectis matching the query modeQUERY_NON_AGENTX_NODESorQUERY_AGENTX_NODES. If mode isQUERY_ALL,trueis returned always.
-
subtractScope
public void subtractScope(org.snmp4j.agent.MOScope scope) Subtract the given scope from the query scope, i.e. reducing the scope by already done regions.- Specified by:
subtractScopein interfaceorg.snmp4j.agent.MOQuery- Overrides:
subtractScopein classorg.snmp4j.agent.DefaultMOQuery- Parameters:
scope- the scope to subtract.
-