|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object snmp.SNMPv1CommunicationInterface
The class SNMPv1CommunicationInterface defines methods for communicating with SNMP entities. The approach is that from version 1 of SNMP, using no encryption of data. Communication occurs via UDP, using port 161, the standard SNMP port.
Field Summary | |
int |
requestID
|
static int |
SNMPPORT
|
Constructor Summary | |
SNMPv1CommunicationInterface(int version,
java.net.InetAddress hostAddress,
java.lang.String community)
Construct a new communication object to communicate with the specified host using the given community name. |
Method Summary | |
void |
closeConnection()
Close the "connection" with the device. |
SNMPVarBindList |
getMIBEntry(java.lang.String itemID)
Retrieve the MIB variable value corresponding to the object identifier given in itemID (in dotted-integer notation). |
SNMPVarBindList |
getMIBEntry(java.lang.String[] itemID)
Retrieve the MIB variable values corresponding to the object identifiers given in the array itemID (in dotted-integer notation). |
SNMPVarBindList |
getNextMIBEntry(java.lang.String itemID)
Retrieve the MIB variable value corresponding to the object identifier following that given in itemID (in dotted-integer notation). |
SNMPVarBindList |
getNextMIBEntry(java.lang.String[] itemID)
Retrieve the MIB variable value corresponding to the object identifiers following those given in the itemID array (in dotted-integer notation). |
int |
getReceiveBufferSize()
Returns the current size of the buffer used to receive response packets. |
SNMPVarBindList |
retrieveAllMIBInfo(java.lang.String startID)
Retrieve all MIB variable values subsequent to the starting object identifier given in startID (in dotted-integer notation). |
SNMPVarBindList |
retrieveMIBTable(java.lang.String baseID)
Retrieve all MIB variable values whose OIDs start with the supplied baseID. |
SNMPVarBindList |
retrieveMIBTable(java.lang.String[] baseID)
Retrieve all MIB variable values whose OIDs start with the supplied baseIDs. |
SNMPVarBindList |
setMIBEntry(java.lang.String[] itemID,
SNMPObject[] newValue)
Set the MIB variable values of the supplied object identifiers given in the itemID array (in dotted-integer notation). |
SNMPVarBindList |
setMIBEntry(java.lang.String itemID,
SNMPObject newValue)
Set the MIB variable value of the object identifier given in startID (in dotted-integer notation). |
void |
setReceiveBufferSize(int receiveBufferSize)
Set the size of the buffer used to receive response packets. |
void |
setSocketTimeout(int socketTimeout)
Permits setting timeout value for underlying datagram socket (in milliseconds). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int SNMPPORT
public int requestID
Constructor Detail |
public SNMPv1CommunicationInterface(int version, java.net.InetAddress hostAddress, java.lang.String community) throws java.net.SocketException
Method Detail |
public void setSocketTimeout(int socketTimeout) throws java.net.SocketException
java.net.SocketException
public void closeConnection() throws java.net.SocketException
java.net.SocketException
public SNMPVarBindList retrieveAllMIBInfo(java.lang.String startID) throws java.io.IOException, SNMPBadValueException
java.io.IOException
- Thrown when timeout experienced while waiting for response to request.
SNMPBadValueException
public SNMPVarBindList getMIBEntry(java.lang.String itemID) throws java.io.IOException, SNMPBadValueException, SNMPGetException
java.io.IOException
- Thrown when timeout experienced while waiting for response to request.
SNMPBadValueException
SNMPGetException
- Thrown if supplied OID has value that can't be retrievedpublic SNMPVarBindList getMIBEntry(java.lang.String[] itemID) throws java.io.IOException, SNMPBadValueException, SNMPGetException
java.io.IOException
- Thrown when timeout experienced while waiting for response to request.
SNMPBadValueException
SNMPGetException
- Thrown if one of supplied OIDs has value that can't be retrievedpublic SNMPVarBindList getNextMIBEntry(java.lang.String itemID) throws java.io.IOException, SNMPBadValueException, SNMPGetException
java.io.IOException
- Thrown when timeout experienced while waiting for response to request.
SNMPBadValueException
SNMPGetException
- Thrown if one the OID following the supplied OID has value that can't be retrievedpublic SNMPVarBindList getNextMIBEntry(java.lang.String[] itemID) throws java.io.IOException, SNMPBadValueException, SNMPGetException
java.io.IOException
- Thrown when timeout experienced while waiting for response to request.
SNMPBadValueException
SNMPGetException
- Thrown if OID following one of supplied OIDs has value that can't be retrievedpublic SNMPVarBindList setMIBEntry(java.lang.String itemID, SNMPObject newValue) throws java.io.IOException, SNMPBadValueException, SNMPSetException
java.io.IOException
- Thrown when timeout experienced while waiting for response to request.
SNMPBadValueException
SNMPSetException
public SNMPVarBindList setMIBEntry(java.lang.String[] itemID, SNMPObject[] newValue) throws java.io.IOException, SNMPBadValueException, SNMPSetException
java.io.IOException
- Thrown when timeout experienced while waiting for response to request.
SNMPBadValueException
SNMPSetException
public SNMPVarBindList retrieveMIBTable(java.lang.String baseID) throws java.io.IOException, SNMPBadValueException, SNMPGetException
java.io.IOException
- Thrown when timeout experienced while waiting for response to request.
SNMPBadValueException
SNMPGetException
public SNMPVarBindList retrieveMIBTable(java.lang.String[] baseID) throws java.io.IOException, SNMPBadValueException, SNMPGetException
java.io.IOException
- Thrown when timeout experienced while waiting for response to request.
SNMPBadValueException
SNMPGetException
- Thrown if incomplete row retrievedpublic void setReceiveBufferSize(int receiveBufferSize)
public int getReceiveBufferSize()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |