WebNMS 5 API Specification

com.adventnet.management
Interface MSEventListener


public interface MSEventListener

This is the interface to be implemented to by the client user application to recieve Event notifications from the device.
User applications must register the interface implementation (say testEventListenerImpl) while registering for event notification using the Property.setComponent() method. The application should register a Property request with the ManagementServer for recieving Event notifications using ,
ManagementServices.registerForNotification(Property)
Following exmaple code snippet demonstrates how this can be accomplished.

// Set up the Property for registering a request for receiving Events. SnmpProperty property = new SnmpProperty(); // Set the event related parameters on the Protocol Property property.setTargetHost ("localhost"); property.setTargetPort (9000) ; The object which implements this interface has to be specified using Property.setComponent(Object) property.setComponent(testEventListenerImpl); // Register the request for receiving Event Notifications. String eventId= ms.registerForNotification(property);


Method Summary
 void setEventResult(Property property, java.lang.Object event)
          This method is used by the User Client Applications to be notified of Events.
 

Method Detail

setEventResult

public void setEventResult(Property property,
                           java.lang.Object event)
This method is used by the User Client Applications to be notified of Events.
Parameters:
property - - Property instance used in registerForNotification.
event - - Event object . Currently the event object types returned are subclasses of the generic event Event implemented by the corresponding Protocol Providers.

WebNMS 5 API Specification