public class EPPHost
extends java.lang.Object
EPPHost
is the primary client interface class used for host
management. An instance of EPPHost
is created with an
initialized EPPSession
, and can be used for more than one
request within a single thread. A set of setter methods are provided to set
the attributes before a call to one of the send action methods. The
responses returned from the send action methods are either instances of
EPPResponse
or instances of response classes in the
com.verisign.epp.codec.host
package. EPPResponse
,
EPPHostCreateResp
,
EPPHostInfoResp
,
EPPHostCheckResp
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_LANG
Default language for status descriptions
|
static java.lang.String |
STAT_CLIENT_DELETE_PROHIBITED
DOCUMENT ME!
|
static java.lang.String |
STAT_CLIENT_UPDATE_PROHIBITED
DOCUMENT ME!
|
static java.lang.String |
STAT_LINKED
DOCUMENT ME!
|
static java.lang.String |
STAT_OK
DOCUMENT ME!
|
static java.lang.String |
STAT_PENDING_CREATE
DOCUMENT ME!
|
static java.lang.String |
STAT_PENDING_DELETE
DOCUMENT ME!
|
static java.lang.String |
STAT_PENDING_TRANSFER
DOCUMENT ME!
|
static java.lang.String |
STAT_PENDING_UPDATE
DOCUMENT ME!
|
static java.lang.String |
STAT_SERVER_DELETE_PROHIBITED
DOCUMENT ME!
|
static java.lang.String |
STAT_SERVER_UPDATE_PROHIBITED
DOCUMENT ME!
|
Constructor and Description |
---|
EPPHost(EPPSession newSession)
Constructs an
EPPHost given an initialized EPP session. |
Modifier and Type | Method and Description |
---|---|
void |
addExtension(EPPCodecComponent aExtension)
Adds a command extension object.
|
void |
addHostName(java.lang.String newHostName)
Adds a host name for use with a
send method. |
void |
addIPV4Address(java.lang.String newIPV4Address)
Adds an IPV4 IP Address to the host.
|
void |
addIPV6Address(java.lang.String newIPV6Address)
Adds an IPV6 address to the host
|
void |
addStatus(java.lang.String aStatus)
Adds a status to the host.
|
void |
addStatus(java.lang.String aStatus,
java.lang.String aDesc,
java.lang.String aLang)
Adds a status to the host with a description.
|
java.util.Vector |
getExtensions()
Gets the command extensions.
|
java.lang.String |
getNewName()
Gets the new name for the host.
|
EPPResponse |
getResponse()
Gets the response associated with the last command.
|
void |
removeIPV4Address(java.lang.String newIPV4Address)
Removes an IPV4 IP Address from the host.
|
void |
removeIPV6Address(java.lang.String newIPV6Address)
Removes an IPV6 address from the host
|
void |
removeStatus(java.lang.String aStatus)
Removes a status from the host.
|
void |
removeStatus(java.lang.String aStatus,
java.lang.String aDesc,
java.lang.String aLang)
Removes a status from the host with a description.
|
protected void |
resetHost()
Resets the host instance to its initial state.
|
EPPHostCheckResp |
sendCheck()
Sends a Host Check Command to the server.
The required attributes have been set with the following methods: addHostName - Adds a host name to check. |
EPPResponse |
sendCreate()
Sends a Host Create Command to the server.
The required attributes have been set with the following methods: addHostName - Sets the host name to create. |
EPPResponse |
sendDelete()
Sends a Host Delete Command to the server.
The required attributes have been set with the following methods: addHostName - Sets the host name to delete. |
EPPHostInfoResp |
sendInfo()
Sends a Host Info Command to the server.
The required attributes have been set with the following methods: addHostName - Sets the host name to get info for. |
EPPResponse |
sendUpdate()
Sends a Host Update Command to the server.
The required attributes have been set with the following methods: addHostName - Sets the domain name to update. |
void |
setExtension(EPPCodecComponent aExtension)
Deprecated.
Replaced by
addExtension(EPPCodecComponent) . This
method will add the extension as is done in addExtension(EPPCodecComponent) . |
void |
setExtensions(java.util.Vector aExtensions)
Sets the command extension objects.
|
void |
setNewName(java.lang.String aNewName)
Sets the new name for the host.
|
void |
setTransId(java.lang.String newTransId)
Sets the client transaction identifier.
|
public static final java.lang.String STAT_OK
public static final java.lang.String STAT_PENDING_DELETE
public static final java.lang.String STAT_PENDING_TRANSFER
public static final java.lang.String STAT_PENDING_CREATE
public static final java.lang.String STAT_PENDING_UPDATE
public static final java.lang.String STAT_CLIENT_DELETE_PROHIBITED
public static final java.lang.String STAT_CLIENT_UPDATE_PROHIBITED
public static final java.lang.String STAT_LINKED
public static final java.lang.String STAT_SERVER_DELETE_PROHIBITED
public static final java.lang.String STAT_SERVER_UPDATE_PROHIBITED
public static final java.lang.String DEFAULT_LANG
public EPPHost(EPPSession newSession)
EPPHost
given an initialized EPP session.newSession
- Server session to use.public void addExtension(EPPCodecComponent aExtension)
aExtension
- command extension object associated with the commandpublic void setExtension(EPPCodecComponent aExtension)
addExtension(EPPCodecComponent)
. This
method will add the extension as is done in addExtension(EPPCodecComponent)
.aExtension
- command extension object associated with the commandpublic void setExtensions(java.util.Vector aExtensions)
aExtensions
- command extension objects associated with the commandpublic java.util.Vector getExtensions()
Vector
of concrete EPPCodecComponent
associated with the command if exists; null
otherwise.public void addHostName(java.lang.String newHostName)
send
method. Adding more
than one host name is only supported by sendCheck
.newHostName
- Host name to addpublic java.lang.String getNewName()
null
otherwise.public void setNewName(java.lang.String aNewName)
aNewName
- New host namepublic void addIPV4Address(java.lang.String newIPV4Address)
newIPV4Address
- IPV4 IP Addresspublic void removeIPV4Address(java.lang.String newIPV4Address)
newIPV4Address
- IPV4 IP Addresspublic void addIPV6Address(java.lang.String newIPV6Address)
newIPV6Address
- IPV6 Addresspublic void removeIPV6Address(java.lang.String newIPV6Address)
newIPV6Address
- IPV6 Addresspublic void addStatus(java.lang.String aStatus)
aStatus
- One of the STAT_
constantspublic void removeStatus(java.lang.String aStatus)
aStatus
- One of the STAT_
constantspublic void addStatus(java.lang.String aStatus, java.lang.String aDesc, java.lang.String aLang)
aStatus
- One of the STAT_
constantsaDesc
- Description of the rationale for the status changeaLang
- Language of aDesc
Use
DEFAULT_LANG
for the default language ("us").public void removeStatus(java.lang.String aStatus, java.lang.String aDesc, java.lang.String aLang)
aStatus
- One of the STAT_
constantsaDesc
- Description of the rationale for the status changeaLang
- Language of aDesc
Use
DEFAULT_LANG
for the default language ("us").public void setTransId(java.lang.String newTransId)
newTransId
- Client transaction identifierpublic EPPResponse getResponse()
public EPPResponse sendCreate() throws EPPCommandException
addHostName
- Sets the host name to create. Only one host
name is valid.
setTransId
- Sets the client transaction identifier
addIPV4Address
- Add an IPV4 Address
addIPV6Address
- Add an IPV6 Address
EPPResponse
containing the Host create result.EPPCommandException
- Error executing the create command. Use
getResponse
to get the associated server error
response.public EPPHostCheckResp sendCheck() throws EPPCommandException
addHostName
- Adds a host name to check. More than one
host name can be checked in sendCheck
setTransId
- Sets the client transaction identifier
EPPHostCheckResp
containing the Host check
information.EPPCommandException
- Error executing the check command. Use
getResponse
to get the associated server error
response.public EPPHostInfoResp sendInfo() throws EPPCommandException
addHostName
- Sets the host name to get info for. Only one
host name is valid.
setTransId
- Sets the client transaction identifier
EPPHostInfoResp
containing the Host information.EPPCommandException
- Error executing the info command. Use
getResponse
to get the associated server error
response.public EPPResponse sendUpdate() throws EPPCommandException
addHostName
- Sets the domain name to update. Only one
domain name is valid.
setTransId
- Sets the client transaction identifier
addIPV4Address
- Adds IPV4 Address
addIPV6Address
- Adds IPV6 Address
removeIPV4Address
- Removes IPV4 Address
removeIPV6Address
- Removes IPV6 Address
addStatus
- Add status
removeStatus
- Remove status
setNewName
- Renames the host
EPPResponse
containing the Host update result.EPPCommandException
- Error executing the update command. Use
getResponse
to get the associated server error
response.public EPPResponse sendDelete() throws EPPCommandException
addHostName
- Sets the host name to delete. Only one host
name is valid.
setTransId
- Sets the client transaction identifier
EPPResponse
containing the delete result
information.EPPCommandException
- Error executing the delete command. Use
getResponse
to get the associated server error
response.protected void resetHost()