Class EPPSession

java.lang.Object
com.verisign.epp.interfaces.EPPSession
Direct Known Subclasses:
EPPHttpSession, EPPPooledGenericSession, EPPQuicSession

public class EPPSession extends Object
EPPSession manages a session with an EPP Server. An initialized instance of EPPSession is required for using any of the EPP interface classes (i.e. EPPDomain). EPPSession can invoke the following EPP operations:
  • Login - Login to an EPP Server
  • Logout - Logout from an EPP Server
  • Hello - Request Greeting from the EPP Server
  • Poll - Discover and retrieve client service messages
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected String
    Client identifier to use in login.
    protected EPPCodec
    EPP Codec used to encode and decode EPP messages
    protected EPPClientCon
    Session connection
    protected Vector<EPPService>
    EPP extension services
    protected InputStream
    Session input stream
    protected String
    Override EPP language
    protected EPPLoginAdapter
    Login adapter used by the login().
    protected EPPMessage
    Message being sent
    protected int
    What mode should the EPPSession process command/responses.
    static final int
    Asynchronous mode contant in processing commands/responses, where for the processDocument(EPPCommand) will send the command and will not wait for the response.
    static final int
    Synchronous mode constant in processing commands/responses, where for each command sent the EPPSession will immediately read for the response.
    protected String
    Message identifier associated with a EPPPollCmd.OP_ACK poll command.
    protected String
    New password to use
    static final String
    Poll operation type indicating that the client has received a message and that the server can remove the message.
    static final String
    Poll operation type indicating that the client is requesting information from the server.
    protected OutputStream
    Session output stream
    protected String
    Client password
    protected String
    Poll Operation Command
    protected EPPResponse
    EPP response associated with last EPP command
    protected byte[]
    EPP response packet associated with the last EPP command
    protected static EPPSendReceiveLogger
    Log the packet logging and receiver.
    protected Vector<EPPService>
    EPP services
    protected String
    Client transaction identifier
    protected String
    Override EPP version
    protected EPPXMLStream
    Used to read and write XML packets from/to streams.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Construct and initialize a new instance of EPPSession using the host name and port number defined in EPPEnv.
    EPPSession(String aHostName, int aPortNumber)
    Construct and initialize a new instance of EPPSession with a specific host and port.
    EPPSession(String aHostName, int aPortNumber, EPPSSLContext aSSLContext)
    Construct and initialize a new instance of EPPSession with a specific host and port.
    EPPSession(String aHostName, int aPortNumber, String aClientHostName)
    Construct and initialize a new instance of EPPSession with a specific server host, server port, client host name, and client port.
    EPPSession(String aHostName, int aPortNumber, String aClientHostName, EPPSSLContext aSSLContext)
    Construct and initialize a new instance of EPPSession with a specific server host, server port, client host name, and client port.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Adds a specific extension service to the list of extensions services.
    void
    Adds a specific object mapping service to the list of object mapping services.
    void
    Closes the connection with the server.
    void
    Ends a session by logging out from the server and closing the connection with the server.
    Gets the client connection used for the EPPSession.
    Gets the client identifier/name used in initSession.
    protected EPPClientCon
    Gets the client connection.
    Gets the specific set of extension services to use in the session.
    Gets the session input stream.
    Gets the EPPLoginAdapter set in the EPPSession.
    int
    Gets the command/response processing mode, which should be either MODE_SYNC or MODE_ASYNC.
    Gets the poll Message Id.
    Gets the new client password used in initSession.
    Gets the session output stream.
    Gets the client password used in initSession.
    Gets the poll operation, which should be either OP_REQ or OP_ACK
    Gets response associated with the last command.
    Gets the specific set of object mapping services to use in the session.
    Gets an optional client transaction identifier used when sending an EPP command (i.e.
    Gets the EPP version used in initSession.
    Sends a Hello Command to the EPP Server.
    protected void
    Initializes an EPPSession using the default EPPEnv properties, which will do the following:

    Gets concrete connection factory Makes connection to EPP Server Initialize the streams for XML processing

    EPPSession.initSession needs to be called to fully initialize a session with the EPP Server.
    protected void
    init(String aHostName, int aPortNumber, EPPSSLContext aSSLContext)
    Initializes an EPPSession to connect to a specific host and port, which will do the following:

    Gets concrete connection factory Makes connection to EPP Server Initialize the streams for XML processing

    initSession() needs to be called to fully initialize a session with the EPP Server.
    protected void
    init(String aHostName, int aPortNumber, String aClientHostName, EPPSSLContext aSSLContext)
    Initializes an EPPSession to connect to a specific server host, server port from a specific client host name/IP address.
    protected void
    initialize the login adapter to use.
    void
    Initialize an authenticated session with the EPP Server.

    The required attributes have been set with the following methods:

    setClientID - Sets the client idenfifier/user name setPassword - Sets the password

    The optional attributes have been set with the following:

    setNewPassword - Changes the password setVersion - Override the default EPP version.
    void
    Initialize an authenticated session with the EPP Server.

    The required attributes have been set with the following methods:

    setClientID - Sets the client idenfifier/user name setPassword - Sets the password

    The optional attributes have been set with the following:

    setNewPassword - Changes the password setVersion - Override the default EPP version.
    protected void
    Initializes the input stream, output stream, and XML stream from the previously initialized client connection (connection).
    boolean
    isModeSupported(int aMode)
    Does the session support the specified mode MODE_SYNC or MODE_ASYNC? A derived class of EPPSession could support a subset of the modes, so this method is provide to provide the client with the ability to check whether a mode is supported.
    protected void
    This methods does a session login.
    protected void
    login(EPPGreeting myGreeting)
    This methods does a session login.
    protected void
    logout from the session.
    Process an EPPCommand instance by writing the command to the session output stream and reading an EPPResponse instance from the sessin input stream.
    processDocument(EPPCommand aCommand, Class aExpectedResponse)
    Process an EPPCommand instance by writing the command to the session output stream and reading an EPPResponse instance from the sessin input stream and validate that the EPPResponse is of the specified type.
    This methods processes the greeting received whenever a session is established.
    Reads a response from the server.
    Gets an validated EPP DOM Document from the session input stream.
    void
    sendDocument(Document newDoc, EPPMessage aMessage)
    Sends an EPP DOM Document to the session output stream.
    void
    Sends an EPP Message (command, hello, etc.) to the session output stream.
    void
    sendPacket(byte[] aPacket)
    Sends a pre-formatted packet to the EPPSession output stream as an EPP packet with the 4 byte header.
    This method creates an instance of EPPPollCmd and sets the given attributes and invokes the send method associated with the command.
    void
    setClientID(String newClientID)
    Sets the client identifier/name used in initSession.
    void
    setExtensions(Vector<String> aProtocolExtensions, Vector<String> aCommandResponseExtensions)
    Set the Extension Services to use with this session by EPP XML namespace URIs.
    void
    setExtensionServices(Vector<EPPService> aExtensionServices)
    Sets the list of extension services, where if null the default set of extension services will be used from the EPPFactory.
    void
    Sets the input stream for the session.
    Gets the language of "us" used by initSession.
    void
    setLang(String newLanguage)
    Overrides the default language of "us" used by initSession.
    void
    Sets the EPPLoginAdapter.
    int
    setMode(int aMode)
    Sets the command/response processing mode to either MODE_SYNC or MODE_ASYNC.
    void
    setMsgID(String aMsgID)
    Sets the poll Message Id.
    void
    setNewPassword(String newPassword)
    Sets the new client password used in initSession.
    void
    Sets the output stream for the session.
    void
    setPassword(String newPassword)
    Sets the client password used in initSession.
    void
    Sets the poll operation to either OP_REQ or OP_ACK
    void
    setServices(String[] aServiceNSs)
    Set the services to use with this session by EPP XML namespace URIs.
    void
    Sets the object mapping services.
    void
    setTransId(String newTransId)
    Sets an optional client transaction identifier used when sending an EPP command (i.e.
    void
    setVersion(String newVersion)
    Overrides the default EPP version used in initSession.
    void
    Validates that the response client transaction identifier matches the command's client transaction identifier.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • OP_REQ

      public static final String OP_REQ
      Poll operation type indicating that the client is requesting information from the server.
      See Also:
    • OP_ACK

      public static final String OP_ACK
      Poll operation type indicating that the client has received a message and that the server can remove the message.
      See Also:
    • MODE_SYNC

      public static final int MODE_SYNC
      Synchronous mode constant in processing commands/responses, where for each command sent the EPPSession will immediately read for the response. This is the default mode, but can be overridden with the setMode(int) method.
      See Also:
    • MODE_ASYNC

      public static final int MODE_ASYNC
      Asynchronous mode contant in processing commands/responses, where for the processDocument(EPPCommand) will send the command and will not wait for the response. The client must call readResponse() to read the response. The mode can be set with the setMode(int) method.
      See Also:
    • codec

      protected EPPCodec codec
      EPP Codec used to encode and decode EPP messages
    • transId

      protected String transId
      Client transaction identifier
    • version

      protected String version
      Override EPP version
    • language

      protected String language
      Override EPP language
    • clientId

      protected String clientId
      Client identifier to use in login.
    • password

      protected String password
      Client password
    • newPassword

      protected String newPassword
      New password to use
    • response

      protected EPPResponse response
      EPP response associated with last EPP command
    • responsePacket

      protected byte[] responsePacket
      EPP response packet associated with the last EPP command
    • services

      protected Vector<EPPService> services
      EPP services
    • extensionServices

      protected Vector<EPPService> extensionServices
      EPP extension services
    • connection

      protected EPPClientCon connection
      Session connection
    • inputStream

      protected InputStream inputStream
      Session input stream
    • outputStream

      protected OutputStream outputStream
      Session output stream
    • xmlStream

      protected EPPXMLStream xmlStream
      Used to read and write XML packets from/to streams.
    • pollOp

      protected String pollOp
      Poll Operation Command
    • message

      protected EPPMessage message
      Message being sent
    • msgID

      protected String msgID
      Message identifier associated with a EPPPollCmd.OP_ACK poll command.
    • mode

      protected int mode
      What mode should the EPPSession process command/responses. The mode will default to MODE_SYNC which will send a command an immediately wait for the response.
    • loginAdapter

      protected EPPLoginAdapter loginAdapter
      Login adapter used by the login().
    • sendReceiveLogger

      protected static EPPSendReceiveLogger sendReceiveLogger
      Log the packet logging and receiver.
  • Constructor Details

    • EPPSession

      public EPPSession() throws EPPCommandException
      Construct and initialize a new instance of EPPSession using the host name and port number defined in EPPEnv.
      Throws:
      EPPCommandException - Thrown if there's an error initializing the EPPSession
    • EPPSession

      public EPPSession(String aHostName, int aPortNumber) throws EPPCommandException
      Construct and initialize a new instance of EPPSession with a specific host and port.
      Parameters:
      aHostName - Host name or IP address of host to connect to
      aPortNumber - Port number to connect to
      Throws:
      EPPCommandException - Thrown if there's an error initializing the EPPSession
    • EPPSession

      public EPPSession(String aHostName, int aPortNumber, String aClientHostName) throws EPPCommandException
      Construct and initialize a new instance of EPPSession with a specific server host, server port, client host name, and client port.
      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
      Throws:
      EPPCommandException - Thrown if there's an error initializing the EPPSession
    • EPPSession

      public EPPSession(String aHostName, int aPortNumber, EPPSSLContext aSSLContext) throws EPPCommandException
      Construct and initialize a new instance of EPPSession with a specific host and port.
      Parameters:
      aHostName - Host name or IP address of host to connect to
      aPortNumber - Port number to connect to
      aSSLContext - Optional specific SSL context to use
      Throws:
      EPPCommandException - Thrown if there's an error initializing the EPPSession
    • EPPSession

      public EPPSession(String aHostName, int aPortNumber, String aClientHostName, EPPSSLContext aSSLContext) throws EPPCommandException
      Construct and initialize a new instance of EPPSession with a specific server host, server port, client host name, and client port.
      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 - Optional specific SSL context to use
      Throws:
      EPPCommandException - Thrown if there's an error initializing the EPPSession
  • Method Details

    • init

      protected void init() throws EPPCommandException
      Initializes an EPPSession using the default EPPEnv properties, which will do the following:

      1. Gets concrete connection factory
      2. Makes connection to EPP Server
      3. Initialize the streams for XML processing


      EPPSession.initSession needs to be called to fully initialize a session with the EPP Server.
      Throws:
      EPPCommandException - Thrown if there's an error initializing the EPPSession
    • init

      protected void init(String aHostName, int aPortNumber, EPPSSLContext aSSLContext) throws EPPCommandException
      Initializes an EPPSession to connect to a specific host and port, which will do the following:

      1. Gets concrete connection factory
      2. Makes connection to EPP Server
      3. Initialize the streams for XML processing


      initSession() needs to be called to fully initialize a session with the EPP Server.
      Parameters:
      aHostName - Host name or IP address of host to connect to
      aPortNumber - Port number to connect to
      aSSLContext - Optional specific SSL context to use
      Throws:
      EPPCommandException - Thrown if there's an error initializing the EPPSession
    • init

      protected void init(String aHostName, int aPortNumber, String aClientHostName, EPPSSLContext aSSLContext) throws EPPCommandException
      Initializes an EPPSession to connect to a specific server host, server port from a specific client host name/IP address. which will do the following:

      1. Gets concrete connection factory
      2. Makes connection to EPP Server
      3. Initialize the streams for XML processing


      EPPSession.initSession needs to be called to fully initialize a session with the EPP Server.
      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 - Optional specific SSL context to use
      Throws:
      EPPCommandException - Thrown if there's an error initializing the EPPSession
    • getConnection

      protected EPPClientCon getConnection() throws EPPCommandException
      Gets the client connection. The connection needs to be initialized by calling the initialize methods of the returned connection.
      Returns:
      Client connection
      Throws:
      EPPCommandException - Error creating the connection
    • initStreams

      protected void initStreams() throws EPPCommandException
      Initializes the input stream, output stream, and XML stream from the previously initialized client connection (connection).
      Throws:
      EPPCommandException - Error initializing streams
    • initLoginAdapter

      protected void initLoginAdapter()
      initialize the login adapter to use.
    • getLoginAdapter

      public EPPLoginAdapter getLoginAdapter()
      Gets the EPPLoginAdapter set in the EPPSession.
      Returns:
      Set EPPLoginAdapter if defined; null otherwise.
    • setLoginAdapter

      public void setLoginAdapter(EPPLoginAdapter aLoginAdapter)
      Sets the EPPLoginAdapter. This must be set prior to calling initSession().
      Parameters:
      aLoginAdapter - EPPLoginAdapter to use. Set to null to not use a login adapter.
    • processGreeting

      public EPPGreeting processGreeting() throws EPPCommandException
      This methods processes the greeting received whenever a session is established.
      Returns:
      the greeting
      Throws:
      EPPCommandException - Error with greeting
    • login

      protected void login() throws EPPCommandException
      This methods does a session login. The following steps are followed:

      • receives a greeting and processes it.
      • sends login
      • processed login response
      Throws:
      EPPCommandException - Error with login
    • login

      protected void login(EPPGreeting myGreeting) throws EPPCommandException
      This methods does a session login. The following steps are followed:

      • receives a greeting and processes it.
      • sends login
      • processed login response
      Parameters:
      myGreeting - Greeting that is used in determining the services to include in the login command
      Throws:
      EPPCommandException - Error with login
    • hello

      public EPPGreeting hello() throws EPPCommandException
      Sends a Hello Command to the EPP Server. The EPP Greeting sent from the EPP Server will be returned.

      • pre-condition - A connection has been established with the EPP Server
      • post-condition - Error or the EPP Greeting sent by the EPP Server
      • error condition - connection time out/ bad connection.
      Returns:
      Server greeting
      Throws:
      EPPCommandException - Unexpected error information
    • sendPoll

      public EPPResponse sendPoll() throws EPPCommandException
      This method creates an instance of EPPPollCmd and sets the given attributes and invokes the send method associated with the command.
      Returns:
      the response from the poll command
      Throws:
      EPPCommandException - Error sending the poll command
    • logout

      protected void logout() throws EPPCommandException
      logout from the session.
      Throws:
      EPPCommandException - Error sending the logout command
    • validateClientTransId

      public void validateClientTransId(EPPCommand myCommand, EPPResponse response) throws EPPCommandException
      Validates that the response client transaction identifier matches the command's client transaction identifier. Client transaction identifiers are optional, but if specified, need to be mirrored back in the response.
      Parameters:
      myCommand - Command sent
      response - Response received
      Throws:
      EPPCommandException - transaction ids don't match
    • recDocument

      public Document recDocument() throws EPPCommandException
      Gets an validated EPP DOM Document from the session input stream.
      Returns:
      DOM Document instance read from stream
      Throws:
      EPPCommandException - Error reading document from stream
    • sendMessage

      public void sendMessage(EPPMessage aMessage) throws EPPCommandException
      Sends an EPP Message (command, hello, etc.) to the session output stream. Use readResponse() or recDocument() to read the response if any from the session.
      Parameters:
      aMessage - EPP Message to send to the session output stream
      Throws:
      EPPCommandException - Error encoding or sending EPP message to the session output stream
    • sendDocument

      public void sendDocument(Document newDoc, EPPMessage aMessage) throws EPPCommandException
      Sends an EPP DOM Document to the session output stream.
      Parameters:
      newDoc - DOM Document instance to write to stream
      aMessage - Message associated with newDoc that is used for packet logging logic. Set to null if unavailable.
      Throws:
      EPPCommandException - Error writing document to stream
    • sendPacket

      public void sendPacket(byte[] aPacket) throws EPPCommandException
      Sends a pre-formatted packet to the EPPSession output stream as an EPP packet with the 4 byte header.
      Parameters:
      aPacket - Packet to send to the EPPSession output stream
      Throws:
      EPPCommandException - Error writing packet to the stream
    • processDocument

      public EPPResponse processDocument(EPPCommand aCommand) throws EPPCommandException
      Process an EPPCommand instance by writing the command to the session output stream and reading an EPPResponse instance from the sessin input stream.
      Parameters:
      aCommand - Command to write to output stream
      Returns:
      Response associated with passed in command
      Throws:
      EPPCommandException - error processing the command. This can include an error specified from the server or encountered while attempting to process the command. If the exception contains an EPPResponse than it was a server specified error.
    • readResponse

      public EPPResponse readResponse() throws EPPCommandException
      Reads a response from the server. This method does no post-processing of the response, but simply reads the response from the connection, decodes it and returns the concrete EPPResponse. The response attribute is set as a side-effect of calling readResponse so that getResponse() can be called later.
      Returns:
      Response from server
      Throws:
      EPPCommandException - Error reading or decoding the server response
    • processDocument

      public EPPResponse processDocument(EPPCommand aCommand, Class aExpectedResponse) throws EPPCommandException
      Process an EPPCommand instance by writing the command to the session output stream and reading an EPPResponse instance from the sessin input stream and validate that the EPPResponse is of the specified type.
      Parameters:
      aCommand - Command to write to output stream
      aExpectedResponse - Expected type of EPPResponse. If aExpectedResponse is non-null and the response is not of the specified type, than an EPPCommandException will be thrown.
      Returns:
      Response associated with passed in command if mode is MODE_SYNC; null otherwise.
      Throws:
      EPPCommandException - error processing the command. This can include an error specified from the server or encountered while attempting to process the command. If the exception contains an EPPResponse than it was a server specified error.
    • endSession

      public void endSession() throws EPPCommandException
      Ends a session by logging out from the server and closing the connection with the server.
      Throws:
      EPPCommandException - Error ending session
    • endConnection

      public void endConnection() throws EPPCommandException
      Closes the connection with the server.
      Throws:
      EPPCommandException - Error closing connection.
    • initSession

      public void initSession() throws EPPCommandException
      Initialize an authenticated session with the EPP Server.

      The required attributes have been set with the following methods:

      • setClientID - Sets the client idenfifier/user name
      • setPassword - Sets the password


      The optional attributes have been set with the following:

      • setNewPassword - Changes the password
      • setVersion - Override the default EPP version. A default setting is provided (i.e. 1.0).
      • setLang - Override the default language of "us".
      • setServices - Sets desired set of client EPP services by EPP XML Namespace. A default setting is automatically provided based on the EPP.MapFactories configuration setting
      • setExtensions - Sets desired set of client EPP services. This can be a subset of the EPP services loaded in the client. A default setting is automatically provided based on the EPP.ProtocolExtension and the EPP.CmdRspExtensions configuration settings.
      Throws:
      EPPCommandException - Error initializing the session.
    • initSession

      public void initSession(EPPGreeting myGreeting) throws EPPCommandException
      Initialize an authenticated session with the EPP Server.

      The required attributes have been set with the following methods:

      • setClientID - Sets the client idenfifier/user name
      • setPassword - Sets the password


      The optional attributes have been set with the following:

      • setNewPassword - Changes the password
      • setVersion - Override the default EPP version. A default setting is provided (i.e. 1.0).
      • setLang - Override the default language of "us".
      • setServices - Sets desired set of client EPP services by EPP XML Namespace. A default setting is automatically provided based on the EPP.MapFactories configuration setting
      • setExtensions - Sets desired set of client EPP services. This can be a subset of the EPP services loaded in the client. A default setting is automatically provided based on the EPP.ProtocolExtension and the EPP.CmdRspExtensions configuration settings.
      Parameters:
      myGreeting - Greeting that is used in determining the services to include in the login command
      Throws:
      EPPCommandException - Error initializing the session.
    • getVersion

      public String getVersion()
      Gets the EPP version used in initSession.
      Returns:
      EPP version to use
    • setVersion

      public void setVersion(String newVersion)
      Overrides the default EPP version used in initSession.
      Parameters:
      newVersion - EPP version to use
    • setLang

      public String setLang()
      Gets the language of "us" used by initSession.
      Returns:
      Language following RFC3066 format
    • setLang

      public void setLang(String newLanguage)
      Overrides the default language of "us" used by initSession.
      Parameters:
      newLanguage - Language following RFC3066 format
    • getTransId

      public String getTransId()
      Gets an optional client transaction identifier used when sending an EPP command (i.e. EPP <login> or EPP <logout>).
      Returns:
      Client transaction identifier if defined; null otherwise.
    • setTransId

      public void setTransId(String newTransId)
      Sets an optional client transaction identifier used when sending an EPP command (i.e. EPP <login> or EPP <logout>). It is recommended to use a unique transaction identifier per command.
      Parameters:
      newTransId - Client transaction identifer
    • getResponse

      public EPPResponse getResponse()
      Gets response associated with the last command. For example, this could be the response associated with the EPP <login> command sent in initSession.
      Returns:
      response if defined; null otherwise.
    • getInputStream

      public InputStream getInputStream()
      Gets the session input stream.
      Returns:
      Session input stream if defined; null otherwise.
    • setInputStream

      public void setInputStream(InputStream newInput)
      Sets the input stream for the session. A default input stream is created in the EPPSession constructor. It is recommended to use the default input stream.
      Parameters:
      newInput - Input stream to use in session.
    • getOutputStream

      public OutputStream getOutputStream()
      Gets the session output stream.
      Returns:
      Session output stream
    • getClientCon

      public EPPClientCon getClientCon()
      Gets the client connection used for the EPPSession.
      Returns:
      Client connection if defined;null otherwise
    • setOutputStream

      public void setOutputStream(OutputStream newOutput)
      Sets the output stream for the session. A default output stream is created in the EPPSession constructor. It is recommended to use the default output stream.
      Parameters:
      newOutput - Output stream to use in session.
    • getClientID

      public String getClientID()
      Gets the client identifier/name used in initSession.
      Returns:
      Client identifier
    • setClientID

      public void setClientID(String newClientID)
      Sets the client identifier/name used in initSession.
      Parameters:
      newClientID - Client identifier
    • getPassword

      public String getPassword()
      Gets the client password used in initSession.
      Returns:
      Client password
    • setPassword

      public void setPassword(String newPassword)
      Sets the client password used in initSession.
      Parameters:
      newPassword - Client password
    • getNewPassword

      public String getNewPassword()
      Gets the new client password used in initSession.
      Returns:
      New client password
    • setNewPassword

      public void setNewPassword(String newPassword)
      Sets the new client password used in initSession.
      Parameters:
      newPassword - New client password
    • getServices

      public Vector<EPPService> getServices()
      Gets the specific set of object mapping services to use in the session. If null all of the object mapping services loaded into the EPPFactory will be used.
      Returns:
      The specific set of object mapping services if defined; null otherwise to use the default object mapping services in the EPPFactory.
    • setServices

      public void setServices(Vector<EPPService> aService)
      Sets the object mapping services. Set to null to use the default object mappings in the EPPFactory.
      Parameters:
      aService - Set to specific set of object mapping services or set to null to use the default from the EPPFactory.
    • addService

      public void addService(EPPService aService)
      Adds a specific object mapping service to the list of object mapping services.
      Parameters:
      aService - Object mapping service to add to the list of services.
    • setServices

      public void setServices(String[] aServiceNSs) throws EPPCommandException
      Set the services to use with this session by EPP XML namespace URIs. This must be called before calling initSession or login. The default setting is to use all of the services loaded in EPPFactory. This method allows a client to specify a subset of the services loaded in the EPPFactory, which is useful for synchronizing with the services supported by a specific server. For example, to initialize a session that will manage domains, newServicesNS would be set to new String[]{"urn:iana:xml:ns:domain-1.0"}. Only a subset of the services loaded in the EPPFactory can be specified.
      Parameters:
      aServiceNSs - An array of EPP XML namespace URIs to use in sesssion
      Throws:
      EPPCommandException - Invalid namespace specified.
    • getExtensionServices

      public Vector<EPPService> getExtensionServices()
      Gets the specific set of extension services to use in the session. If null all of the object mapping services loaded into the EPPFactory will be used.
      Returns:
      The specific set of object mapping services if defined; null otherwise to use the default object mapping services in the EPPFactory.
    • setExtensionServices

      public void setExtensionServices(Vector<EPPService> aExtensionServices)
      Sets the list of extension services, where if null the default set of extension services will be used from the EPPFactory.
      Parameters:
      aExtensionServices - Set to the list of extension services or null to use the default from the EPPFactory.
    • addExtensionService

      public void addExtensionService(EPPService aService)
      Adds a specific extension service to the list of extensions services. The service can either be a protocol extension or a command response extension.
      Parameters:
      aService - Extension service to add to the list of services.
    • setExtensions

      public void setExtensions(Vector<String> aProtocolExtensions, Vector<String> aCommandResponseExtensions) throws EPPCommandException
      Set the Extension Services to use with this session by EPP XML namespace URIs. This must be called before calling initSession or login. The default setting is to use all of the services loaded in EPPFactory. This method allows a client to specify a subset of the extensionservices loaded in the EPPFactory, which is useful for synchronizing with the extensionservices supported by a specific server. Either of the parameter aProtocolExtenions or the aCommandResponseExtenisons can be null or both the parameters can be null in which case there are no extensions to be set.
      Parameters:
      aProtocolExtensions - XML namespace URIs to use in session
      aCommandResponseExtensions - XML namespace URIs to use in session
      Throws:
      EPPCommandException - Invalid namespace specified.
    • setPollOp

      public void setPollOp(String aOp)
      Sets the poll operation to either OP_REQ or OP_ACK
      Parameters:
      aOp - OP_REQ or OP_ACK.
    • getPollOp

      public String getPollOp()
      Gets the poll operation, which should be either OP_REQ or OP_ACK
      Returns:
      Either OP_REQ or OP_ACK
    • getMsgID

      public String getMsgID()
      Gets the poll Message Id.
      Returns:
      Message Id if defined; null otherwise.
    • setMsgID

      public void setMsgID(String aMsgID)
      Sets the poll Message Id.
      Parameters:
      aMsgID - Message Id
    • getMode

      public int getMode()
      Gets the command/response processing mode, which should be either MODE_SYNC or MODE_ASYNC.
      Returns:
      MODE_SYNC or MODE_ASYNC
    • setMode

      public int setMode(int aMode)
      Sets the command/response processing mode to either MODE_SYNC or MODE_ASYNC.
      Parameters:
      aMode - MODE_SYNC or MODE_ASYNC
      Returns:
      Previous mode
    • isModeSupported

      public boolean isModeSupported(int aMode)
      Does the session support the specified mode MODE_SYNC or MODE_ASYNC? A derived class of EPPSession could support a subset of the modes, so this method is provide to provide the client with the ability to check whether a mode is supported.
      Parameters:
      aMode - MODE_SYNC or MODE_ASYNC
      Returns:
      true if supported; false otherwise.