RTKBase (EPP RTK Java API Documentation)
Keywords: com.tucows.oxrs.epp0402.rtk.RTKBase class

### com.tucows.oxrs.epp0402.rtk

# Class RTKBase

- `org.omg.CORBA.portable.ObjectImpl`
- - `com.tucows.oxrs.epp0402.rtk.RTKBase`

Known Direct Subclasses:
  EPPClient, EPPTransportBase, EPPXMLBase

`public abstract class RTKBase`
`extends org.omg.CORBA.portable.ObjectImpl`

RTK Base -- Base of the registrar tool kit. All RTK classes inherit from this one. Defines: debug method and constants; date formats. Note that despite this class extending a CORBA Object class, it does not make any promises of CORBA functionality. Extension of the CORBA ObjectImpl was required because of the methods required by the RTK IDL interfaces.

Version:
  $Revision: 1.5 $ $Date: 2003/12/24 17:42:04 $

Author:
  Daniel Manley

  ## Field Summary
  `protected static String` | `CRLF` Defined as "\r\n".
  `static DateFormat` | `DATE_FMT` DateFormat for "yyyy-MM-dd".
  `static int` | `DEBUG_LEVEL_ONE` Debug level for sending exceptions to System.err.
  `static int` | `DEBUG_LEVEL_THREE` Debug level for showing all debugging output, which include entry and exit of methods.
  `static int` | `DEBUG_LEVEL_TWO` Debug level for debugging points on interest throughout the RTK code, including display of XML messages to and from the EPP Server
  `static int` | `DEBUG_NONE` Debug level for no debug output.
  `static String` | `RTK_VERSION` RTK Version number.
  `static DateFormat` | `UTC_FMT` DateFormat for "yyyy-MM-dd'T'HH:mm:ss.0'Z'".

  ## Method Summary
  `String[]` | `_ids()` Method required by ObjectImpl and the CORBA Object interface.
  `void` | `debug(int level, String method_name, Exception xcp)` Prints an exception to System.err, including its stack trace.
  `void` | `debug(int level, String method_name, String message)` Prints a debug message to System.err.
  `static int` | `getDebugLevel()` Accessor method for the debug level
  `static PrintStream` | `getDebugPrintStream()` Accessor method for the debug output stream
  `static Properties` | `getRTKProperties()` Returns the global properties for the RTK.
  `static void` | `setDebugLevel()` Accessor method for the debug level.
  `static void` | `setDebugLevel(int value)` Accessor method for the debug level.
  `static void` | `setDebugPrintStream(PrintStream stream)` Accessor method for the debug output stream.

## Field Details

### CRLF

    protected static final String CRLF

> Defined as "\r\n". Used to complete a request to the EPP Server.

### DATE_FMT

    public static final DateFormat DATE_FMT

> DateFormat for "yyyy-MM-dd". It can be used to convert String dates into Date objects and vice versa. eg:

>     String date_string = DATE_FMT.format(date_object);

### DEBUG_LEVEL_ONE

    public static final int DEBUG_LEVEL_ONE

> Debug level for sending exceptions to System.err.
> Field Value:
>   1

### DEBUG_LEVEL_THREE

    public static final int DEBUG_LEVEL_THREE

> Debug level for showing all debugging output, which include entry and exit of methods.
> Field Value:
>   3

### DEBUG_LEVEL_TWO

    public static final int DEBUG_LEVEL_TWO

> Debug level for debugging points on interest throughout the RTK code, including display of XML messages to and from the EPP Server
> Field Value:
>   2

### DEBUG_NONE

    public static final int DEBUG_NONE

> Debug level for no debug output.
> Field Value:
>   0

### RTK_VERSION

    public static final String RTK_VERSION

> RTK Version number.

### UTC_FMT

    public static final DateFormat UTC_FMT

> DateFormat for "yyyy-MM-dd'T'HH:mm:ss.0'Z'". This is the format returned by the EPP Server in timestamps (eg. expiration date, last modified date, etc...). It can be used to convert String dates into Date objects. eg:

>     java.util.Date date_object = UTC_FMT.parse(date_string);

## Method Details

### _ids

    public String[] _ids()

> Method required by ObjectImpl and the CORBA Object interface. Always returns null. It's only here to satisfy the CORBA requirements of the IDL usage.

### debug

    public void debug(int level,
                      String method_name,
                      Exception xcp)

> Prints an exception to System.err, including its stack trace. If the set debug level is greater than or equal to the given level, then the exception is reported is reported. The print out includes the class name, the given method name, the current date and time, the given debug level of this exception, the exception class name and the exception's message. This is followed by the stack trace.
> Parameters:
>   `level` - the debug level of this message
>   `method_name` - the method name String
>   `xcp` - the exception to be reported

### debug

    public void debug(int level,
                      String method_name,
                      String message)

> Prints a debug message to System.err. If the set debug level is greater than or equal to the given level, then the message is printed. The print out includes the class name, the given method name, the current date and time, the given debug level of this message, and the message itself.
> Parameters:
>   `level` - the debug level of this message
>   `method_name` - the method name String
>   `message` - the message String

### getDebugLevel

    public static int getDebugLevel()

> Accessor method for the debug level
> Returns:
>   The current debug level

### getDebugPrintStream

    public static PrintStream getDebugPrintStream()

> Accessor method for the debug output stream
> Returns:
>   The current debug output stream

### getRTKProperties

    public static Properties getRTKProperties()
                throws FileNotFoundException,
                       IOException

> Returns the global properties for the RTK. By default the properties are empty. If the RTK user specifies the system property "rtk.props.file", then that file will be loaded. If there is a problem loading that file, then an exception will be thrown.
> Returns:
>   The RTK Properties contained in the rtk.properties file.

### setDebugLevel

    public static void setDebugLevel()

> Accessor method for the debug level. Sets the debug level using the setting found in the RTK properties. Uses a default of DEBUG_LEVEL_ONE if the setting is not found in the properties or if the setting is invalid.

### setDebugLevel

    public static void setDebugLevel(int value)

> Accessor method for the debug level. Use DEBUG_LEVEL_NONE, DEBUG_LEVEL_ONE, DEBUG_LEVEL_TWO, or DEBUG_LEVEL_THREE.
> Parameters:
>   `value` - The debug level

### setDebugPrintStream

    public static void setDebugPrintStream(PrintStream stream)

> Accessor method for the debug output stream. The default is System.err
> Parameters:
>   `stream` - The debug's new output stream

Copyright © 2001-2002 - Tucows, Inc., 2003 - LibertyRMS