public interface SnmpContext extends SnmpOperationFactory, SnmpOperations, SnmpAsyncOperations, Closeable
A context is a lightweight object that represents a single SNMP agent on a network. Implementations may be designed such that a single provider object is shared by many context objects.
A context is obtained from an SnmpFactory
. When the context
is no longer used, the close()
method should be
called to release any provider resources associated with the context.
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this context, releasing any provider resources associated
with it.
|
Mib |
getMib()
Gets the MIB associated with this context.
|
SnmpTarget |
getTarget()
Gets the target of this context.
|
Varbind |
newVarbind(String oid,
Object value)
Constructs a new
Varbind suitable for use in operations
performed via this context. |
newGet, newGet, newGet, newGetBulk, newGetBulk, newGetBulk, newGetNext, newGetNext, newGetNext, newSet, newSet, newSet, newWalk, newWalk, newWalk, newWalk, newWalk
get, get, get, getBulk, getBulk, getBulk, getNext, getNext, getNext, set, set, set, walk, walk, walk, walk, walk
asyncGet, asyncGet, asyncGet, asyncGetBulk, asyncGetBulk, asyncGetBulk, asyncGetNext, asyncGetNext, asyncGetNext, asyncWalk, asyncWalk, asyncWalk, asyncWalk, asyncWalk
SnmpTarget getTarget()
Mib getMib()
void close()
close
in interface AutoCloseable
close
in interface Closeable
Varbind newVarbind(String oid, Object value)
Varbind
suitable for use in operations
performed via this context.oid
- MIB name or dotted-decimal OIDvalue
- value whose type is appropriate for the specified object
identifierCopyright © 2012–2015. All rights reserved.