|
EPP RTK for Java v 0.5.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.omg.CORBA.portable.ObjectImpl | +--com.tucows.oxrs.epp.rtk.RTKBase | +--com.tucows.oxrs.epp.rtk.EPPClient
EPP Client -- encapsulates all the connection and communication with the EPP Server.
DomainExample
,
ContactExample
,
HostExample
, Serialized FormField Summary | |
static java.lang.String |
DEFAULT_LANG
The default language/locale: "en". |
static java.lang.String |
DEFAULT_TRANSPORT_CLASS
The default transport class if none is set in the rtk.properties file. |
static java.lang.String |
DEFAULT_TRANSPORT_PACKAGE
The default transport package if none is set in the rtk.properties file. |
static java.lang.String |
VERSION
The current EPP version. |
Fields inherited from class com.tucows.oxrs.epp.rtk.RTKBase |
CRLF, DATE_FMT, DEBUG_LEVEL_ONE, DEBUG_LEVEL_THREE, DEBUG_LEVEL_TWO, DEBUG_NONE, RTK_VERSION, UTC_FMT |
Constructor Summary | |
EPPClient()
Default constructor -- uses default version, lang values. |
|
EPPClient(java.lang.String epp_host_name,
int epp_host_port,
java.lang.String epp_client_id,
java.lang.String epp_password)
Constructor with EPP Hostname, EPP Host port, client id and password, in that order. |
|
EPPClient(java.lang.String epp_client_id,
java.lang.String epp_password)
Construtor with client id and password |
Method Summary | |
void |
connect()
Connects to the EPP Server using previously set hostname and port. |
void |
connect(java.lang.String epp_host_name,
int epp_host_port)
Connects to the EPP Server using the given hostname and port and using the previously set client id and password. |
void |
connect(java.lang.String epp_host_name,
int epp_host_port,
java.lang.String epp_client_id,
java.lang.String epp_password)
Connects to and logs into the EPP Server using the given hostname, port, client id and password It is recommended to use connectAndGetGreeting() to connect and retrieve the EPPGreeting in one single call. |
void |
connect(java.lang.String epp_client_id,
java.lang.String epp_password)
Connects to the EPP Server using the given client id and password and using the previously set EPP hostname and port. |
epp_Greeting |
connectAndGetGreeting()
Connects to the EPP Server and reads the greeting from it. |
void |
disconnect()
Closes the connection to the EPP Server. |
java.lang.String |
getEPPClientID()
Accessor method for the client id. |
java.lang.String |
getEPPHostName()
Accessor method for the EPP Hostname |
int |
getEPPHostPort()
Accessor method for the EPP Host port |
java.lang.String |
getEPPPassword()
Accessor method for the password |
java.lang.String[] |
getEPPServiceExtensions()
Accessor method for the epp service extensions. |
java.lang.String[] |
getEPPServices()
Accessor method for the epp services. |
int |
getEPPTimeout()
Accessor method for the EPP server timeout, in milliseconds |
epp_Greeting |
getGreeting()
Retrieves the greeting from the EPP Server and returns it. |
java.lang.String |
getLang()
Accessor method for the lang |
long |
getLastNetTransaction()
Accessor method for the time of the last successfull network transaction. |
java.lang.String |
getVersion()
Accessor method for the version |
epp_Greeting |
hello()
Issues a hello request to the EPP Server. |
boolean |
isValid()
returns if the connections is valid. |
boolean |
isVersionSentOnLogin()
Returns whether RTK version number will be send on Login. |
void |
login(java.lang.String client_tr_id)
Logs into the EPP Server using previously set client id and password. |
void |
login(java.lang.String client_tr_id,
java.lang.String new_password)
Logs into the EPP Server using the previously set client id, and password. |
void |
login(java.lang.String client_tr_id,
java.lang.String epp_client_id,
java.lang.String epp_password)
Logs into the EPP Server using the given client id, password. |
void |
login(java.lang.String client_tr_id,
java.lang.String client_id,
java.lang.String password,
java.lang.String new_password)
Logs into the EPP Server using the given client id, password and new password. |
void |
logout(java.lang.String client_trid)
Logs out of EPP Server |
epp_PollRsp |
poll(java.lang.String client_tr_id)
Sends a poll request to the server. |
epp_PollRsp |
poll(java.lang.String client_tr_id,
java.lang.String message_id)
Sends a poll request or acknowledge to the server. |
epp_Action |
processAction(epp_Action request)
Sends EPP request to the server and retrieves the response. |
java.lang.String |
processXML(java.lang.String request_xml)
Sends raw XML to the server and returns the XML response. |
java.lang.String |
readFromServer()
Reads a complete XML message from the EPP Server. |
void |
setEPPClientID(java.lang.String value)
Accessor method for the client id. |
void |
setEPPHostName(java.lang.String value)
Accessor method for the EPP Hostname |
void |
setEPPHostPort(int value)
Accessor method for the EPP Host port |
void |
setEPPPassword(java.lang.String value)
Accessor method for the password |
void |
setEPPServiceExtensions(java.lang.String[] service_extensions)
Accessor method for the epp service extensions |
void |
setEPPServices(java.lang.String[] services)
Accessor method for the epp services. |
void |
setEPPTimeout(int value)
Accessor method for the EPP server timeout, in milliseconds Setting this value after a connection has been established has no effect. |
void |
setLang(java.lang.String value)
Accessor method for the lang The lang setting is used in the creds portion of EPP commands (such as the login). |
void |
setSocketToEPPServer(java.net.Socket value)
Bypass to the EPPClient's connect() methods. |
void |
setTransport(EPPTransportBase value)
Bypass to the EPPClient's connect() methods. |
void |
setVersion(java.lang.String value)
Accessor method for the EPP version The EPP version is sent to the server on login. |
void |
setVersionSentOnLogin(boolean send)
Set whether to send RTK version number on Login. |
void |
writeToServer(java.lang.String outbound_xml)
Sends an XML string to the EPP Server. |
Methods inherited from class com.tucows.oxrs.epp.rtk.RTKBase |
_ids, debug, debug, getDebugLevel, getRTKProperties, setDebugLevel, setDebugLevel |
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 |
Methods inherited from interface org.omg.CORBA.Object |
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override |
Field Detail |
public static final java.lang.String VERSION
public static final java.lang.String DEFAULT_LANG
public static final java.lang.String DEFAULT_TRANSPORT_CLASS
public static final java.lang.String DEFAULT_TRANSPORT_PACKAGE
Constructor Detail |
public EPPClient()
public EPPClient(java.lang.String epp_client_id, java.lang.String epp_password)
epp_client_id
- The EPP client idepp_password
- The password associated with the client idpublic EPPClient(java.lang.String epp_host_name, int epp_host_port, java.lang.String epp_client_id, java.lang.String epp_password)
epp_host_name
- The EPP Hostname (eg. "host.domain.tld")epp_host_port
- The EPP portepp_client_id
- The EPP client idepp_password
- The password associated with the client idMethod Detail |
public void setVersion(java.lang.String value)
value
- The version stringpublic java.lang.String getVersion()
public void setLang(java.lang.String value)
value
- The lang/locale String (eg. "fr_CA")public java.lang.String getLang()
public void setEPPHostName(java.lang.String value)
value
- The hostname string (eg. "host.domain.tld" or "100.101.200.201")public java.lang.String getEPPHostName()
public void setEPPHostPort(int value)
value
- The int port valuepublic int getEPPHostPort()
public void setEPPTimeout(int value)
value
- The int timeout value, in millisecondspublic int getEPPTimeout()
public void setEPPClientID(java.lang.String value)
value
- The client id Stringpublic java.lang.String getEPPClientID()
public void setEPPPassword(java.lang.String value)
value
- The password Stringpublic java.lang.String getEPPPassword()
public void setEPPServices(java.lang.String[] services)
services
- The service URI arraypublic java.lang.String[] getEPPServices()
public void setEPPServiceExtensions(java.lang.String[] service_extensions)
service_extensions
- The service extension arraypublic java.lang.String[] getEPPServiceExtensions()
public long getLastNetTransaction()
public boolean isValid()
public void setSocketToEPPServer(java.net.Socket value) throws epp_Exception, java.net.UnknownHostException, java.net.SocketException, java.io.IOException
value
- The Socket to the EPP Serverepp_Exception
- java.net.UnknownHostException
- if the EPP host cannot be foundjava.net.SocketException
- java.io.IOException
- getEPPTimeout()
,
EPPTransportTCP
public void setTransport(EPPTransportBase value)
value
- The Transport to the EPP Serverpublic void connect(java.lang.String epp_host_name, int epp_host_port) throws epp_Exception, java.net.UnknownHostException, java.net.SocketException, java.io.IOException, EPPTransportException
epp_host_name
- The EPP Hostname (eg. "host.domain.tld")epp_host_port
- The EPP portepp_Exception
- java.net.UnknownHostException
- if the EPP host cannot be foundjava.net.SocketException
- java.io.IOException
- EPPTransportException
- if there are problem initializing the transport classconnectAndGetGreeting()
public void connect(java.lang.String epp_client_id, java.lang.String epp_password) throws epp_Exception, java.net.UnknownHostException, java.net.SocketException, java.io.IOException, EPPTransportException
epp_client_id
- The EPP client idepp_password
- The password associated with the client idepp_Exception
- java.net.UnknownHostException
- if the EPP host cannot be foundjava.net.SocketException
- java.io.IOException
- EPPTransportException
- if there are problem initializing the transport classconnectAndGetGreeting()
public void connect(java.lang.String epp_host_name, int epp_host_port, java.lang.String epp_client_id, java.lang.String epp_password) throws epp_Exception, java.net.UnknownHostException, java.net.SocketException, java.io.IOException, EPPTransportException
epp_host_name
- The EPP Hostname (eg. "host.domain.tld")epp_host_port
- The EPP portepp_client_id
- The EPP client idepp_password
- The password associated with the client idepp_Exception
- java.net.UnknownHostException
- if the EPP host cannot be foundjava.net.SocketException
- java.io.IOException
- EPPTransportException
- if there are problem initializing the transport classconnectAndGetGreeting()
public void connect() throws epp_Exception, java.net.UnknownHostException, java.net.SocketException, java.io.IOException, EPPTransportException
epp_Exception
- java.net.UnknownHostException
- if the EPP host cannot be foundjava.net.SocketException
- java.io.IOException
- EPPTransportException
- if there are problem initializing the transport classconnectAndGetGreeting()
public java.lang.String readFromServer() throws epp_Exception
epp_Exception
- if there was a socket error in reading from the EPP Serverpublic java.lang.String processXML(java.lang.String request_xml) throws epp_Exception
processXML
in interface epp_SessionOperations
request_xml
- The XML request String to send to the server.epp_Exception
- if a communication error occurspublic epp_Action processAction(epp_Action request) throws epp_XMLException, epp_Exception
processAction
in interface epp_SessionOperations
request
- epp_Action The action to send to the registryepp_XMLException
- if any request data or response data is missingepp_Exception
- if a communication error occurs or if the server returns an error codeprocessXML(String)
public void writeToServer(java.lang.String outbound_xml) throws epp_Exception
outbound_xml
- String The EPP XML String to send 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 cope epp_Session.RTK_COMMUNICATIONS_FAILUREpublic epp_Greeting connectAndGetGreeting() throws epp_Exception, java.io.IOException, epp_XMLException, EPPTransportException
java.io.IOException
- if there was a socket error in connecting to the EPP Serverepp_Exception
- if the server greeting is not presentepp_XMLException
- if the server's greeting is not parsableEPPTransportException
- if there are problems initializing the transportconnect()
,
getGreeting()
public epp_Greeting getGreeting() throws epp_Exception, epp_XMLException
epp_Exception
- if the server greeting is not presentepp_XMLException
- if the server's greeting is not parsablepublic epp_Greeting hello() throws epp_Exception, epp_XMLException
epp_Exception
- if the server greeting is not presentepp_XMLException
- if the server's greeting is not parsablepublic void disconnect() throws java.io.IOException
java.io.IOException
- if there was a Socket problempublic void login(java.lang.String client_tr_id) throws epp_XMLException, epp_Exception
client_tr_id
- The client TRID Stringepp_XMLException
- if the request XML could not be built or if the response XML could not be parsed.epp_Exception
- if the EPP Server responded with an error codepublic void login(java.lang.String client_tr_id, java.lang.String epp_client_id, java.lang.String epp_password) throws epp_XMLException, epp_Exception
String
- the client TRIDclient_id
- The EPP client idpassword
- The password associated with the client idepp_XMLException
- if the request XML could not be built or if the response XML could not be parsed.epp_Exception
- if the EPP Server responded with an error codepublic void login(java.lang.String client_tr_id, java.lang.String client_id, java.lang.String password, java.lang.String new_password) throws epp_XMLException, epp_Exception
client_tr_id
- The client TRID Stringclient_id
- The EPP client idpassword
- The password associated with the client idnew_password
- The password associated with the client id, use null if you do not want to change the passwordepp_XMLException
- if the request XML could not be built or if the response XML could not be parsed.epp_Exception
- if the EPP Server responded with an error codepublic void login(java.lang.String client_tr_id, java.lang.String new_password) throws epp_XMLException, epp_Exception
String
- the client TRIDnew_password
- The password associated with the client id. Use null if you do not want to change the passwordepp_XMLException
- if the request XML could not be built or if the response XML could not be parsed.epp_Exception
- if the EPP Server responded with an error codepublic void logout(java.lang.String client_trid) throws epp_XMLException, epp_Exception
client_trid
- the client TRID, can be nullepp_XMLException
- if the request XML could not be built or if the response XML could not be parsed.epp_Exception
- if the EPP Server responded with an error codepublic boolean isVersionSentOnLogin()
public void setVersionSentOnLogin(boolean send)
send
- If true, RTK version number will be send in svcExtension section on
Loginpublic epp_PollRsp poll(java.lang.String client_tr_id) throws epp_XMLException, epp_Exception
client_tr_id
- The client TRID for the EPP requestepp_XMLException
- if the request XML could not be built or if the response XML could not be parsed.epp_Exception
- if the EPP Server responded with an error codepoll(String, String)
public epp_PollRsp poll(java.lang.String client_tr_id, java.lang.String message_id) throws epp_XMLException, epp_Exception
client_tr_id
- The client TRID for the EPP requestmessage_id
- The id of the message to ACK. If null, the Poll op will be REQ.epp_XMLException
- if the request XML could not be built or if the response XML could not be parsed.epp_Exception
- if the EPP Server responded with an error code
|
EPP RTK for Java v 0.5.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |