|
||||||||||
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. |
protected void |
finalize()
This cleans up the connection if no one is using. |
java.lang.String |
getAuthPassword()
![]() |
int |
getAuthProtocol()
![]() |
java.lang.String |
getCharacterEncoding()
Gets the Character Encoding being used. |
java.lang.String |
getCommunity()
Gets the community string. |
java.lang.String |
getConfDir()
Gets the directory where conf files will be saved in. |
java.lang.String |
getContextID()
![]() |
java.lang.String |
getContextName()
![]() |
java.lang.String |
getFileName()
Gets the loaded parser file. |
java.lang.String[] |
getLocalAddresses()
Gets the local addresses. |
java.lang.String |
getMibModules()
Gets the loaded mibs. |
int |
getPort()
Gets the listening SNMP port number. |
java.lang.String |
getPrincipal()
![]() |
java.lang.String |
getPrivPassword()
![]() |
int |
getSnmpVersion()
![]() |
void |
receivedTrap(TrapEvent e)
This should be implemented for TrapListener. |
void |
setAuthPassword(java.lang.String password)
![]() |
void |
setAuthProtocol(int protocol)
![]() |
void |
setCharacterEncoding(java.lang.String enc)
Sets the Character Encoding to be used. |
void |
setCommunity(java.lang.String community)
Sets the community string. |
void |
setConfDir(java.lang.String dir)
Sets the directory where conf files will be saved in. |
void |
setContextID(byte[] ctxtID)
![]() |
void |
setContextName(java.lang.String cName)
![]() |
void |
setFileName(java.lang.String fileName)
Sets the parser file to be used for parsing incoming traps. |
void |
setLocalAddresses(java.lang.String[] addresses)
Sets the local addresses to listen on. |
void |
setMibModules(java.lang.String mibs)
Set the mibs to be loaded. |
void |
setPort(int port)
Sets the local SNMP port number to listen on. |
void |
setPrincipal(java.lang.String userName)
![]() |
void |
setPrivPassword(java.lang.String password)
![]() |
void |
setSnmpVersion(int version)
![]() |
void |
setTrapAuthEnable(boolean isAuth)
![]() |
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()
public void setSnmpVersion(int 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
SnmpException
public 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()
public void setContextName(java.lang.String cName)
public java.lang.String getContextID()
public void setContextID(byte[] ctxtID)
public java.lang.String getPrincipal()
public void setPrincipal(java.lang.String userName)
public int getAuthProtocol()
public void setAuthProtocol(int protocol)
public java.lang.String getAuthPassword()
public void setAuthPassword(java.lang.String password)
public java.lang.String getPrivPassword()
public void setPrivPassword(java.lang.String password)
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 TrapListener
public void eventParsed(ParsedTrapEvent e)
eventParsed
in interface TrapParserListener
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public void stop()
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
- in case of finalization errorspublic void setTrapAuthEnable(boolean isAuth)
isAuth
- Set this to true if traps should be authenticated. False otherwise.public void setConfDir(java.lang.String dir)
public java.lang.String getConfDir()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |