|
HOME | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ireasoning.protocol.Target
com.ireasoning.protocol.snmp.SnmpTarget
public class SnmpTarget
This class represents Snmp agent, containing properties of agent, such as host name, port number, community name.
Field Summary | |
---|---|
static java.lang.String |
PUBLIC
Default "public" community name |
Fields inherited from class com.ireasoning.protocol.Target |
---|
_host, _inetAddress, _port |
Constructor Summary | |
---|---|
SnmpTarget(java.lang.String host,
int port)
Constructs an SnmpTarget object for SNMPv1 or SNMPv3, using "public" as the community name |
|
SnmpTarget(java.lang.String host,
int port,
java.lang.String readCommunity,
java.lang.String writeCommunity)
Constructs an SnmpTarget object for SnmpV1 and SnmpV2c. |
|
SnmpTarget(java.lang.String host,
int port,
java.lang.String readCommunity,
java.lang.String writeCommunity,
int version)
Constructs an SnmpTarget object for SnmpV1 and SnmpV2c |
Method Summary | |
---|---|
java.lang.String |
getReadCommunity()
Returns the community name for SNMP "read" requests, such as GET, GET_NEXT, etc. |
int |
getVersion()
Returns the current SNMP version number |
java.lang.String |
getWriteCommunity()
Returns the community name for snmp SET operation |
void |
setReadCommunity(java.lang.String readCommunity)
Sets the community name for SNMP "read" requests, such as GET, GET_NEXT, etc. |
void |
setVersion(int ver)
Sets the SNMP protocol version number. |
void |
setWriteCommunity(java.lang.String writeCommunity)
Sets the community name for snmp SET operation |
Methods inherited from class com.ireasoning.protocol.Target |
---|
getHost, getInetAddress, getPort, setHost, setPort, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PUBLIC
Constructor Detail |
---|
public SnmpTarget(java.lang.String host, int port, java.lang.String readCommunity, java.lang.String writeCommunity, int version)
host
- host name or ip address of agentport
- port number of agentreadCommunity
- the community name for "read" operations such as GET,
GET_NEXT, GET_BULK, WALK, etcwriteCommunity
- the community name for SET opertion.version
- the snmp version supported by agent, one of { SnmpConst.SNMPV1, SnmpConst.SNMPV2, SnmpConst.SNMPV3 }public SnmpTarget(java.lang.String host, int port, java.lang.String readCommunity, java.lang.String writeCommunity)
host
- host name or ip address of agentport
- port number of agentreadCommunity
- the community name for "read" operations such as GET,
GET_NEXT, GET_BULK, WALK, etcwriteCommunity
- the community name for SET opertion.public SnmpTarget(java.lang.String host, int port)
host
- host name or ip address of agentport
- port number of agentMethod Detail |
---|
public java.lang.String getReadCommunity()
public void setReadCommunity(java.lang.String readCommunity)
readCommunity
- the community name for "read" requestspublic java.lang.String getWriteCommunity()
public void setWriteCommunity(java.lang.String writeCommunity)
writeCommunity
- the community name for SET opertionpublic int getVersion()
public void setVersion(int ver)
ver
- SNMP version to use. Possible values are
{ SnmpConst.SNMPV1, SnmpConst.SNMPV2, SnmpConst.SNMPV3 }
|
HOME | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |