logging
Class LogType

java.lang.Object
  extended by logging.LogType

public final class LogType
extends java.lang.Object

This class holds the available log types. Log types may be combined by bitwise or(|).

See Also:
LogHolder

Field Summary
static int AGREEMENT
          Indicates messages from the paw filter system
static int ALL
          Indicates all messages
static int CRYPTO
          Indicates a message related to cryptographic operations (binary: 00100000)
static int FILTER
          Indicates messages from the http filter system
static int GUI
          Indicates a GUI related message (binary: 00000001)
private static int[] LOG_TYPES
          The integer values of all log types.
static int MISC
          Indicates a misc message (binary: 00001000)
static int NET
          Indicates a network related message (binary: 00000010)
static int NUL
           
static int PAW
          Indicates messages from the paw filter system
static int PAY
          Indicates a pay message (binary: 00001000)
private static java.lang.String STR_ADD_LOG_TYPE
          The concatenation string of the human readable log types.
private static java.lang.String[] STR_LOG_TYPES
          The human readyble names of all log types.
static int THREAD
          Indicates a thread related message (binary: 00000100)
static int TOR
          Indicates a TOR message (binary: 00010000)
 
Constructor Summary
private LogType()
          Instances of this class are not allowed.
 
Method Summary
private static int createLogTypeALL()
           
static int[] getAvailableLogTypes()
          Returns the integer values of all available log types.
static java.lang.String getLogTypeName(int a_logType)
          Returns the name of the given log type as a human readable string.
static int getNumberOfLogTypes()
          Returns the number of all available log types.
static boolean isValidLogType(int a_logType)
          Returns if the given LogType is a valid log type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STR_LOG_TYPES

private static final java.lang.String[] STR_LOG_TYPES
The human readyble names of all log types. New log types must be added here, too.


STR_ADD_LOG_TYPE

private static final java.lang.String STR_ADD_LOG_TYPE
The concatenation string of the human readable log types.

See Also:
Constant Field Values

LOG_TYPES

private static final int[] LOG_TYPES
The integer values of all log types.


NUL

public static final int NUL

GUI

public static final int GUI
Indicates a GUI related message (binary: 00000001)


NET

public static final int NET
Indicates a network related message (binary: 00000010)


THREAD

public static final int THREAD
Indicates a thread related message (binary: 00000100)


MISC

public static final int MISC
Indicates a misc message (binary: 00001000)


PAY

public static final int PAY
Indicates a pay message (binary: 00001000)


TOR

public static final int TOR
Indicates a TOR message (binary: 00010000)


CRYPTO

public static final int CRYPTO
Indicates a message related to cryptographic operations (binary: 00100000)


PAW

public static final int PAW
Indicates messages from the paw filter system


FILTER

public static final int FILTER
Indicates messages from the http filter system


AGREEMENT

public static final int AGREEMENT
Indicates messages from the paw filter system


ALL

public static final int ALL
Indicates all messages

Constructor Detail

LogType

private LogType()
Instances of this class are not allowed.

Method Detail

isValidLogType

public static boolean isValidLogType(int a_logType)
Returns if the given LogType is a valid log type. Valid means that the LogType is one of those defined in this class.

Parameters:
a_logType - a log type
Returns:
if the given LogType is a valid log type

getAvailableLogTypes

public static int[] getAvailableLogTypes()
Returns the integer values of all available log types. Log types may be combined by using the bitwise or(|)-operation.

Returns:
the integer values of all available log types

getNumberOfLogTypes

public static int getNumberOfLogTypes()
Returns the number of all available log types.

Returns:
the number of all available log types

getLogTypeName

public static java.lang.String getLogTypeName(int a_logType)
Returns the name of the given log type as a human readable string. If more than one log type is used, the string is concatenated from the used log types.

Parameters:
a_logType - a log type (may consist of several log types that have been combined)
Returns:
the name of the given log type

createLogTypeALL

private static int createLogTypeALL()