Package com.verisign.epp.interfaces
Class EPPHost
- java.lang.Object
-
- com.verisign.epp.interfaces.EPPHost
-
- Direct Known Subclasses:
NSHost
public class EPPHost extends java.lang.ObjectEPPHostis the primary client interface class used for host management. An instance ofEPPHostis created with an initializedEPPSession, 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 ofEPPResponseor instances of response classes in thecom.verisign.epp.codec.hostpackage.- See Also:
EPPResponse,EPPHostCreateResp,EPPHostInfoResp,EPPHostCheckResp
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_LANGDefault language for status descriptionsstatic java.lang.StringSTAT_CLIENT_DELETE_PROHIBITEDDOCUMENT ME!static java.lang.StringSTAT_CLIENT_UPDATE_PROHIBITEDDOCUMENT ME!static java.lang.StringSTAT_LINKEDDOCUMENT ME!static java.lang.StringSTAT_OKDOCUMENT ME!static java.lang.StringSTAT_PENDING_CREATEDOCUMENT ME!static java.lang.StringSTAT_PENDING_DELETEDOCUMENT ME!static java.lang.StringSTAT_PENDING_TRANSFERDOCUMENT ME!static java.lang.StringSTAT_PENDING_UPDATEDOCUMENT ME!static java.lang.StringSTAT_SERVER_DELETE_PROHIBITEDDOCUMENT ME!static java.lang.StringSTAT_SERVER_UPDATE_PROHIBITEDDOCUMENT ME!
-
Constructor Summary
Constructors Constructor Description EPPHost(EPPSession newSession)Constructs anEPPHostgiven an initialized EPP session.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddExtension(EPPCodecComponent aExtension)Adds a command extension object.voidaddHostName(java.lang.String newHostName)Adds a host name for use with asendmethod.voidaddIPV4Address(java.lang.String newIPV4Address)Adds an IPV4 IP Address to the host.voidaddIPV6Address(java.lang.String newIPV6Address)Adds an IPV6 address to the hostvoidaddStatus(java.lang.String aStatus)Adds a status to the host.voidaddStatus(java.lang.String aStatus, java.lang.String aDesc, java.lang.String aLang)Adds a status to the host with a description.java.util.VectorgetExtensions()Gets the command extensions.java.lang.StringgetNewName()Gets the new name for the host.EPPResponsegetResponse()Gets the response associated with the last command.voidremoveIPV4Address(java.lang.String newIPV4Address)Removes an IPV4 IP Address from the host.voidremoveIPV6Address(java.lang.String newIPV6Address)Removes an IPV6 address from the hostvoidremoveStatus(java.lang.String aStatus)Removes a status from the host.voidremoveStatus(java.lang.String aStatus, java.lang.String aDesc, java.lang.String aLang)Removes a status from the host with a description.protected voidresetHost()Resets the host instance to its initial state.EPPHostCheckRespsendCheck()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.EPPResponsesendCreate()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.EPPResponsesendDelete()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.EPPHostInfoRespsendInfo()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.EPPResponsesendUpdate()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.voidsetExtension(EPPCodecComponent aExtension)Deprecated.Replaced byaddExtension(EPPCodecComponent).voidsetExtensions(java.util.Vector aExtensions)Sets the command extension objects.voidsetNewName(java.lang.String aNewName)Sets the new name for the host.voidsetTransId(java.lang.String newTransId)Sets the client transaction identifier.
-
-
-
Field Detail
-
STAT_OK
public static final java.lang.String STAT_OK
DOCUMENT ME!- See Also:
- Constant Field Values
-
STAT_PENDING_DELETE
public static final java.lang.String STAT_PENDING_DELETE
DOCUMENT ME!- See Also:
- Constant Field Values
-
STAT_PENDING_TRANSFER
public static final java.lang.String STAT_PENDING_TRANSFER
DOCUMENT ME!- See Also:
- Constant Field Values
-
STAT_PENDING_CREATE
public static final java.lang.String STAT_PENDING_CREATE
DOCUMENT ME!- See Also:
- Constant Field Values
-
STAT_PENDING_UPDATE
public static final java.lang.String STAT_PENDING_UPDATE
DOCUMENT ME!- See Also:
- Constant Field Values
-
STAT_CLIENT_DELETE_PROHIBITED
public static final java.lang.String STAT_CLIENT_DELETE_PROHIBITED
DOCUMENT ME!- See Also:
- Constant Field Values
-
STAT_CLIENT_UPDATE_PROHIBITED
public static final java.lang.String STAT_CLIENT_UPDATE_PROHIBITED
DOCUMENT ME!- See Also:
- Constant Field Values
-
STAT_LINKED
public static final java.lang.String STAT_LINKED
DOCUMENT ME!- See Also:
- Constant Field Values
-
STAT_SERVER_DELETE_PROHIBITED
public static final java.lang.String STAT_SERVER_DELETE_PROHIBITED
DOCUMENT ME!- See Also:
- Constant Field Values
-
STAT_SERVER_UPDATE_PROHIBITED
public static final java.lang.String STAT_SERVER_UPDATE_PROHIBITED
DOCUMENT ME!- See Also:
- Constant Field Values
-
DEFAULT_LANG
public static final java.lang.String DEFAULT_LANG
Default language for status descriptions- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EPPHost
public EPPHost(EPPSession newSession)
Constructs anEPPHostgiven an initialized EPP session.- Parameters:
newSession- Server session to use.
-
-
Method Detail
-
addExtension
public void addExtension(EPPCodecComponent aExtension)
Adds a command extension object.- Parameters:
aExtension- command extension object associated with the command
-
setExtension
public void setExtension(EPPCodecComponent aExtension)
Deprecated.Replaced byaddExtension(EPPCodecComponent). This method will add the extension as is done inaddExtension(EPPCodecComponent).Sets a command extension object.- Parameters:
aExtension- command extension object associated with the command
-
setExtensions
public void setExtensions(java.util.Vector aExtensions)
Sets the command extension objects.- Parameters:
aExtensions- command extension objects associated with the command
-
getExtensions
public java.util.Vector getExtensions()
Gets the command extensions.- Returns:
Vectorof concreteEPPCodecComponentassociated with the command if exists;nullotherwise.
-
addHostName
public void addHostName(java.lang.String newHostName)
Adds a host name for use with asendmethod. Adding more than one host name is only supported bysendCheck.- Parameters:
newHostName- Host name to add
-
getNewName
public java.lang.String getNewName()
Gets the new name for the host.- Returns:
- New host name if defined;
nullotherwise.
-
setNewName
public void setNewName(java.lang.String aNewName)
Sets the new name for the host.- Parameters:
aNewName- New host name
-
addIPV4Address
public void addIPV4Address(java.lang.String newIPV4Address)
Adds an IPV4 IP Address to the host.- Parameters:
newIPV4Address- IPV4 IP Address
-
removeIPV4Address
public void removeIPV4Address(java.lang.String newIPV4Address)
Removes an IPV4 IP Address from the host.- Parameters:
newIPV4Address- IPV4 IP Address
-
addIPV6Address
public void addIPV6Address(java.lang.String newIPV6Address)
Adds an IPV6 address to the host- Parameters:
newIPV6Address- IPV6 Address
-
removeIPV6Address
public void removeIPV6Address(java.lang.String newIPV6Address)
Removes an IPV6 address from the host- Parameters:
newIPV6Address- IPV6 Address
-
addStatus
public void addStatus(java.lang.String aStatus)
Adds a status to the host.- Parameters:
aStatus- One of theSTAT_constants
-
removeStatus
public void removeStatus(java.lang.String aStatus)
Removes a status from the host.- Parameters:
aStatus- One of theSTAT_constants
-
addStatus
public void addStatus(java.lang.String aStatus, java.lang.String aDesc, java.lang.String aLang)Adds a status to the host with a description.- Parameters:
aStatus- One of theSTAT_constantsaDesc- Description of the rationale for the status changeaLang- Language ofaDescUseDEFAULT_LANGfor the default language ("us").
-
removeStatus
public void removeStatus(java.lang.String aStatus, java.lang.String aDesc, java.lang.String aLang)Removes a status from the host with a description.- Parameters:
aStatus- One of theSTAT_constantsaDesc- Description of the rationale for the status changeaLang- Language ofaDescUseDEFAULT_LANGfor the default language ("us").
-
setTransId
public void setTransId(java.lang.String newTransId)
Sets the client transaction identifier.- Parameters:
newTransId- Client transaction identifier
-
getResponse
public EPPResponse getResponse()
Gets the response associated with the last command. This method can be used to retrieve the server error response in the catch block of EPPCommandException.- Returns:
- Response associated with the last command
-
sendCreate
public EPPResponse sendCreate() throws EPPCommandException
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. Only one host name is valid.
The optional attributes have been set with the following:
-
setTransId- Sets the client transaction identifier -
addIPV4Address- Add an IPV4 Address -
addIPV6Address- Add an IPV6 Address
- Returns:
EPPResponsecontaining the Host create result.- Throws:
EPPCommandException- Error executing the create command. UsegetResponseto get the associated server error response.
-
-
sendCheck
public EPPHostCheckResp sendCheck() throws EPPCommandException
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. More than one host name can be checked insendCheck
The optional attributes have been set with the following:
-
setTransId- Sets the client transaction identifier
- Returns:
EPPHostCheckRespcontaining the Host check information.- Throws:
EPPCommandException- Error executing the check command. UsegetResponseto get the associated server error response.
-
-
sendInfo
public EPPHostInfoResp sendInfo() throws EPPCommandException
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. Only one host name is valid.
The optional attributes have been set with the following:
-
setTransId- Sets the client transaction identifier
- Returns:
EPPHostInfoRespcontaining the Host information.- Throws:
EPPCommandException- Error executing the info command. UsegetResponseto get the associated server error response.
-
-
sendUpdate
public EPPResponse sendUpdate() throws EPPCommandException
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. Only one domain name is valid.
The optional attributes have been set with the following:
-
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
- Returns:
EPPResponsecontaining the Host update result.- Throws:
EPPCommandException- Error executing the update command. UsegetResponseto get the associated server error response.
-
-
sendDelete
public EPPResponse sendDelete() throws EPPCommandException
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. Only one host name is valid.
The optional attributes have been set with the following:
-
setTransId- Sets the client transaction identifier
- Returns:
EPPResponsecontaining the delete result information.- Throws:
EPPCommandException- Error executing the delete command. UsegetResponseto get the associated server error response.
-
-
resetHost
protected void resetHost()
Resets the host instance to its initial state.
-
-