"WEBNMS 6.0 API Docs"

com.adventnet.nms.fe.event
Class EventSessionBean

java.lang.Object
  extended by com.adventnet.nms.fe.common.CustomSessionBean
      extended by com.adventnet.nms.fe.event.EventSessionBean
All Implemented Interfaces:
SessionNarrowerInterface

public class EventSessionBean
extends CustomSessionBean

This holds the reference of ThinEventAPI which in turn acts as a wrapper for EventAPI and acts as a bridget for contacting BE Server Also as it extends CustomSessionBean, the customview related operations are also taken care.

Since:
Web NMS 2.3
Version:
1.0
See Also:
CustomSessionBean

Field Summary
 
Fields inherited from class com.adventnet.nms.fe.common.CustomSessionBean
apihandle, cvScopeAPI, cvu, dbUtility, jdbcapi, latest, logapi, module, tableName
 
Constructor Summary
EventSessionBean()
          default constructor called while bean instantiation
 
Method Summary
 int getCleanEventInterval(java.lang.String userName)
          This method gets the CLEAN_EVENT_INTERVAL value in days
protected  java.util.Properties getDefaultPanelProps()
          Returns default Panel Properties that can be used for createCustomView & modifyCustomView.
 int getEventWindowSize(java.lang.String userName)
          To get the Event Window size configured in WebNMS.
protected  java.lang.String getModuleName()
          Gets module of the extending class.
 java.util.Vector getObjects(java.lang.String userName, java.lang.String classname, java.util.Properties match)
          Get the Vector of objects matching the given properties.
 int getTotalEventCount(java.lang.String userName)
          Returns the total number of Events in the WebNMS system.
 int[] getTrapPort(java.lang.String userName)
          Returns the port numbers on which EventMgr is listening for traps.
 void setAPI(CommonAPI obj)
          session narrowerinterface impl method for setting the api to be used for the bean.
 void setCleanEventInterval(java.lang.String userName, int CLEAN_EVENT_INTERVAL)
          This method sets the CLEAN_EVENT_INTERVAL value
 void setConnection(java.sql.Connection con)
          setConnection method uses the connection and to create instances for CustomViewUtility and DBXmlUtility.
 
Methods inherited from class com.adventnet.nms.fe.common.CustomSessionBean
createCustomView, createCustomView, error, getAllViewIDsAndProps, getAllViewIDsAndProps, getCannedData, getCriteriaProps, getData, getInstance, getLatest, getObjectNamesWithProps, getPropertiesOfObject, getTableColumnsArr, getTotalCount, getTotalCount, getTotalCount, getViewProperties, log, modifyCustomView, removeCustomView, renameCustomView, saveViewState, setCustomViewScopeAPI, setJdbcAPI, setLogAPI, setSeverityAPI, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventSessionBean

public EventSessionBean()
default constructor called while bean instantiation

Method Detail

setConnection

public void setConnection(java.sql.Connection con)
setConnection method uses the connection and to create instances for CustomViewUtility and DBXmlUtility.

Parameters:
con - a Connection value

getModuleName

protected java.lang.String getModuleName()
Gets module of the extending class.

Specified by:
getModuleName in class CustomSessionBean
Returns:
module name

getDefaultPanelProps

protected java.util.Properties getDefaultPanelProps()
Returns default Panel Properties that can be used for createCustomView & modifyCustomView.

Specified by:
getDefaultPanelProps in class CustomSessionBean
Returns:
default panel properties

setAPI

public void setAPI(CommonAPI obj)
session narrowerinterface impl method for setting the api to be used for the bean. Not used in EJB mode. because these api's are looked up via JNDI.

Specified by:
setAPI in interface SessionNarrowerInterface
Overrides:
setAPI in class CustomSessionBean
Parameters:
obj - a CommonAPI instance to be used by this Session Bean.

getTrapPort

public int[] getTrapPort(java.lang.String userName)
                  throws java.rmi.RemoteException
Returns the port numbers on which EventMgr is listening for traps.

Throws:
java.rmi.RemoteException

getCleanEventInterval

public int getCleanEventInterval(java.lang.String userName)
                          throws java.rmi.RemoteException
This method gets the CLEAN_EVENT_INTERVAL value in days

Throws:
java.rmi.RemoteException

setCleanEventInterval

public void setCleanEventInterval(java.lang.String userName,
                                  int CLEAN_EVENT_INTERVAL)
                           throws java.rmi.RemoteException
This method sets the CLEAN_EVENT_INTERVAL value

Throws:
java.rmi.RemoteException

getTotalEventCount

public int getTotalEventCount(java.lang.String userName)
                       throws java.rmi.RemoteException
Returns the total number of Events in the WebNMS system. The total number of events can vary with time because events older than a specified time are deleted. This is set as a parameter "CLEAN_EVENTS_INTERVAL" to EventMgr in processSmall_begin.conf_SERIALIZE_BE/processSmall_begin.conf_RDBMS_BE. It is to be noted that the total number of events has a higher limit which is configurable. This is set as a parameter "EVENT_WINDOW_SIZE" to EventMgr. Once the number of events exceeds this limit, the old events are deleted. So, although the total number of events may not change because of this, the events in the WebNMS system change.

Throws:
java.rmi.RemoteException

getObjects

public java.util.Vector getObjects(java.lang.String userName,
                                   java.lang.String classname,
                                   java.util.Properties match)
                            throws java.rmi.RemoteException
Get the Vector of objects matching the given properties. The classname is the name of the class the objects belong to. This call can be used only if the object's properties are stored in an RDBMS. It is also assumed that one object is stored in only one table. If one object is stored in multiple tables, then only partial object will be returned.

Throws:
java.rmi.RemoteException

getEventWindowSize

public int getEventWindowSize(java.lang.String userName)
                       throws java.rmi.RemoteException,
                              NmsStorageException
To get the Event Window size configured in WebNMS.

Returns:
int - The Event Window size configured in WebNMS.
Throws:
java.rmi.RemoteException
NmsStorageException

"WEBNMS 6.0 API Docs"

Copyright © 2018 ZOHO Corp., All Rights Reserved.