Class EPPPlainClientSocket

java.lang.Object
com.verisign.epp.transport.client.EPPPlainClientSocket
All Implemented Interfaces:
EPPClientCon
Direct Known Subclasses:
EPPPlainProxyClientSocket

public class EPPPlainClientSocket extends Object implements EPPClientCon
Plain client socket class that can be configured to connect to a server over TCP using the EPP.ClientSocketName configuration property. Creating the EPPPlainClientSocket using one of the constructors that takes a EPPSSLContext parameters will result in an error.
  • Constructor Details

  • Method Details

    • initialize

      public void initialize() throws EPPConException
      Initializes an connection to the host and port defined by the server name and the server port properties of EPPEnv.
      Specified by:
      initialize in interface EPPClientCon
      Throws:
      EPPConException - Error initializing the connection.
    • initialize

      public void initialize(String aHostName, int aPortNumber, EPPSSLContext aSSLContext) throws EPPConException
      Initializes a SSL connection to a specific host and port. There remainder of the connection settings is derived from the EPPEnv properties.
      Specified by:
      initialize in interface EPPClientCon
      Parameters:
      aHostName - Host name or IP address of host to connect to
      aPortNumber - Port number to connect to
      aSSLContext - If passed it will silently be ignored since SSL is not supported by this class
      Throws:
      EPPConException - Error initializing the connection.
    • initialize

      public void initialize(String aHostName, int aPortNumber, String aClientHostName, EPPSSLContext aSSLContext) throws EPPConException
      Initializes a SSL connection to a specific host and port. There remainder of the connection settings is derived from the EPPEnv properties.
      Specified by:
      initialize in interface EPPClientCon
      Parameters:
      aHostName - Host name or IP address of host to connect to
      aPortNumber - Port number to connect to
      aClientHostName - Host name or IP address to connect from
      aSSLContext - If passed it will silently be ignored since SSL is not supported by this class
      Throws:
      EPPConException - Error initializing the connection.
    • getInputStream

      public InputStream getInputStream() throws EPPConException
      Gets the input stream of the Socket connection.
      Specified by:
      getInputStream in interface EPPClientCon
      Returns:
      InputStream of the connected Socket
      Throws:
      EPPConException - Input stream not set
    • setInputStream

      protected void setInputStream(InputStream aInputStream)
      Sets the input stream of the Socket connection. This can only be set by a derived class to support tunneling and other extensions.
      Parameters:
      aInputStream - Input stream to set
    • getOutputStream

      public OutputStream getOutputStream() throws EPPConException
      Gets the output stream of the Socket connection.
      Specified by:
      getOutputStream in interface EPPClientCon
      Returns:
      OutputStream of the connected Socket
      Throws:
      EPPConException - Output stream not set
    • setOutputStream

      protected void setOutputStream(OutputStream aOutputStream)
      Sets the output stream of the Socket connection. This can only be set by a derived class to support tunneling and other extensions.
      Parameters:
      aOutputStream - Output stream to set
    • getSocket

      public Socket getSocket()
      Gets the enclosing Socket of the connection.
      Returns:
      Gets the enclosing Socket if defined; null otherwise.
    • setSocket

      protected void setSocket(Socket aSocket)
      Sets the Socket to use.
      Parameters:
      aSocket - Socket to use
    • getClientHostName

      public String getClientHostName()
      Gets the client host name to use for the connection.
      Returns:
      Client host name if set; null otherwise.
    • setClientHostName

      protected void setClientHostName(String aClientHostName)
      Sets the client host name to use for the connection.
      Parameters:
      aClientHostName - Client host name to use
    • getHostName

      public String getHostName()
      Gets the host name or IP address to connect to.
      Returns:
      host name or IP address to connect to
    • setHostName

      protected void setHostName(String aHostName)
      Sets the host name or IP address to connect to.
      Parameters:
      aHostName - Host name or IP address to connect to
    • getPortNumber

      public int getPortNumber()
      Gets the port number to connect to.
      Returns:
      port number to connect to
    • setPortNumber

      protected void setPortNumber(int aPortNumber)
      Sets the port number to connect to.
      Parameters:
      aPortNumber - Port number to connect to
    • getConTimeout

      public int getConTimeout()
      Gets the connection timeout setting.
      Returns:
      connection timeout
    • setConTimeout

      protected void setConTimeout(int aConTimeout)
      Sets the connection timeout setting.
      Parameters:
      aConTimeout - connection timeout
    • isConnected

      public boolean isConnected()
      Is the connection established?
      Returns:
      true if connected; false otherwise.
    • setConnected

      protected void setConnected(boolean aIsConnected)
      Sets whether the connection is established.
      Parameters:
      aIsConnected - true if connected; false otherwise
    • close

      public void close() throws EPPConException
      Closing the connection.
      Specified by:
      close in interface EPPClientCon
      Throws:
      EPPConException - Error closing the connection