|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.snmp4j.agent.mo.snmp.NotificationOriginatorImpl
public class NotificationOriginatorImpl
The NotificationOriginatorImpl class implements a notification
originator application for SNMP4J.
See also RFC 3411 for a description of notification originators.
| Constructor Summary | |
|---|---|
NotificationOriginatorImpl(org.snmp4j.Session session,
VACM vacm,
SysUpTime sysUpTime,
SnmpTargetMIB targetMIB,
SnmpNotificationMIB notificationMIB)
Creates a notification originator. |
|
NotificationOriginatorImpl(org.snmp4j.Session session,
VACM vacm,
SysUpTime sysUpTime,
SnmpTargetMIB targetMIB,
SnmpNotificationMIB notificationMIB,
SnmpCommunityMIB communityMIB)
Creates a notification originator. |
|
| Method Summary | |
|---|---|
void |
addNotificationLogListener(NotificationLogListener l)
|
protected void |
fireNotificationLogEvent(NotificationLogEvent event)
|
java.lang.Object |
notify(org.snmp4j.smi.OctetString context,
org.snmp4j.smi.OID notificationID,
org.snmp4j.smi.TimeTicks sysUpTime,
org.snmp4j.smi.VariableBinding[] vbs)
Sends notifications (traps) to all appropriate notification targets. |
java.lang.Object |
notify(org.snmp4j.smi.OctetString context,
org.snmp4j.smi.OID notificationID,
org.snmp4j.smi.VariableBinding[] vbs)
Sends notifications (traps) to all appropriate notification targets. |
void |
removeNotificationLogListener(NotificationLogListener l)
|
protected void |
setContextEngineID(org.snmp4j.ScopedPDU scopedPDU,
org.snmp4j.smi.OctetString context,
org.snmp4j.smi.OID notificationID)
Sets the context engine ID of the scoped PDU to the local engine ID provided by the targetMIB member. |
void |
setSession(org.snmp4j.Session snmpSession)
Sets the SNMP session to used by this notification originator for sending notifications. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NotificationOriginatorImpl(org.snmp4j.Session session,
VACM vacm,
SysUpTime sysUpTime,
SnmpTargetMIB targetMIB,
SnmpNotificationMIB notificationMIB)
session - the SNMP Session instance to be used to send the notifications/informs.vacm - the VACM to be used to check access for notifications.sysUpTime - the sysUpTime instance to be used to determine sysUpTime.0 when
sending notifications without specifically specified sysUpTime.targetMIB - the SnmpTargetMIB containing notification target information.notificationMIB - SnmpNotificationMIB
public NotificationOriginatorImpl(org.snmp4j.Session session,
VACM vacm,
SysUpTime sysUpTime,
SnmpTargetMIB targetMIB,
SnmpNotificationMIB notificationMIB,
SnmpCommunityMIB communityMIB)
session - the Snmp instance to be used to send the notifications/informs.vacm - the VACM to be used to check access for notifications.sysUpTime - the sysUpTime instance to be used to determine sysUpTime.0 when
sending notifications without specifically specified sysUpTime.targetMIB - the SnmpTargetMIB containing notification target information.notificationMIB - the SnmpNotificationMIB containing notification filtering information.communityMIB - the community MIB for coexistence information.| Method Detail |
|---|
public java.lang.Object notify(org.snmp4j.smi.OctetString context,
org.snmp4j.smi.OID notificationID,
org.snmp4j.smi.VariableBinding[] vbs)
notify in interface NotificationOriginatorcontext - the context name of the context on whose behalf this
notification has been generated.notificationID - the object ID that uniquely identifies this
notification. For SNMPv1 traps, the notification ID has to be build
using the rules provided by RFC 2576.vbs - an array of VariableBinding instances
representing the payload of the notification.
NotificationOriginator determines on behalf of the
SNMP-NOTIFICTON-MIB contents whether a notification is sent as
trap/notification or as inform request, the returned array contains an
element for each addressed target, but only a response PDU for inform
targets.
protected void setContextEngineID(org.snmp4j.ScopedPDU scopedPDU,
org.snmp4j.smi.OctetString context,
org.snmp4j.smi.OID notificationID)
targetMIB member.
scopedPDU - the scopedPDU to modify.context - the context associated with the notification/inform PDU.notificationID - the notification ID of the notification/inform PDU.
public java.lang.Object notify(org.snmp4j.smi.OctetString context,
org.snmp4j.smi.OID notificationID,
org.snmp4j.smi.TimeTicks sysUpTime,
org.snmp4j.smi.VariableBinding[] vbs)
NotificationOriginator
notify in interface NotificationOriginatorcontext - the context name of the context on whose behalf this notification has
been generated.notificationID - the object ID that uniquely identifies this notification. For SNMPv1
traps, the notification ID has to be build using the rules provided
by RFC 2576.sysUpTime - the value of the sysUpTime for the context context. This
value will be included in the generated notification as
sysUpTime.0.vbs - an array of VariableBinding instances representing the
payload of the notification.
NotificationOriginator determines on behalf of the
SNMP-NOTIFICTON-MIB contents whether a notification is sent as
trap/notification or as inform request, the returned array contains
an element for each addressed target, but only a response PDU for
inform targets.public void setSession(org.snmp4j.Session snmpSession)
snmpSession - the Snmp instance to be used to send the notifications/informs.public void addNotificationLogListener(NotificationLogListener l)
public void removeNotificationLogListener(NotificationLogListener l)
protected void fireNotificationLogEvent(NotificationLogEvent event)
|
Copyright 2005-2010 Frank Fock (SNMP4J.org) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||