| 
EPP RTK for Java v 0.7.2  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
  |
  +--org.omg.CORBA.portable.ObjectImpl
        |
        +--com.tucows.oxrs.epp0705.rtk.RTKBase
              |
              +--com.tucows.oxrs.epp0705.rtk.transport.EPPTransportBase
                    |
                    +--com.tucows.oxrs.epp0705.rtk.transport.EPPTransportTCP
Provides methods necessary to establish connection and to communicate with an EPP Server using plain socket (no encryption).
| Field Summary | |
protected static int | 
INT_SZ
 | 
protected  boolean | 
preset_
Flag to indicate if the transports socket has been preset externally.  | 
protected  java.io.BufferedInputStream | 
reader_from_server_
Input stream from the server.  | 
protected  java.net.Socket | 
socket_to_server_
The socket to the server.  | 
protected  java.io.BufferedOutputStream | 
writer_to_server_
Output stream to the server.  | 
| Fields inherited from class com.tucows.oxrs.epp0705.rtk.transport.EPPTransportBase | 
DEFAULT_SOCKET_TIMEOUT, epp_host_name_, epp_host_port_, epp_timeout_ | 
| 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 | |
EPPTransportTCP()
Default Construtor  | 
|
EPPTransportTCP(java.net.Socket socket,
                int timeout)
Construtor with established socket and timeout value If the timeout value is zero, the default timeout value from EPPTransportBase is used.  | 
|
EPPTransportTCP(java.lang.String host_name,
                int host_port,
                int timeout)
Construtor with Hostname, Host port and timeout value If the timeout value is zero, the default timeout value from EPPTransportBase is used.  | 
|
| Method Summary | |
 void | 
connect()
Connects to the Server using previously set Hostname and port.  | 
 void | 
disconnect()
Closes the connection to the Server  | 
protected  int | 
readBufferSize(java.io.BufferedInputStream in)
Reads 4 bytes and converts them into an integer  | 
 java.lang.String | 
readFromServer()
Reads a complete XML message from the Server.  | 
protected  byte[] | 
readInputBuffer(java.io.BufferedInputStream in,
                int inbuf_sz)
Reads inbuf_sz number of bytes from the socket  | 
protected  void | 
writeBufferSize(java.io.BufferedOutputStream out,
                int buf_sz)
Converts integer value into 4 bytes and writes the bytes into a socket  | 
 void | 
writeToServer(java.lang.String xml_to_server)
Sends an XML string to the Server  | 
| Methods inherited from class com.tucows.oxrs.epp0705.rtk.transport.EPPTransportBase | 
getEPPHostName, getEPPHostPort, getEPPTimeout, initialize, setEPPHostName, setEPPHostPort, setEPPTimeout | 
| 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 | 
protected java.net.Socket socket_to_server_
protected java.io.BufferedInputStream reader_from_server_
protected java.io.BufferedOutputStream writer_to_server_
protected boolean preset_
protected static final int INT_SZ
| Constructor Detail | 
public EPPTransportTCP()
public EPPTransportTCP(java.net.Socket socket,
                       int timeout)
socket - The Socket to the servertimeout - The int socket timeout value, in milliseconds
public EPPTransportTCP(java.lang.String host_name,
                       int host_port,
                       int timeout)
host_name - The server Hostnamehost_port - The server Host porttimeout - The int socket timeout value, in milliseconds| Method Detail | 
public void connect()
             throws java.net.SocketException,
                    java.io.IOException,
                    java.net.UnknownHostException,
                    EPPTransportException
connect in class EPPTransportBasejava.net.UnknownHostException
java.net.SocketException
java.io.IOException
EPPTransportException
public java.lang.String readFromServer()
                                throws epp_Exception
readFromServer in class EPPTransportBaseepp_Exception - if there was a socket error in 
         reading from the EPP Serverepp_Session.RTK_COMMUNICATIONS_FAILURE, 
epp_Session.RTK_UNEXPECTED_SERVER_DISCONNECT
public void writeToServer(java.lang.String xml_to_server)
                   throws epp_Exception
writeToServer in class EPPTransportBasexml_to_server - The EPP message to the server.
epp_Exception - if there was a socket error in writing to the EPP Server.
         The epp_Exception will contain a result with the code epp_Session.RTK_COMMUNICATIONS_FAILUREepp_Session.RTK_COMMUNICATIONS_FAILURE
public void disconnect()
                throws java.io.IOException
disconnect in class EPPTransportBasejava.io.IOException - if there was a Socket problem
protected int readBufferSize(java.io.BufferedInputStream in)
                      throws java.lang.Exception
java.lang.Exception - if there was a Socket problem or less than 4 bytes read
protected byte[] readInputBuffer(java.io.BufferedInputStream in,
                                 int inbuf_sz)
                          throws java.lang.Exception
java.lang.Exception - if there was a Socket problem
protected void writeBufferSize(java.io.BufferedOutputStream out,
                               int buf_sz)
                        throws java.io.IOException
java.io.IOException - if there was a Socket problem
  | 
EPP RTK for Java v 0.7.2  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||