com.tucows.oxrs.epp0503.rtk.transport
Class EPPTransportTCP
org.omg.CORBA.portable.ObjectImpl
public class EPPTransportTCP
Provides methods necessary to establish connection and to communicate with
an EPP Server using plain socket (no encryption).
EPPTransportTCP() - Default Construtor
|
EPPTransportTCP(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(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.
|
void | connect() - Connects to the Server using previously set Hostname and port.
|
void | disconnect() - Closes the connection to the Server
|
String | readFromServer() - Reads a complete XML message from the Server.
|
void | writeToServer(String xml_to_server) - Sends an XML string to the Server
|
connect , disconnect , getEPPHostName , getEPPHostPort , getEPPTimeout , initialize , readFromServer , setEPPHostName , setEPPHostPort , setEPPTimeout , writeToServer |
preset_
protected boolean preset_
Flag to indicate if the transports socket has been
preset externally.
reader_from_server_
protected BufferedReader reader_from_server_
Input stream from the server.
Begotten from the socket.
socket_to_server_
protected Socket socket_to_server_
The socket to the server.
writer_to_server_
protected PrintWriter writer_to_server_
Output stream to the server.
Begotten from the socket.
EPPTransportTCP
public EPPTransportTCP()
Default Construtor
EPPTransportTCP
public EPPTransportTCP(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.
socket
- The Socket to the servertimeout
- The int socket timeout value, in milliseconds
EPPTransportTCP
public EPPTransportTCP(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.
host_name
- The server Hostnamehost_port
- The server Host porttimeout
- The int socket timeout value, in milliseconds
connect
public void connect()
throws SocketException,
IOException,
UnknownHostException
Connects to the Server using previously set Hostname and port.
If the socket was provided externally, the connection operation is
skipped, but the input and output buffers are still extracted.
The method also sets the SO timeout of the socket regardless
of its origins.
- connect in interface EPPTransportBase
disconnect
public void disconnect()
throws IOException
Closes the connection to the Server
- disconnect in interface EPPTransportBase
writeToServer
public void writeToServer(String xml_to_server)
throws epp_Exception
Sends an XML string to the Server
- writeToServer in interface EPPTransportBase
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_FAILURE
Copyright © 2001-2002 - Tucows, Inc., 2003 - LibertyRMS