|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.adventnet.snmp.ui.TrapParserBean
Filters traps according to the Trap Parser File. This class checks if the trap received has the same match criteria defined in the parser file.
The Trap parser file contains the match criteria and the output events to be displayed when the trap is matched. A parser file can contain more than one trap parser criteria. The match criteria in a parser determine whether a specific trap matches a trap parser. The search for matching any one of the trap parsers is done from the trap parsers list starting at the top. Once a matching trap parser is found, an event is generated and no other trap parsers will be used on that trap. The Trap Parser Bean gets trap event from Snmp Trap Receiver. When a trap matchs any one of the match criteria defined in the parser file, a ParsedTrapEvent is generated by this component.
Constructor Summary | |
TrapParserBean()
Instantiates the bean. |
|
TrapParserBean(java.applet.Applet a)
Instantiates the bean with the applet. |
Method Summary | |
void |
addParserListener(TrapParserListener listener)
Adds the specified TrapParserListener object to receive ParsedTrapEvents from this bean |
boolean |
checkForAgentMatch(com.adventnet.snmp.ui.TrapParser tp,
SnmpPDU pdu)
|
protected void |
fileWrite(java.lang.String fileName)
|
java.util.Vector |
getAllParsers()
|
java.lang.String |
getCharacterEncoding()
Gets the Character Encoding being used. |
java.util.Vector |
getEditParser()
Gets the details required for Custom Trap Editor Bean. |
java.lang.String |
getFileName()
Gets the filename parser file name |
MibOperations |
getMibOperations()
Gets the MibOperations object. |
java.util.Vector |
getParserContentsVec(java.util.Properties p)
|
java.lang.String[] |
getParserName()
Gets names of the parsers in the loaded TrapParser file |
void |
initJdbcParams(java.lang.String driverName,
java.lang.String URL,
java.lang.String userName,
java.lang.String passWord)
If you need to use database support for mibs, this method should be invoked to initialize the Jdbc Parameters. |
boolean |
isLoadMibsFromDatabase()
Returns whether mib will be loaded from database or not. |
boolean |
isOverwriteMibsInDatabase()
Returns whether mibs in database will be overwritten or not. |
boolean |
isParserLoaded()
Determines if the parser file is loaded or not. |
void |
loadDefinedTraps()
load the traps defined in the loaded mibs |
boolean |
loadParsers(java.lang.String file)
To load the parsers from a file/URL. |
void |
loadParsersFromMib(java.lang.String mibs)
Load the traps defined in the mib file. |
boolean |
parseEvtAndFire(TrapEvent evt)
this takes TrapEvent and generates ParsedTrapEvent |
void |
removeParserListener(TrapParserListener listener)
Removes the TrapParserListener object for ParsedTrapEvents from this bean |
void |
setCharacterEncoding(java.lang.String enc)
Set the Character Encoding to be used. |
void |
setEditParser(java.lang.Object o)
Sets the details required for Custom Trap Editor Bean. |
void |
setFileName(java.lang.String fileName)
Set the filename which contains the set of parser details. |
void |
setLoadMibsFromDatabase(boolean flag)
Defines whether to load mib from DataBase. |
void |
setMibOperations(MibOperations mibOperations)
Sets MibOperations object. |
void |
setOverwriteMibsInDatabase(boolean overWrite)
Defines whether to overwrite the MIB in the DataBase. |
void |
setParserName(java.lang.String[] str)
Sets the name of the parsers in the Trap Parser file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TrapParserBean()
public TrapParserBean(java.applet.Applet a)
Method Detail |
public void addParserListener(TrapParserListener listener)
public void removeParserListener(TrapParserListener listener)
public java.lang.String getFileName()
public void setFileName(java.lang.String fileName)
public java.lang.String[] getParserName()
public void setParserName(java.lang.String[] str)
public java.util.Vector getEditParser()
public java.util.Vector getAllParsers()
public void setEditParser(java.lang.Object o)
protected void fileWrite(java.lang.String fileName)
public java.util.Vector getParserContentsVec(java.util.Properties p)
public boolean isParserLoaded()
public boolean loadParsers(java.lang.String file)
public MibOperations getMibOperations()
public void setMibOperations(MibOperations mibOperations)
public void setCharacterEncoding(java.lang.String enc)
enc
- The name of a character encoding. All the string encoding
will be done base on this encoding.public java.lang.String getCharacterEncoding()
public void loadParsersFromMib(java.lang.String mibs)
public void initJdbcParams(java.lang.String driverName, java.lang.String URL, java.lang.String userName, java.lang.String passWord)
URL
- URL pointing to the DataBase file nameuserName
- userNamepassWord
- passwordpublic void setLoadMibsFromDatabase(boolean flag)
flag
- booleaninitJdbcParams(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
public void setOverwriteMibsInDatabase(boolean overWrite)
public boolean isOverwriteMibsInDatabase()
public boolean isLoadMibsFromDatabase()
public void loadDefinedTraps()
public boolean parseEvtAndFire(TrapEvent evt)
public boolean checkForAgentMatch(com.adventnet.snmp.ui.TrapParser tp, SnmpPDU pdu)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |