|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--javax.swing.JPanel
|
+--com.adventnet.snmp.ui.TrapViewer
This class receives, filters and displays the received traps. Set the port number to listen for traps on the specified port. Also set the parser file name to filter the incoming traps. If the parser file is not specified, default parser file will be created to allow all the traps received on the port.
| Nested Class Summary |
| Nested classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
| Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary |
| Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
TrapViewer()
Constructor for applications |
|
TrapViewer(java.applet.Applet applet)
Constructor for applets |
|
| Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
|
void |
eventParsed(ParsedTrapEvent e)
this should be implemented for TrapParserListener.The TrapBrowser gets ParsedTrapEvent and dispalyes it in TrapBrowser Table. |
protected void |
finalize()
this cleans up if no one using |
java.lang.String |
getAuthPassword()
get AuthPassword |
int |
getAuthProtocol()
get AuthProtocol |
java.lang.String |
getCharacterEncoding()
Get the Character Encoding being used. |
java.lang.String |
getCommunity()
get the community string |
java.lang.String |
getContextID()
get the SNMP V3 contextID |
java.lang.String |
getContextName()
get the SNMP V3 Context name |
java.lang.String |
getFileName()
get the loaded parser file |
java.lang.String[] |
getLocalAddresses()
get the local addresses |
java.lang.String |
getMibModules()
get the loaded mibs |
int |
getPort()
get the listening SNMP port number |
java.lang.String |
getPrincipal()
get Principal ie userName |
java.lang.String |
getPrivPassword()
get PrivPassword |
int |
getSnmpVersion()
get the SNMP Version |
void |
receivedTrap(TrapEvent e)
this should be implemented for TrapListener.The TrapParserBean gets trapEvent and parses it and generates ParsedTrapEvent if it matches the Match Criteria in Trap parser file. |
void |
setAuthPassword(java.lang.String password)
set AuthPassword |
void |
setAuthProtocol(int protocol)
set AuthProtocol |
void |
setCharacterEncoding(java.lang.String enc)
Set the Character Encoding to be used. |
void |
setCommunity(java.lang.String community)
set the community string |
void |
setContextID(byte[] ctxtID)
set the SNMP V3 contextID |
void |
setContextName(java.lang.String cName)
set the SNMP V3 Context name |
void |
setFileName(java.lang.String fileName)
set the parser file to be parsed. |
void |
setLocalAddresses(java.lang.String[] addresses)
set the local addresses to listen on |
void |
setMibModules(java.lang.String mibs)
set the mibs to be loaded |
void |
setPort(int port)
set the local SNMP port number to listen on. |
void |
setPrincipal(java.lang.String userName)
set Principal ie userName |
void |
setPrivPassword(java.lang.String password)
set PrivPassword |
void |
setSnmpVersion(int version)
set the SNMP Version |
void |
setTrapAuthEnable(boolean isAuth)
Specify whether traps should be authenticated while receiving
SNMPV3 trap messages. |
void |
stop()
Stops all the TrapReceivers listening for traps. |
| Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public TrapViewer()
public TrapViewer(java.applet.Applet applet)
| Method Detail |
public int getSnmpVersion()
get the SNMP Version
public void setSnmpVersion(int version)
set the SNMP Version
public java.lang.String[] getLocalAddresses()
public void setLocalAddresses(java.lang.String[] addresses)
public void setPort(int port)
throws SnmpException
java.lang.Throwable - if the port set is <= 0
SnmpExceptionpublic int getPort()
public void setCommunity(java.lang.String community)
public java.lang.String getCommunity()
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 java.lang.String getContextName()
get the SNMP V3 Context name
public void setContextName(java.lang.String cName)
set the SNMP V3 Context name
public java.lang.String getContextID()
get the SNMP V3 contextID
public void setContextID(byte[] ctxtID)
set the SNMP V3 contextID
public java.lang.String getPrincipal()
get Principal ie userName
public void setPrincipal(java.lang.String userName)
set Principal ie userName
public int getAuthProtocol()
get AuthProtocol
public void setAuthProtocol(int protocol)
set AuthProtocol
public java.lang.String getAuthPassword()
get AuthPassword
public void setAuthPassword(java.lang.String password)
set AuthPassword
public java.lang.String getPrivPassword()
get PrivPassword
public void setPrivPassword(java.lang.String password)
set PrivPassword
public void setMibModules(java.lang.String mibs)
public java.lang.String getMibModules()
public void setFileName(java.lang.String fileName)
public java.lang.String getFileName()
public void receivedTrap(TrapEvent e)
receivedTrap in interface TrapListenerpublic void eventParsed(ParsedTrapEvent e)
eventParsed in interface TrapParserListenerpublic void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenerpublic void stop()
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable - in case of finalization errorspublic void setTrapAuthEnable(boolean isAuth)
Specify whether traps should be authenticated while receiving
SNMPV3 trap messages. Default value is false.
isAuth - Set this to true if traps should be authenticated
while receiving SNMPV3 trap messages. False otherwise.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||