com.adventnet.services.proxy
Class TrapListenerAndForwarder
java.lang.Object
|
+--javax.management.NotificationBroadcasterSupport
|
+--com.adventnet.services.proxy.TrapListenerAndForwarder
- public class TrapListenerAndForwarder
- extends NotificationBroadcasterSupport
- implements SnmpClient
| Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
seq
long seq
mbeanObject
ObjectName mbeanObject
minfo
ModelMBeanInfo minfo
indexNames
java.lang.String[] indexNames
mBeanAttrInfo
MBeanAttributeInfo[] mBeanAttrInfo
modelMBeanAttrInfo
ModelMBeanAttributeInfo[] modelMBeanAttrInfo
tabular
boolean tabular
count
int count
indexVal
java.lang.Object[] indexVal
TrapListenerAndForwarder
public TrapListenerAndForwarder()
TrapListenerAndForwarder
public TrapListenerAndForwarder(JmxProxy proxy,
MBeanServer server,
int port)
getServer
public MBeanServer getServer()
setMBeanServer
public void setMBeanServer()
setUserDataForNotification
public void setUserDataForNotification(Notification notification)
- This method creates and sets the UserData Object for the
Notification.
The UserData will be a List of Hashtables.
authenticate
public boolean authenticate(SnmpPDU pdu,
java.lang.String community)
- Description copied from interface: SnmpClient
- This function needs to be supplied by the user of the
API to add authentication. If not, no authentication will be done.
If this method returns false, a message will be printed to Standard
Error Output and the PDU will be dropped at the receiver end.
- Specified by:
- authenticate in interface SnmpClient
callback
public boolean callback(SnmpSession session,
SnmpPDU pdu,
int requestID)
- Description copied from interface: SnmpClient
- This function needs to be supplied by the user of the
API to use callbacks. If not, a null callback in SnmpAPI class
will be used. If it returns true, no further processing will
be done at the receiver, e.g. won't be in response queue.
In case of multiple calbacks, if any of them returns true
no further processing on PDU will occur. Callback on a client
gets invoked only if the client authenticate returns true.
- Specified by:
- callback in interface SnmpClient
debugPrint
public void debugPrint(java.lang.String debug)
- Description copied from interface: SnmpClient
- This function needs to be supplied by the user of the
API to obtain a means of manipulating debugging output.
If not, the debugging output will be printed to stdout
in SnmpAPI class. System.err.println will still be
used for errors in either case.
- Specified by:
- debugPrint in interface SnmpClient
getAttributeName
public java.lang.String getAttributeName(java.lang.String oid)
storeUserData
public void storeUserData(Notification notif)
getAttributeDetails
public java.util.Hashtable getAttributeDetails(java.lang.String snmpOid)
convertInstToObjectArray
public java.lang.Object[] convertInstToObjectArray(int[] inst)
stop
public void stop()
- Method to close the API and Session instantiated by this ListenerAndForwarder.
Idealy stops this TrapListenerAndForwarder.