AdventNet Web NMS 4 API Specification

com.adventnet.nms.eventdb.trapstore
Interface TrapStoreIfc


public interface TrapStoreIfc


Method Summary
 void close()
          This method will be invoked when no more trap should be received in the port 'portNo', specified while opening the socket.
 java.lang.Object getTheTrapPDU()
          This method will be called by the AdventNet WebNMS Trap -> Event Engine inorder to process the Next PDU.
 boolean init(int portNo)
          This method is used for initializing the trapReceiver with the trap port number.
 void shutDown()
          This method is used for the purpose of notifying shutdown of NMS.
 

Method Detail

init

public boolean init(int portNo)
This method is used for initializing the trapReceiver with the trap port number. Here you could initialize your socket to receive the traps. Following the call to this init() method the thread would be started where you could listen on the port for traps. Based on the return value from this method the Thread will be started. So, this method should return 'true' if initialization of socket and its binding to port is proper. And could return 'false' in case some housekeeping jobs fail. Returning 'false' would prevent the thread from being started.
Parameters:
portNo - at which the trapReceiver is to be started. Which would supplied as an argument to EventMgr in trapport.conf's and the default trap_port is 162.

getTheTrapPDU

public java.lang.Object getTheTrapPDU()
This method will be called by the AdventNet WebNMS Trap -> Event Engine inorder to process the Next PDU. If the User has the Next PDU ready he can return it or else he could wait for some time and return the PDU when it arrives or even can return a null when it is not ready with some PDU which he would like to convert into an Event.

close

public void close()
This method will be invoked when no more trap should be received in the port 'portNo', specified while opening the socket. NMS will invoke this method while shutting down the Server.

shutDown

public void shutDown()
This method is used for the purpose of notifying shutdown of NMS.

AdventNet Web NMS 4 API Specification