|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The SnmpTrapProfile represents a client's selection of which traps to receive. Received traps are checked against the following filter points:
Each filtering point may be configured within the profile. The port must be a specificed value, which defaults to 162. The other filtering points by default are turned off.
NOTE: As of jSNMP v3.0, traps are based upon the SNMPV2 trap specification ( RFC 1905 - Protocol Operations for Version 2 of the Simple Network Management Protocol). That is, all traps are specified by an enterprise OID and trap code. The generic SNMPV1 traps, coldStart, warmStart, linkDown, linkUp, authenticationFailure, and egpNeighborLoss, are converted to traps with an enterprise OID of 1.3.6.1.6.3.1.1.5 and corresponding trap codes of 1, 2, 3, 4, 5, and 6 (see RFC 2576 - Coexistence between Version 1, Version 2, and Version 3 of the Internet-standard Network Management Framework). The SNMPv1 deprecated addAgentAddress and addAgent methods have been superceeded by the addSecureSession method, but will work as before. The SNMPv1 deprecated removeAgentAddress and removeAgent methods have been superceeded by the removeSecureSession method, but will work as before. The SNMPv1 deprecated listAgentAddresses and listAgents methods have been superceeded by the listSecureSessions method, but will work as before. The SNMPv1 deprecated addGenericTrapType and addSpecificTrapType methods have been superceeded by the addTrapInform method, but will work as before. The SNMPv1 deprecated removeGenericTrapType and removeSpecificTrapType methods have been superceeded by the removeTrapInform method, but will work as before. The SNMPv1 deprecated listGenericTrapTypes and listSpecificTrapTypes methods have been superceeded by the listTrapTypes method, but will work as before.
SnmpAuthoritativeSession
Method Summary | |
boolean |
addAgentAddress(java.net.InetAddress cAgentInetAddress)
Deprecated. as of jSNMP v3.0 by addTrapSession() |
boolean |
addAgentIPAddress(java.lang.String szAgentIPAddress)
Deprecated. as of jSNMP v3.0 by addTrapSession() |
boolean |
addEnterpriseOID(java.lang.String szOID)
Deprecated. as of jSNMP v3.0 by addTrapInform() |
boolean |
addGenericTrapType(java.lang.Integer igrType)
Deprecated. as of jSNMP v3.0 by addTrapInform() |
boolean |
addInformSession(SnmpAuthoritativeSession cSnmpLocalAuthoritativeSession)
Adds an Inform session of an SNMP agent to the list of sessions to receive informs. |
boolean |
addSpecificTrapType(java.lang.Integer igrType)
Deprecated. as of jSNMP v3.0 by addTrapInform() |
boolean |
addTrapInform(java.lang.String szOID,
java.lang.Integer igrType)
Adds a trap/inform. |
boolean |
addTrapSession(SnmpAuthoritativeSession cSnmpRemoteAuthoritativeSession)
Adds a Trap session of an SNMP agent to the list of sessions to receive traps. |
int |
getPort()
Gets the port to match against incoming traps |
java.net.InetAddress[] |
listAgentAddresses()
Deprecated. as of jSNMP v3.0 by listTrapSessions() |
java.lang.String[] |
listAgentsIPAddress()
Deprecated. as of jSNMP v3.0 by listTrapSessions() |
java.lang.String[] |
listEnterpriseOIDs()
Lists all the OIDs used to check incoming traps |
java.lang.Integer[] |
listGenericTrapTypes()
Deprecated. as of jSNMP v3.0 by listTrapTypes() |
SnmpAuthoritativeSession[] |
listInformSessions()
Lists all the agent sessions used to check incoming Informs. |
java.lang.Integer[] |
listSpecificTrapTypes()
Deprecated. as of jSNMP v3.0 by listTrapTypes() |
java.lang.String[] |
listTrapInformOIDs()
Lists all the trap/inform enterprise OIDs that are used to check incoming traps/informs. |
java.lang.Integer[] |
listTrapInformTypes(java.lang.String szOID)
Lists all the trap/inform types for an enterprise OID that are used to check incoming traps/informs. |
SnmpAuthoritativeSession[] |
listTrapSessions()
Lists all the agent sessions used to check incoming Traps. |
boolean |
removeAgentAddress(java.net.InetAddress cAgentInetAddress)
Deprecated. as of jSNMP v3.0 by removeTrapSession() |
boolean |
removeAgentIPAddress(java.lang.String szAgentIPAddress)
Deprecated. as of jSNMP v3.0 by removeTrapSession() |
boolean |
removeEnterpriseOID(java.lang.String szOID)
Deprecated. as of jSNMP v3.0 by removeTrapInform() |
void |
removeEnterpriseOIDs()
Deprecated. as of jSNMP v3.0 by removeTrapInform() |
boolean |
removeGenericTrapType(java.lang.Integer igrType)
Deprecated. as of jSNMP v3.0 by removeTrapInform() |
boolean |
removeInformSession(SnmpAuthoritativeSession cSnmpLocalAuthoritativeSession)
Removes a session from the list of Inform sessions. |
boolean |
removeSpecificTrapType(java.lang.Integer igrType)
Deprecated. as of jSNMP v3.0 by removeTrapInform() |
boolean |
removeTrapInform(java.lang.String szOID)
Removes all trap/form types for an enterprise OID. |
boolean |
removeTrapInform(java.lang.String szOID,
java.lang.Integer igrType)
Removes a trap/inform type from an enterprise OID. |
boolean |
removeTrapSession(SnmpAuthoritativeSession cSnmpRemoteAuthoritativeSession)
Removes a session from the list of Trap sessions. |
void |
removeTrapsInforms()
Removes all traps/informs, if any. |
Method Detail |
public int getPort()
public boolean addEnterpriseOID(java.lang.String szOID) throws java.lang.IllegalArgumentException
szOID
- the OID (in dotted notation)
to add to the listjava.lang.IllegalArgumentException
- if the OID is not validpublic boolean removeEnterpriseOID(java.lang.String szOID) throws java.util.NoSuchElementException
szOID
- the OID to removejava.util.NoSuchElementException
- if the OID is not in the listpublic void removeEnterpriseOIDs()
public java.lang.String[] listEnterpriseOIDs()
public boolean addAgentAddress(java.net.InetAddress cAgentInetAddress)
cAgentInetAddress
- the InetAddress of the agent to addpublic boolean addAgentIPAddress(java.lang.String szAgentIPAddress) throws java.lang.IllegalArgumentException
szAgentIPAddress
- the IP address of the agent to addjava.lang.IllegalArgumentException
- if invalid IP addresspublic boolean addTrapSession(SnmpAuthoritativeSession cSnmpRemoteAuthoritativeSession) throws java.lang.IllegalArgumentException
cSnmpRemoteAuthoritativeSession
- contains host,
port(un-used), and security object for the agentjava.lang.IllegalArgumentException
- if cSnmpRemoteAuthoritativeSession is not a 'remote' authoritative sessionpublic boolean addInformSession(SnmpAuthoritativeSession cSnmpLocalAuthoritativeSession) throws java.lang.IllegalArgumentException
cSnmpLocalAuthoritativeSession
- contains host,
port(un-used), and security object for the agentjava.lang.IllegalArgumentException
- if a SNMPv1 session or if cSnmpLocalAuthoritativeSession is not a "local" authoritative sessionpublic boolean removeAgentAddress(java.net.InetAddress cAgentInetAddress) throws java.util.NoSuchElementException
cAgentInetAddress
- the InetAddress of the agent to removejava.util.NoSuchElementException
- if the address is not in the listpublic boolean removeAgentIPAddress(java.lang.String szAgentIPAddress) throws java.util.NoSuchElementException, java.lang.IllegalArgumentException
szAgentIPAddress
- the IP address of the agent to removejava.util.NoSuchElementException
- if the address is not in the listjava.lang.IllegalArgumentException
- if invalid IP addresspublic boolean removeTrapSession(SnmpAuthoritativeSession cSnmpRemoteAuthoritativeSession) throws java.util.NoSuchElementException, java.lang.IllegalArgumentException
cSnmpRemoteAuthoritativeSession
- contains host,
port(un-used), and security object for the agentjava.util.NoSuchElementException
- if the session is not in the listjava.lang.IllegalArgumentException
- if cSnmpRemoteAuthoritativeSession is not a 'remote' authoritative sessionpublic boolean removeInformSession(SnmpAuthoritativeSession cSnmpLocalAuthoritativeSession) throws java.util.NoSuchElementException, java.lang.IllegalArgumentException
cSnmpLocalAuthoritativeSession
- contains host,
port(un-used), and security object for the agentjava.util.NoSuchElementException
- if the session is not in the listjava.lang.IllegalArgumentException
- if cSnmpLocalAuthoritativeSession is not a "local" authoritative sessionpublic java.net.InetAddress[] listAgentAddresses()
public java.lang.String[] listAgentsIPAddress()
public SnmpAuthoritativeSession[] listTrapSessions()
public SnmpAuthoritativeSession[] listInformSessions()
public boolean addGenericTrapType(java.lang.Integer igrType)
igrType
- the type (coldStart, warmStart, etc.) to addpublic boolean addSpecificTrapType(java.lang.Integer igrType)
igrType
- the specific type to addpublic boolean removeGenericTrapType(java.lang.Integer igrType) throws java.util.NoSuchElementException
igrType
- the type to removejava.util.NoSuchElementException
- if the type is not in the listpublic boolean removeSpecificTrapType(java.lang.Integer igrType) throws java.util.NoSuchElementException
igrType
- the type to removejava.util.NoSuchElementException
- if the type is not in the listpublic java.lang.Integer[] listGenericTrapTypes()
public java.lang.Integer[] listSpecificTrapTypes()
public boolean addTrapInform(java.lang.String szOID, java.lang.Integer igrType) throws java.lang.IllegalArgumentException
szOID
- enterprise OID for trapigrType
- the type to addjava.lang.IllegalArgumentException
- if szOID is null or not OID (1.3.6....) or invalid igrType for "generic" trap.public boolean removeTrapInform(java.lang.String szOID, java.lang.Integer igrType) throws java.util.NoSuchElementException
szOID
- enterprise OID for trapigrType
- the type to removejava.util.NoSuchElementException
- if the type is not in the listpublic boolean removeTrapInform(java.lang.String szOID) throws java.util.NoSuchElementException
szOID
- enterprise OID for trapjava.util.NoSuchElementException
- if the type is not in the listpublic void removeTrapsInforms()
public java.lang.Integer[] listTrapInformTypes(java.lang.String szOID)
szOID
- enterprise OID for trappublic java.lang.String[] listTrapInformOIDs()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Home Services Products Purchase Contact Us About Us Legal Ceramics
Copyright © 2003-2008 jSNMP Enterprises All rights reserved.