Class sfclasses.Notification
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sfclasses.Notification

java.lang.Object
   |
   +----sfclasses.Notification

public class Notification
extends Object
implements Persistent
This class implements notification levels. An object of this class holds all information about level. The static parts of the class take care of the level vectors and of static levels. Static levels are stored in the vector staticLevels and are inserted into that vector in a static initializer. Dynamic levels are stored in a vector in the ManageDomain class.

Variable Index

 o firstDynamic
 o levelName
 o levelNumber
 o levelText
 o STATIC_CHECKATTACK
 o STATIC_CHECKSATAN
 o STATIC_CHKPORTSCAN
 o STATIC_ICMP
 o STATIC_IDENT
 o STATIC_LOGATTACK
 o STATIC_OUTGOING
 o STATIC_OVERLOAD
 o STATIC_PING
 o STATIC_SERVER
 o STATIC_SOURCEROUTE
 o STATIC_TRACEROUTE
 o staticLevels

Constructor Index

 o Notification()
Initialize empty level.
 o Notification(int)
Initialize level.

Method Index

 o constructList(List, Vector)
 o constructList(List, Vector, int)
 o edit(Refreshable, Frame, ManageDomain, boolean)
Open a dialog to edit the notification level.
 o getLevel(int, Vector)
 o getLevel(String, Vector)
 o printAllLevels(PrintStream, Vector)
 o printLevel(PrintStream)
Print the notification level in configuration file format
 o read(PersistentInputStream)
Read object data from a persistent input stream
 o staticLevel(int)
 o staticLevel(String)
 o write(PersistentOutputStream)
Write object data to a persistent output stream

Variables

 o levelText
  protected String levelText
 o levelNumber
  protected int levelNumber
 o levelName
  protected String levelName
 o STATIC_SOURCEROUTE
  public final static int STATIC_SOURCEROUTE
 o STATIC_SERVER
  public final static int STATIC_SERVER
 o STATIC_IDENT
  public final static int STATIC_IDENT
 o STATIC_TRACEROUTE
  public final static int STATIC_TRACEROUTE
 o STATIC_OUTGOING
  public final static int STATIC_OUTGOING
 o STATIC_PING
  public final static int STATIC_PING
 o STATIC_ICMP
  public final static int STATIC_ICMP
 o STATIC_OVERLOAD
  public final static int STATIC_OVERLOAD
 o STATIC_CHKPORTSCAN
  public final static int STATIC_CHKPORTSCAN
 o STATIC_CHECKSATAN
  public final static int STATIC_CHECKSATAN
 o STATIC_LOGATTACK
  public final static int STATIC_LOGATTACK
 o STATIC_CHECKATTACK
  public final static int STATIC_CHECKATTACK
 o staticLevels
  public static Vector staticLevels
 o firstDynamic
  public final static int firstDynamic

Constructors

 o Notification
  protected Notification()
Initialize empty level. This is used when loading data from a persistent input stream.
 o Notification
  public Notification(int number)
Initialize level.
Parameters:
number - Level number

Methods

 o edit
  public void edit(Refreshable co,
                   Frame p,
                   ManageDomain md,
                   boolean newLevel)
Open a dialog to edit the notification level.
Parameters:
co - Calling object, will be notified when the edit dialog is closed.
p - Parent frame
md - ManageDomain object holding the configuration data
newLevel - The level is being created and not changed. If the user cancels the operation, the level will be deleted from the vector.
See Also:
Refreshable
 o printLevel
  public void printLevel(PrintStream ps)
Print the notification level in configuration file format
Parameters:
ps - PrintStream to write the output to
 o write
  public void write(PersistentOutputStream ps)
Write object data to a persistent output stream
Parameters:
ps - Stream
See Also:
PersistentOutputStream
 o read
  public void read(PersistentInputStream ps) throws IOException
Read object data from a persistent input stream
Parameters:
ps - Stream
See Also:
PersistentInputStream
 o staticLevel
  public static Notification staticLevel(int number)
Parameters:
number - number of notification level
Returns:
notification level
 o staticLevel
  public static Notification staticLevel(String name)
Parameters:
name - name of notification level
Returns:
notification level
 o getLevel
  public static Notification getLevel(String name,
                                      Vector dynLevels)
 o getLevel
  public static Notification getLevel(int number,
                                      Vector dynLevels)
 o constructList
  public static void constructList(List l,
                                   Vector dynLevels,
                                   int levelnum)
 o constructList
  public static void constructList(List l,
                                   Vector dynLevels)
 o printAllLevels
  public static void printAllLevels(PrintStream ps,
                                    Vector dynLevels)

All Packages  Class Hierarchy  This Package  Previous  Next  Index