EPP RTK
for Java v 0.7.2

com.tucows.oxrs.epp0705.rtk.transport
Class EPPTransportBase

java.lang.Object
  |
  +--org.omg.CORBA.portable.ObjectImpl
        |
        +--com.tucows.oxrs.epp0705.rtk.RTKBase
              |
              +--com.tucows.oxrs.epp0705.rtk.transport.EPPTransportBase
All Implemented Interfaces:
org.omg.CORBA.Object
Direct Known Subclasses:
EPPTransportSMTP, EPPTransportTCP

public abstract class EPPTransportBase
extends RTKBase

Base abstract class for the Transport classes. Defines common methods and data members used by all or most Transport classes.


Field Summary
static int DEFAULT_SOCKET_TIMEOUT
          The default timeout in waiting for server responses.
protected  java.lang.String epp_host_name_
          The Host name of the EPP server.
protected  int epp_host_port_
          The Host port of the EPP server.
protected  int epp_timeout_
          The timeout to apply to persistent connections to the server.
 
Fields inherited from class com.tucows.oxrs.epp0705.rtk.RTKBase
CRLF, DATE_FMT, DEBUG_LEVEL_ONE, DEBUG_LEVEL_THREE, DEBUG_LEVEL_TWO, DEBUG_NONE, RTK_VERSION, UTC_FMT
 
Constructor Summary
EPPTransportBase()
          Default constructor --
EPPTransportBase(java.lang.String epp_host_name, int epp_host_port)
          Constructor with EPP Hostname and EPP Host port.
EPPTransportBase(java.lang.String epp_host_name, int epp_host_port, int epp_timeout)
          Constructor with EPP Hostname, EPP Host port, and timeout.
 
Method Summary
abstract  void connect()
          Establishes the connection to the Server Abstract method to be implemented by subclasses.
abstract  void disconnect()
          Closes the connection to the Server Abstract method to be implemented by subclasses.
 java.lang.String getEPPHostName()
          Accessor method for the EPP Hostname
 int getEPPHostPort()
          Accessor method for the EPP Host port
 int getEPPTimeout()
          Accessor method for the EPP server timeout, in milliseconds
 void initialize(java.lang.String epp_host_name, int epp_host_port, int epp_timeout)
          Initializes the transport object with host name, host port and timeout.
abstract  java.lang.String readFromServer()
          Reads from the Server Abstract method to be implemented by subclasses.
 void setEPPHostName(java.lang.String value)
          Accessor method for the EPP Hostname
 void setEPPHostPort(int value)
          Accessor method for the EPP Host port
 void setEPPTimeout(int value)
          Accessor method for the EPP server timeout, in milliseconds
abstract  void writeToServer(java.lang.String string_to_server)
          Writes to the Server Abstract method to be implemented by subclasses.
 
Methods inherited from class com.tucows.oxrs.epp0705.rtk.RTKBase
_ids, debug, debug, getDebugLevel, getDebugPrintStream, getRTKProperties, setDebugLevel, setDebugLevel, setDebugPrintStream
 
Methods inherited from class org.omg.CORBA.portable.ObjectImpl
_create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

epp_host_name_

protected java.lang.String epp_host_name_
The Host name of the EPP server.


epp_host_port_

protected int epp_host_port_
The Host port of the EPP server.


epp_timeout_

protected int epp_timeout_
The timeout to apply to persistent connections to the server.


DEFAULT_SOCKET_TIMEOUT

public static final int DEFAULT_SOCKET_TIMEOUT
The default timeout in waiting for server responses. Set to 20 seconds.

See Also:
Constant Field Values
Constructor Detail

EPPTransportBase

public EPPTransportBase()
Default constructor --


EPPTransportBase

public EPPTransportBase(java.lang.String epp_host_name,
                        int epp_host_port,
                        int epp_timeout)
Constructor with EPP Hostname, EPP Host port, and timeout. Note that the timeout value might not have any effect on particular transports. See the documentation of the transport you wish to use to verify.

Parameters:
epp_host_name - The EPP Hostname (eg. "host.domain.tld")
epp_host_port - The EPP port
epp_timeout - The timeout in milliseconds to apply to the connection.

EPPTransportBase

public EPPTransportBase(java.lang.String epp_host_name,
                        int epp_host_port)
Constructor with EPP Hostname and EPP Host port. Default timeout value will be used, if applicable.

Parameters:
epp_host_name - The EPP Hostname (eg. "host.domain.tld")
epp_host_port - The EPP port
Method Detail

initialize

public void initialize(java.lang.String epp_host_name,
                       int epp_host_port,
                       int epp_timeout)
Initializes the transport object with host name, host port and timeout. Note that the timeout value might not be applicable to all transport subclasses.

Parameters:
epp_host_name - The EPP Hostname (eg. "host.domain.tld")
epp_host_port - The EPP port
epp_timeout - The timeout value in milliseconds.

setEPPHostName

public void setEPPHostName(java.lang.String value)
Accessor method for the EPP Hostname

Parameters:
value - The hostname string (eg. "host.domain.tld" or "100.101.200.201")

getEPPHostName

public java.lang.String getEPPHostName()
Accessor method for the EPP Hostname

Returns:
The EPP host name String

setEPPHostPort

public void setEPPHostPort(int value)
Accessor method for the EPP Host port

Parameters:
value - The int port value

getEPPHostPort

public int getEPPHostPort()
Accessor method for the EPP Host port


setEPPTimeout

public void setEPPTimeout(int value)
Accessor method for the EPP server timeout, in milliseconds

Parameters:
value - The int timeout value, in milliseconds

getEPPTimeout

public int getEPPTimeout()
Accessor method for the EPP server timeout, in milliseconds


connect

public abstract void connect()
                      throws java.net.SocketException,
                             java.io.IOException,
                             java.net.UnknownHostException,
                             EPPTransportException
Establishes the connection to the Server Abstract method to be implemented by subclasses. Though in some subclasses (like SMTP) this method might not have any effect.

Throws:
java.net.SocketException
java.io.IOException
java.net.UnknownHostException
EPPTransportException

disconnect

public abstract void disconnect()
                         throws java.io.IOException
Closes the connection to the Server Abstract method to be implemented by subclasses. Though in some subclasses (like SMTP) this method might not have any effect.

Throws:
java.io.IOException

readFromServer

public abstract java.lang.String readFromServer()
                                         throws epp_Exception
Reads from the Server Abstract method to be implemented by subclasses. For asynchronous transports, like SMTP, this method should be periodically called to "check mail".

Returns:
The EPP message from the server.
Throws:
epp_Exception

writeToServer

public abstract void writeToServer(java.lang.String string_to_server)
                            throws epp_Exception
Writes to the Server Abstract method to be implemented by subclasses.

Parameters:
string_to_server - The EPP message to the server.
Throws:
epp_Exception

EPP RTK
for Java v 0.7.2

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