Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.verisign.epp.interfaces
Class EPPSession

    java.lang.Object
      com.verisign.epp.interfaces.EPPSession

Direct Known Subclasses:
  EPPPooledGenericSession

    public class EPPSession

extends java.lang.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

Version:
  $Revision: 1.7 $
Author:
  $Author: jim $
See Also:
  `EPPGreeting`, `EPPResponse`

Field Summary
`static 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.
`static int` | `MODE_SYNC` Synchronous mode constant in processing commands/responses, where for each command sent the `EPPSession` will immediately read for the response.
`protected java.lang.String` | `msgID` Message identifier associated with a `EPPPollCmd.OP_ACK` poll command.
`protected java.lang.String` | `myClientID` Client identifier to use in login.
`protected EPPCodec` | `myCodec` EPP Codec used to encode and decode EPP messages
`protected EPPClientCon` | `myConnection` Session connection
`protected java.util.Vector` | `myExtensionServices` EPP extension services
`protected java.io.InputStream` | `myInputStream` Session input stream
`protected java.lang.String` | `myLanguage` Override EPP language
`protected java.lang.String` | `myNewPassword` New password to use
`protected java.io.OutputStream` | `myOutputStream` Session output stream
`protected java.lang.String` | `myPassword` Client password
`protected java.lang.String` | `myPollOp` Poll Operation Command
`protected EPPResponse` | `myResponse` EPP response associated with last EPP command
`protected java.util.Vector` | `myServices` EPP services
`protected java.lang.String` | `myTransId` Client transaction identifier
`protected java.lang.String` | `myVersion` Override EPP version
`protected EPPXMLStream` | `myXMLStream` Used to read and write XML packets from/to streams.
`static java.lang.String` | `OP_ACK` Poll operation type indicating that the client has received a message and that the server can remove the message.
`static java.lang.String` | `OP_REQ` Poll operation type indicating that the client is requesting information from the server.

Constructor Summary
`EPPSession()` Construct and initialize a new instance of EPPSession using the host name and port number defined in `EPPEnv`.
`EPPSession(java.lang.String aHostName, int aPortNumber)` Construct and initialize a new instance of EPPSession with a specific host and port.
`EPPSession(java.lang.String aHostName, int aPortNumber, EPPSSLContext aSSLContext)` Construct and initialize a new instance of EPPSession with a specific host and port.
`EPPSession(java.lang.String aHostName, int aPortNumber, java.lang.String aClientHostName)` Construct and initialize a new instance of EPPSession with a specific server host, server port, client host name, and client port.
`EPPSession(java.lang.String aHostName, int aPortNumber, java.lang.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
`void` | `endConnection()` Closes the connection with the server.
`void` | `endSession()` Ends a session by logging out from the server and closing the connection with the server.
`EPPClientCon` | `getClientCon()` Gets the client connection used for the `EPPSession`.
`java.lang.String` | `getClientID()` Gets the client identifier/name used in `initSession`.
`protected EPPClientCon` | `getConnection()` Gets the client connection.
`java.io.InputStream` | `getInputStream()` Gets the session input stream.
`int` | `getMode()` Gets the command/response processing mode, which should be either `MODE_SYNC` or `MODE_ASYNC`.
`java.lang.String` | `getMsgID()` Gets the poll Message Id.
`java.lang.String` | `getnewPassword()` Gets the new client password used in `initSession`.
`java.io.OutputStream` | `getOutputStream()` Gets the session output stream.
`java.lang.String` | `getPassword()` Gets the client password used in `initSession`.
`java.lang.String` | `getPollOp()` Gets the poll operation, which should be either `OP_REQ` or `OP_ACK`
`EPPResponse` | `getResponse()` Gets response associated with the last command.
`java.lang.String` | `getStatusCommandType()` Gets the status command type.
`java.lang.String` | `getStatusTransId()` Gets the status client transaction identifier.
`java.lang.String` | `getTransId()` Gets an optional client transaction identifier used when sending an EPP command (i.e.
`java.lang.String` | `getVersion()` Gets the EPP version used in `initSession`.
`EPPGreeting` | `hello()` Sends a Hello Command to the EPP Server.
`protected void` | `init()` 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(java.lang.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 `EPPSession.initSession` needs to be called to fully initialize a session with the EPP Server.
`protected void` | `init(java.lang.String aHostName, int aPortNumber, java.lang.String aClientHostName, EPPSSLContext aSSLContext)` 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: 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.
`void` | `initSession()` Initialize an authenticated session with the EPP Server.
`protected void` | `initStreams()` Initializes the input stream, output stream, and XML stream from the previously initialized client connection (`myConnection`).
`boolean` | `isModeSupported(int aMode)` Does the session support the specified mode `MODE_SYNC` or `MODE_ASYNC`?
`protected void` | `login()` This methods does a session login.
`protected void` | `logout()` logout from the session.
`EPPResponse` | `processDocument(EPPCommand aCommand)` Process an `EPPCommand` instance by writing the command to the session output stream and reading an `EPPResponse` instance from the sessin input stream.
`EPPResponse` | `processDocument(EPPCommand aCommand, java.lang.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.
`EPPResponse` | `readResponse()` Reads a response from the server.
`org.w3c.dom.Document` | `recDocument()` Gets an validated EPP DOM Document from the session input stream.
`void` | `sendDocument(org.w3c.dom.Document newDoc)` Sends an EPP DOM Document 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.
`EPPResponse` | `sendPoll()` This method creates an instance of EPPPollCmd and sets the given attributes and invokes the send method associated with the command.
`void` | `setClientID(java.lang.String newClientID)` Sets the client identifier/name used in `initSession`.
`void` | `setExtensions(java.util.Vector ProtocolExtensions, java.util.Vector CommandResponseExtensions)` Set the Extension Services to use with this session by EPP XML namespace URIs.
`void` | `setInputStream(java.io.InputStream newInput)` Sets the input stream for the session.
`java.lang.String` | `setLang()` Gets the language of "us" used by `initSession`.
`void` | `setLang(java.lang.String newLanguage)` Overrides the default language of "us" used by `initSession`.
`int` | `setMode(int aMode)` Sets the command/response processing mode to either `MODE_SYNC` or `MODE_ASYNC`.
`void` | `setMsgID(java.lang.String aMsgID)` Sets the poll Message Id.
`void` | `setNewPassword(java.lang.String newPassword)` Sets the new client password used in `initSession`.
`void` | `setOutputStream(java.io.OutputStream newOutput)` Sets the output stream for the session.
`void` | `setPassword(java.lang.String newPassword)` Sets the client password used in `initSession`.
`void` | `setPollOp(java.lang.String aOp)` Sets the poll operation to either `OP_REQ` or `OP_ACK`
`void` | `setServices(java.lang.String[] newServiceNS)` Set the services to use with this session by EPP XML namespace URIs.
`void` | `setStatusCommandType(java.lang.String aStatusCommandType)` Sets the status command type.
`void` | `setStatusTransId(java.lang.String aStatusTrans)` Sets the status client transaction identifier.
`void` | `setTransId(java.lang.String newTransId)` Sets an optional client transaction identifier used when sending an EPP command (i.e.
`void` | `setVersion(java.lang.String newVersion)` Overrides the default EPP version used in `initSession`.
`void` | `validateClientTransId(EPPCommand myCommand, EPPResponse myResponse)` 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 Detail

### OP_REQ

    public static final java.lang.String OP_REQ

  Poll operation type indicating that the client is requesting information from the server.

  See Also:
    Constant Field Values

### OP_ACK

    public static final java.lang.String OP_ACK

  Poll operation type indicating that the client has received a message and that the server can remove the message.

  See Also:
    Constant Field Values

### 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:
    Constant Field Values

### 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:
    Constant Field Values

### myCodec

    protected EPPCodec myCodec

  EPP Codec used to encode and decode EPP messages

### myTransId

    protected java.lang.String myTransId

  Client transaction identifier

### myVersion

    protected java.lang.String myVersion

  Override EPP version

### myLanguage

    protected java.lang.String myLanguage

  Override EPP language

### myClientID

    protected java.lang.String myClientID

  Client identifier to use in login.

### myPassword

    protected java.lang.String myPassword

  Client password

### myNewPassword

    protected java.lang.String myNewPassword

  New password to use

### myResponse

    protected EPPResponse myResponse

  EPP response associated with last EPP command

### myServices

    protected java.util.Vector myServices

  EPP services

### myExtensionServices

    protected java.util.Vector myExtensionServices

  EPP extension services

### myConnection

    protected EPPClientCon myConnection

  Session connection

### myInputStream

    protected java.io.InputStream myInputStream

  Session input stream

### myOutputStream

    protected java.io.OutputStream myOutputStream

  Session output stream

### myXMLStream

    protected EPPXMLStream myXMLStream

  Used to read and write XML packets from/to streams.

### myPollOp

    protected java.lang.String myPollOp

  Poll Operation Command

### msgID

    protected java.lang.String msgID

  Message identifier associated with a `EPPPollCmd.OP_ACK` poll command.

Constructor Detail

### 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(java.lang.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(java.lang.String aHostName,
                      int aPortNumber,
                      java.lang.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(java.lang.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(java.lang.String aHostName,
                      int aPortNumber,
                      java.lang.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 Detail

### 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(java.lang.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
  `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
    `aSSLContext` - Optional specific SSL context to use
  Throws:
    `EPPCommandException` - Thrown if there's an error initializing the `EPPSession`

### init

    protected void init(java.lang.String aHostName,
                        int aPortNumber,
                        java.lang.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 (`myConnection`).

  Throws:
    `EPPCommandException` - Error initializing streams

### 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

### 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 Command
  Throws:
    `EPPCommandException`

### logout

    protected void logout()
                   throws EPPCommandException

  logout from the session.

  Throws:
    `EPPCommandException`

### validateClientTransId

    public void validateClientTransId(EPPCommand myCommand,
                                      EPPResponse myResponse)
                               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
    `myResponse` - Response received
  Throws:
    `EPPCommandException` - transaction ids don't match

### recDocument

    public org.w3c.dom.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

### sendDocument

    public void sendDocument(org.w3c.dom.Document newDoc)
                      throws EPPCommandException

  Sends an EPP DOM Document to the session output stream.

  Parameters:
    `newDoc` - DOM `Document` instance to write to stream
  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 `myResponse` 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,
                                       java.lang.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.

### getVersion

    public java.lang.String getVersion()

  Gets the EPP version used in `initSession`.

  Returns:
    EPP version to use

### setVersion

    public void setVersion(java.lang.String newVersion)

  Overrides the default EPP version used in `initSession`.

  Parameters:
    `newVersion` - EPP version to use

### setLang

    public java.lang.String setLang()

  Gets the language of "us" used by `initSession`.

  Returns:
    Language following RFC3066 format

### setLang

    public void setLang(java.lang.String newLanguage)

  Overrides the default language of "us" used by `initSession`.

  Parameters:
    `newLanguage` - Language following RFC3066 format

### getTransId

    public java.lang.String getTransId()

  Gets an optional client transaction identifier used when sending an EPP command (i.e. EPP <login> or EPP <logout>).

  Returns:
    Client transaction identifer if defined; `null` otherwise.

### setTransId

    public void setTransId(java.lang.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 java.io.InputStream getInputStream()

  Gets the session input stream.

  Returns:
    Session input stream if defined; `null` otherwise.

### setInputStream

    public void setInputStream(java.io.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 java.io.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(java.io.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 java.lang.String getClientID()

  Gets the client identifier/name used in `initSession`.

  Returns:
    Client identifier

### setClientID

    public void setClientID(java.lang.String newClientID)

  Sets the client identifier/name used in `initSession`.

  Parameters:
    `newClientID` - Client identifier

### getPassword

    public java.lang.String getPassword()

  Gets the client password used in `initSession`.

  Returns:
    Client password

### setPassword

    public void setPassword(java.lang.String newPassword)

  Sets the client password used in `initSession`.

  Parameters:
    `newPassword` - Client password

### getnewPassword

    public java.lang.String getnewPassword()

  Gets the new client password used in `initSession`.

  Returns:
    New client password

### setNewPassword

    public void setNewPassword(java.lang.String newPassword)

  Sets the new client password used in `initSession`.

  Parameters:
    `newPassword` - New client password

### setServices

    public void setServices(java.lang.String[] newServiceNS)
                     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:
    `newServiceNS` - An array of EPP XML namespace URIs to use in sesssion
  Throws:
    `EPPCommandException` - Invalid namespace specified.

### setExtensions

    public void setExtensions(java.util.Vector ProtocolExtensions,
                              java.util.Vector CommandResponseExtensions)
                       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 Paramerter ProtocolExtenions or the CommandResponseExtenisons can be null or both the parameteres can be null in which case there are no extenisons to be set.

  Parameters:
    `ProtocolExtensions` - ProtocolExtensions An vector EPPPortocolExtension XML namespace URIs to use in sesssion
    `CommandResponseExtensions` - CommandResponseExtensions An vector of CommandResponseExtension XML namespace URIs to use in session
  Throws:
    `EPPCommandException` - Invalid namespace specified.

### setPollOp

    public void setPollOp(java.lang.String aOp)

  Sets the poll operation to either `OP_REQ` or `OP_ACK`

  Parameters:
    `aOp` - `OP_REQ` or `OP_ACK`.

### getPollOp

    public java.lang.String getPollOp()

  Gets the poll operation, which should be either `OP_REQ` or `OP_ACK`

  Returns:
    Either `OP_REQ` or `OP_ACK`

### getStatusTransId

    public java.lang.String getStatusTransId()

  Gets the status client transaction identifier.

  Returns:
    Status client transaction identifier if defined; `null` otherwise.

### setStatusTransId

    public void setStatusTransId(java.lang.String aStatusTrans)

  Sets the status client transaction identifier.

  Parameters:
    `aStatusTrans` - Status client transaction identifier.

### getStatusCommandType

    public java.lang.String getStatusCommandType()

  Gets the status command type. The command type should be one of the valid `EPPCommand.TYPE_` constants.

  Returns:
    Status status command type if defined; `null` otherwise.

### setStatusCommandType

    public void setStatusCommandType(java.lang.String aStatusCommandType)

  Sets the status command type.

  Parameters:
    `aStatusCommandType` - Status command type, which should be one of the following:
    - `EPPCommand.TYPE_CREATE`
    - `EPPCommand.TYPE_DELETE`
    - `EPPCommand.TYPE_RENEW`
    - `EPPCommand.TYPE_TRANSFER`
    - `EPPCommand.TYPE_UPDATE`

### getMsgID

    public java.lang.String getMsgID()

  Gets the poll Message Id.

  Returns:
    Message Id if defined; null otherwise.

### setMsgID

    public void setMsgID(java.lang.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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © VeriSign Inc. All Rights Reserved.