public class NotificationReceiver extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
destroyNotificationReceiver() |
HashMap<InetAddress,ConfKey> |
getKnownIPAddresses()
Returns the set of snmp peer ip addresses
for registered managed devices.
|
static NotificationReceiver |
getNotificationReceiver()
Factory method to get a NotificationReceiver instance.
|
static NotificationReceiver |
getNotificationReceiver(String host,
int port)
Factory method to get a NotificationReceiver instance.
|
ArrayList<NotifHandlerInstance> |
getRegisteredNotificationHandlers()
Get a copy of the registered chain of NotificationHandlerInstances
An NotificationHandlerInstance is an NotificationHandler together
with its registered opaque object.
|
boolean |
isEnabled()
Check it the NotificationReceiver is enabled
This flag is controlled by the NCS configuration
|
boolean |
isStarted()
Check it the NotificationReceiver has started
|
void |
register(ArrayList<NotifHandlerInstance> handlerChain)
This register method takes an ArrayList of NotificationHandlerInstances
and registers these.
|
void |
register(NotificationHandler responder,
Object opaque)
This method is used to register handler callback classes to the
notification receiver.
|
void |
start()
This method is called to start subscription on notifications
|
void |
stop()
This method is called to stop subscription on notifications
|
public HashMap<InetAddress,ConfKey> getKnownIPAddresses()
public void register(NotificationHandler responder, Object opaque) throws NcsException
responder - - handler class to process notificationsopaque - - object to pass to the handler at executionNcsExceptionpublic void register(ArrayList<NotifHandlerInstance> handlerChain) throws NcsException
handlerChain - NcsExceptionpublic ArrayList<NotifHandlerInstance> getRegisteredNotificationHandlers()
public void start()
throws IOException
IOExceptionpublic void stop()
throws IOException
IOExceptionpublic boolean isStarted()
public boolean isEnabled()
public static NotificationReceiver getNotificationReceiver(String host, int port) throws NcsException
host - hostname for the NCS serverport - port number for the NCS serverNcsExceptionpublic static NotificationReceiver getNotificationReceiver() throws NcsException
NcsExceptionpublic static void destroyNotificationReceiver()