|
SNMP Stack 4_12 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface contains the SNMP context interface that is needed by every Pdu to send a SNMP v1, v2c and v3 request. The context also provides functionality to receive traps.
SnmpContext
,
SnmpContextv2c
,
SnmpContextv3
Field Summary | |
static int |
DEFAULT_PORT
The default port number where SNMP requests are send to. |
static java.lang.String |
KVM_SOCKET
The KVM Socket type. |
static int |
MAXPDU
The Maximum number of outstanding PDUs a context can handle at a given moment in time. |
static int |
MSS
The Maximum size of a message in octets. |
static java.lang.String |
NETSCAPE_SOCKET
The Netscape Socket type. |
static java.lang.String |
STANDARD_SOCKET
The Standard Socket type. |
static java.lang.String |
version_id
|
Method Summary | |
boolean |
addPdu(Pdu pdu)
Adds a pdu to the context. |
void |
addTrapListener(TrapListener l)
Adds the specified trap listener to receive traps from the host that matches this context. |
void |
destroy()
Removes the resouces held by this context. |
byte[] |
encodePacket(byte msg_type,
int rId,
int errstat,
int errind,
java.util.Enumeration ve)
Encodes a pdu. |
java.lang.String |
getHost()
Returns the host |
int |
getPort()
Returns the port number |
java.lang.String |
getTypeSocket()
Returns the type socket |
int |
getVersion()
Return the SNMP version of the context. |
Pdu |
processIncomingTrap(byte[] message)
Processes an incoming trap. |
boolean |
removePdu(int requestId)
Removes a pdu from the context. |
void |
removeTrapListener(TrapListener l)
Removes the specified trap listener. |
void |
sendPacket(byte[] packet)
Sends an encoded pdu. |
Field Detail |
public static final java.lang.String version_id
public static final int DEFAULT_PORT
public static final java.lang.String STANDARD_SOCKET
public static final java.lang.String NETSCAPE_SOCKET
public static final java.lang.String KVM_SOCKET
public static final int MAXPDU
public static final int MSS
Method Detail |
public int getVersion()
public java.lang.String getHost()
public int getPort()
public java.lang.String getTypeSocket()
public boolean addPdu(Pdu pdu) throws java.io.IOException, PduException
public boolean removePdu(int requestId)
public byte[] encodePacket(byte msg_type, int rId, int errstat, int errind, java.util.Enumeration ve) throws java.io.IOException, EncodingException
public void sendPacket(byte[] packet)
packet
- The encoded packetpublic void destroy()
public void addTrapListener(TrapListener l) throws java.io.IOException
public void removeTrapListener(TrapListener l) throws java.io.IOException
public Pdu processIncomingTrap(byte[] message) throws DecodingException, java.io.IOException
|
SNMP Stack 4_12 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |