SSF.OS.BGP4
Class Debug

java.lang.Object
  |
  +--SSF.OS.BGP4.Debug

public class Debug
extends java.lang.Object

Encapsulates and manages some debugging information and methods which are specific to BGP.


Field Summary
static IPaddress bogusip
          An IP address used for testing/debugging.
 
Method Summary
 void affirm(boolean b)
           
 void affirm(boolean b, java.lang.String s)
           
 void affirm(boolean b, java.lang.String s, boolean showtime)
          Each of the variations of affirm and gaffirm assert the truth of the given boolean, and print out a message if it is false.
 void err(java.lang.String str)
          Reports a BGP-related error.
 void except(java.lang.String str)
          Reports a BGP-related exception.
static void gaffirm(boolean b)
           
static void gaffirm(boolean b, java.lang.String s)
           
static void gerr(java.lang.String str)
          A generic function for reporting BGP-related errors which are not associated with a particular BGP speaker.
static void gexcept(java.lang.String str)
          Reports a BGP-related exception which is not associated with any particular BGP speaker.
static void gmsg(java.lang.String str)
          Prints a generic BGP debugging message in the standardized format.
static void gwarn(java.lang.String str)
          A generic function for reporting BGP-related warnings which are not associated with a particular BGP speaker.
 java.lang.String hdr()
          Constructs a standardized output format prefix.
 java.lang.String hdr(boolean showtime)
          Constructs a standardized output format prefix, optionally omitting current simulation time.
static java.lang.String hdr(java.lang.String nh, double time)
          Constructs a standardized output format prefix, optionally omitting current simulation time.
 void msg(java.lang.String str)
          Prints a debugging message in the standardized format.
 void valid(int testnum, int msgnum)
          Each of the variations of valid handle printing messages associated with specific BGP validation tests.
 void valid(int testnum, int msgnum, java.lang.Object o)
           
 void warn(java.lang.String s)
          Reports a BGP-related warning.
 void warn(java.lang.String s, boolean showtime)
          Reports a BGP-related warning, optionally omitting current simulation time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bogusip

public static final IPaddress bogusip
An IP address used for testing/debugging.

Method Detail

hdr

public final java.lang.String hdr()
Constructs a standardized output format prefix.

Returns:
the standardized output prefix as a String

hdr

public final java.lang.String hdr(boolean showtime)
Constructs a standardized output format prefix, optionally omitting current simulation time. Feature for omitting time is useful for messages during configuration or initialization.

Returns:
the standardized output prefix as a string

hdr

public static final java.lang.String hdr(java.lang.String nh,
                                         double time)
Constructs a standardized output format prefix, optionally omitting current simulation time. Feature for omitting time is useful for messages during configuration or initialization.

Returns:
the standardized output prefix as a string

affirm

public final void affirm(boolean b,
                         java.lang.String s,
                         boolean showtime)
Each of the variations of affirm and gaffirm assert the truth of the given boolean, and print out a message if it is false. gaffirm is for "generic affirm," since it is static and doesn't print out the associated BGP speaker's info. This method was called assert in previous versions, but assert became a Java keyword as of Java 1.4.0.

Parameters:
b - The boolean whose truth is asserted.
s - The string printed when the boolean is false.
showtime - Whether or not to report the current simulation time.

affirm

public final void affirm(boolean b,
                         java.lang.String s)
See Also:
affirm(boolean,String,boolean)

affirm

public final void affirm(boolean b)
See Also:
affirm(boolean,String,boolean)

gaffirm

public static final void gaffirm(boolean b,
                                 java.lang.String s)
See Also:
affirm(boolean,String,boolean)

gaffirm

public static final void gaffirm(boolean b)
See Also:
affirm(boolean,String,boolean)

err

public final void err(java.lang.String str)
Reports a BGP-related error.

Parameters:
str - The string to be printed along with an error message preamble.

gerr

public static final void gerr(java.lang.String str)
A generic function for reporting BGP-related errors which are not associated with a particular BGP speaker.

Parameters:
str - The string to be printed along with a generic BGP error message preamble.

except

public final void except(java.lang.String str)
Reports a BGP-related exception.

Parameters:
str - The string to be printed along with an exception message preamble.

gexcept

public static final void gexcept(java.lang.String str)
Reports a BGP-related exception which is not associated with any particular BGP speaker.

Parameters:
str - The string to be printed along with a generic BGP exception preamble.

warn

public final void warn(java.lang.String s)
Reports a BGP-related warning.


warn

public final void warn(java.lang.String s,
                       boolean showtime)
Reports a BGP-related warning, optionally omitting current simulation time. Feature for omitting time is useful for warnings during configuration or initialization.

Parameters:
showtime - Whether or not to report the current simulation time.

gwarn

public static final void gwarn(java.lang.String str)
A generic function for reporting BGP-related warnings which are not associated with a particular BGP speaker.

Parameters:
str - The string to be printed as a warning message with a generic BGP warning message preamble.

msg

public final void msg(java.lang.String str)
Prints a debugging message in the standardized format.


gmsg

public static final void gmsg(java.lang.String str)
Prints a generic BGP debugging message in the standardized format.


valid

public final void valid(int testnum,
                        int msgnum)
Each of the variations of valid handle printing messages associated with specific BGP validation tests.

Parameters:
testnum - The validation test number.
msgnum - The message number relative to the validation test.

valid

public final void valid(int testnum,
                        int msgnum,
                        java.lang.Object o)
See Also:
valid(int,int)