|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.di.protocols.SNMP
public class SNMP
This class offers the functionality of the Simple Network Management. Typically SNMP is used, when there are a number of systems to be managed, and one or more systems managing them. The managed system that report information via SNMP to the managing systems.
Field Summary | |
---|---|
static int |
retries
A parameter determining the number of retries to be made. |
static String |
SNMP_COMMUNITY
SNMP community string. |
static String |
SNMP_ENTERPRISE
The default value for the manage object's type. |
static int |
timeout
A timeout parameter. |
Constructor Summary | |
---|---|
SNMP()
|
Method Summary | |
---|---|
static com.tivoli.snmp.data.BadValue |
createBadValue()
Creates a SNMP BadValue object. |
static com.tivoli.snmp.data.Boolean |
createBoolean(boolean value)
Creates a SNMP Boolean object. |
static com.tivoli.snmp.data.Counter |
createCounter(long value)
Creates a SNMP Counter object. |
static com.tivoli.snmp.data.Counter64 |
createCounter64(long value)
Creates a 64-bit SNMP Counter object. |
static com.tivoli.snmp.data.FixedLengthOctetString |
createFixedLengthOctetString(String value)
Creates a SNMP OctetString object with fixed length. |
static com.tivoli.snmp.data.FullCounter64 |
createFullCounter64(BigInteger value)
Creates a SNMP FullCounter64 object. |
static com.tivoli.snmp.data.Gauge |
createGauge(long value)
Creates a SNMP Gauge object. |
static com.tivoli.snmp.data.IPAddress |
createIPAddress(String value)
Creates a SNMP IPAddress object. |
static com.tivoli.snmp.data.NoChange |
createNoChange()
Creates a SNMP NoChange object. |
static com.tivoli.snmp.data.NoSuchInstance |
createNoSuchInstance()
Creates a SNMP NoSuchInstance object. |
static com.tivoli.snmp.data.NoSuchObject |
createNoSuchObject()
Creates a SNMP NoSuchObject object. |
static com.tivoli.snmp.data.NotSupported |
createNotSupported()
Creates a SNMP NotSupported object. |
static com.tivoli.snmp.data.Null |
createNull()
Creates a SNMP Null object. |
static com.tivoli.snmp.data.OctetString |
createOctetString(String value)
Creates a SNMP OctetString object. |
static com.tivoli.snmp.data.OID |
createOID(String value)
Creates a SNMP OID (object identifier) object. |
static com.tivoli.snmp.data.Opaque |
createOpaque(byte[] value)
Creates a SNMP Opaque object. |
static com.tivoli.snmp.data.TimeTicks |
createTimeTicks(long value)
Creates a SNMP TimeTicks object. |
static void |
sendTrap(String host,
int port,
String oid,
Object value)
Sends an unsolicited SNMP TRAP message for an occurred event. |
static void |
sendTrap(String host,
int port,
String community,
String enterprise,
int genericTrap,
int specificTrap,
String oid,
Object value)
Sends an unsolicited SNMP TRAP message for an occurred event. |
static void |
sendTrap(String agentIP,
String host,
int port,
String community,
String enterprise,
int genericTrap,
int specificTrap,
String oid,
Object value)
Sends an unsolicited SNMP TRAP message for an occurred event. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String SNMP_ENTERPRISE
public static final String SNMP_COMMUNITY
public static int timeout
public static int retries
Constructor Detail |
---|
public SNMP()
Method Detail |
---|
public static void sendTrap(String host, int port, String oid, Object value) throws Exception
host
- the host where the management system is.port
- the TCP port to connect to.oid
- the object identifier. If oid is null, value must be an Entry
where the Attribute names will be used as OIDs.value
- the value(s).
Exception
- if a problem occurs.public static void sendTrap(String host, int port, String community, String enterprise, int genericTrap, int specificTrap, String oid, Object value) throws Exception
host
- the host where the management system is.port
- the TCP port to connect to.community
- the SNMP community string.enterprise
- the type of managed object that generates the trap.genericTrap
- indicates one of a number of generic trap types (coldStart,
warmStart, linkUp, linkDown, ...).specificTrap
- indicates one of a number of enterprise specific trap codes.oid
- the object identifier. If oid is null, value must be an Entry
where the Attribute names will be used as OIDs.value
- the value(s).
Exception
- if a problem occurs.public static void sendTrap(String agentIP, String host, int port, String community, String enterprise, int genericTrap, int specificTrap, String oid, Object value) throws Exception
agentIP
- the IP of the agent sending the message.host
- the host where the management system is.port
- the TCP port to connect to.community
- the SNMP community string.enterprise
- the type of managed object that generates the trap.genericTrap
- indicates one of a number of generic trap types (coldStart,
warmStart, linkUp, linkDown, ...).specificTrap
- indicates one of a number of enterprise specific trap codes.oid
- the object identifier. If oid is null, value must be an Entry
where the Attribute names will be used as OIDs.value
- the value(s).
Exception
- if a problem occurs.public static com.tivoli.snmp.data.BadValue createBadValue()
public static com.tivoli.snmp.data.Boolean createBoolean(boolean value)
value
- the boolean parameter to be converted.
public static com.tivoli.snmp.data.Counter createCounter(long value)
value
- the long parameter to be converted.
public static com.tivoli.snmp.data.Counter64 createCounter64(long value)
value
- the long parameter to be converted.
public static com.tivoli.snmp.data.FixedLengthOctetString createFixedLengthOctetString(String value)
value
- the String parameter to be converted.
public static com.tivoli.snmp.data.FullCounter64 createFullCounter64(BigInteger value)
value
- the BigInteger parameter to be converted.
public static com.tivoli.snmp.data.Gauge createGauge(long value)
value
- the long parameter to be converted.
public static com.tivoli.snmp.data.IPAddress createIPAddress(String value)
value
- the String parameter to be converted.
public static com.tivoli.snmp.data.NoChange createNoChange()
public static com.tivoli.snmp.data.NoSuchInstance createNoSuchInstance()
public static com.tivoli.snmp.data.NoSuchObject createNoSuchObject()
public static com.tivoli.snmp.data.NotSupported createNotSupported()
public static com.tivoli.snmp.data.Null createNull()
public static com.tivoli.snmp.data.OctetString createOctetString(String value)
value
- the String parameter to be converted.
public static com.tivoli.snmp.data.OID createOID(String value)
value
- the String parameter to be converted.
public static com.tivoli.snmp.data.Opaque createOpaque(byte[] value)
value
- the byte array parameter to be converted.
public static com.tivoli.snmp.data.TimeTicks createTimeTicks(long value)
value
- the long parameter to be converted.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |