|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tivoli.twg.libs.ServiceNode
com.tivoli.twg.snmp.SNMPRemoteRequest
This class will allow access to the SNMP Stack (V1, V2, or V3) on the Director Server. It allows the execution of the primary SNMP requests Get, GetNext, Set, GetBulk, and Inform to be executed remotely on the Director Server from the console.
SNMPRemoteResponse
Field Summary | |
---|---|
static int |
DEFAULT
|
static int |
SNMP_V1
|
static int |
SNMP_V2
|
static int |
SNMP_V3
|
Fields inherited from class com.tivoli.twg.libs.ServiceNode |
---|
SVCNODE_DISABLE_TRACING_CMD, SVCNODE_ENABLE_TRACING_CMD, SVCNODE_GET_STATUS_CMD, SVCNODE_KILL_SERVICE_CMD |
Constructor Summary | |
---|---|
SNMPRemoteRequest()
Construct an instance of the remote services. |
|
SNMPRemoteRequest(int version)
Construct an instance of the remote services for SNMP V1, V2, or V3. |
Method Summary | |
---|---|
void |
close()
Close this remote requester. |
boolean |
CommandReceived(ServiceNode CallBackSN,
Command cmd)
INTERNAL USE ONLY |
void |
iCommandReceived(Command cmd)
INTERNAL USE ONLY |
boolean |
isClosed()
Test whether this remote requester is closed. |
long |
sendGetBulkRequest(long targetMoid,
java.lang.String[] oids,
int maxRepetitions,
int nonRepeaters,
SNMPRemoteResponse responseClass)
Called to perform a Get Bulk Request operation on the target Managed Object ID. |
long |
sendGetNextRequest(long targetMoid,
java.lang.String[] oids,
SNMPRemoteResponse responseClass)
Called to perform an SNMP GetNext request operation on the target Managed Object ID. |
long |
sendGetNextRequest(long targetMoid,
java.lang.String oid,
SNMPRemoteResponse responseClass)
|
long |
sendGetRequest(long targetMoid,
java.lang.String[] oids,
SNMPRemoteResponse responseClass)
Called to perform an SNMP Get Request operation on the target Managed Object ID. |
long |
sendGetRequest(long targetMoid,
java.lang.String oid,
SNMPRemoteResponse responseClass)
|
long |
sendInformRequest(long targetMoid,
VariableBinding[] vbl,
SNMPRemoteResponse responseClass)
Called to perform an Inform Request operation on the target Managed Object ID. |
long |
sendSetRequest(long targetMoid,
VariableBinding[] vbl,
SNMPRemoteResponse responseClass)
Called to perform an SNMP Set operation on the target Managed Object ID. |
long |
sendTrap(long targetMoid,
java.lang.String agentAddress,
VariableBinding[] vbl)
Called to perform an SNMP V1 Trap operation on the target Managed Object ID. |
long |
sendV2Trap(long targetMoid,
VariableBinding[] vbl)
Called to perform an SNMP V2 Trap operation on the target Managed Object ID. |
void |
setVersion(int version)
Set the SNMP version. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int DEFAULT
public static final int SNMP_V1
public static final int SNMP_V2
public static final int SNMP_V3
Constructor Detail |
public SNMPRemoteRequest() throws BadServiceNodeImplException, ServiceNodeClosedException, ServiceNodeException
BadServiceNodeImplException
ServiceNodeClosedException
ServiceNodeException
public SNMPRemoteRequest(int version) throws BadServiceNodeImplException, ServiceNodeClosedException, ServiceNodeException
version
- SNMPRemoteRequest.DEFAULT, SNMPRemoteRequest.SNMP_V1, SNMPRemoteRequest.SNMP_V2, SNMPRemoteRequest.SNMP_V3
BadServiceNodeImplException
ServiceNodeClosedException
ServiceNodeException
Method Detail |
public long sendGetRequest(long targetMoid, java.lang.String[] oids, SNMPRemoteResponse responseClass) throws ServiceNodeException
targetMoid
- The Managed Object ID of the TWGSNMPDevice that the operation was targeted at.oids
- An array of SNMP object identifiers that are to be used as a target for this operation.responseClass
- An instance of a class that implements the SNMPRemoteResponse
interface. This instance will be called at the appropriate method
when this Get operation either completes successfully, or fails.
ServiceNodeException
SNMPRemoteResponse
public long sendGetRequest(long targetMoid, java.lang.String oid, SNMPRemoteResponse responseClass) throws ServiceNodeException
ServiceNodeException
public long sendGetNextRequest(long targetMoid, java.lang.String[] oids, SNMPRemoteResponse responseClass) throws ServiceNodeException
targetMoid
- The Managed Object ID of the TWGSNMPDevice that the operation was targeted at.oids
- A array of SNMP OIDs that are to be used as a target for this operation. A GetNext will
return the OID that follows this one, in lexigraphical order, in the target systems
MIB tree.responseClass
- An instance of a class that implements the SNMPRemoteResponse
interface. This instance will be called at the appropriate method
when this GetNext operation either completes successfully, or fails.
ServiceNodeException
SNMPRemoteResponse
public long sendGetNextRequest(long targetMoid, java.lang.String oid, SNMPRemoteResponse responseClass) throws ServiceNodeException
ServiceNodeException
public long sendSetRequest(long targetMoid, VariableBinding[] vbl, SNMPRemoteResponse responseClass) throws ServiceNodeException
targetMoid
- The Managed Object ID of the TWGSNMPDevice that the operation was targeted at.vbl
- The VariableBinding that is to be used as a target for this operation. A Set will
return the success of the set of these OIDs to SetResponse.responseClass
- An instance of a class that implements the SNMPRemoteResponse
interface. This instance will be called at the appropriate method
when this Set operation either completes successfully, or fails.
ServiceNodeException
SNMPRemoteResponse
public long sendGetBulkRequest(long targetMoid, java.lang.String[] oids, int maxRepetitions, int nonRepeaters, SNMPRemoteResponse responseClass) throws ServiceNodeException
targetMoid
- The Managed Object ID of the TWGSNMPDevice that the operation was targeted at.oids
- The SNMP OIDs that are to be used as a target for this operation.maxRepetitions
- The maximum number of repetitions.nonRepeaters
- The number of non-repeatersresponseClass
- An instance of a class that implements the SNMPRemoteResponse
interface. This instance will be called at the appropriate method
when this Get Bulk operation either completes successfully, or fails.
ServiceNodeException
SNMPRemoteResponse
public long sendInformRequest(long targetMoid, VariableBinding[] vbl, SNMPRemoteResponse responseClass) throws ServiceNodeException
targetMoid
- The Managed Object ID of the TWGSNMPDevice that the operation was targeted at.vbl
- The VariableBinding that is to be used as a target for this operation. A Inform will
return the success of the inform of these OIDs to InformResponse.responseClass
- An instance of a class that implements the SNMPRemoteResponse
interface. This instance will be called at the appropriate method
when this Inform operation either completes successfully, or fails.
ServiceNodeException
SNMPRemoteResponse
public long sendTrap(long targetMoid, java.lang.String agentAddress, VariableBinding[] vbl) throws ServiceNodeException
targetMoid
- The Managed Object ID of the TWGSNMPDevice that the operation was targeted at.agentAddress
- IP address of the SNNP agent who is the source of the trapvbl
- The VariableBinding that is to be used as a target for this operation.
ServiceNodeException
SNMPRemoteResponse
public long sendV2Trap(long targetMoid, VariableBinding[] vbl) throws ServiceNodeException
targetMoid
- The Managed Object ID of the TWGSNMPDevice that the operation was targeted at.vbl
- The VariableBinding that is to be used as a target for this operation.
ServiceNodeException
SNMPRemoteResponse
public void setVersion(int version)
version
- SNMP_V1 or SNMP_v2public boolean isClosed()
public void close()
public boolean CommandReceived(ServiceNode CallBackSN, Command cmd)
CommandReceived
in interface CommandReceivedListener
CallBackSN
- - ServiceNode instance which received Commandcmd
- - Instance of Command received
public void iCommandReceived(Command cmd)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |