Package com.verisign.epp.interfaces
Class EPPHost
java.lang.Object
com.verisign.epp.interfaces.EPPHost
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.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDefault language for status descriptionsstatic final String"clientDeleteProhibited" statusstatic final String"clientUpdateProhibited" statusstatic final String"linked" statusstatic final String"ok" statusstatic final String"pendingCreate" statusstatic final String"pendingDelete" statusstatic final String"pendingTransfer" statusstatic final String"pendingUpdate" statusstatic final String"serverDeleteProhibited" statusstatic final String"serverUpdateProhibited" status -
Constructor Summary
ConstructorsConstructorDescriptionEPPHost(EPPSession newSession) Constructs anEPPHostgiven an initialized EPP session. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExtension(EPPCodecComponent aExtension) Adds a command extension object.voidaddHostName(String newHostName) Adds a host name for use with asendmethod.voidaddIPV4Address(String newIPV4Address) Adds an IPV4 IP Address to the host.voidaddIPV6Address(String newIPV6Address) Adds an IPV6 address to the hostvoidAdds a status to the host.voidAdds a status to the host with a description.Gets the command extensions.Gets the new name for the host.Gets the response associated with the last command.voidremoveIPV4Address(String newIPV4Address) Removes an IPV4 IP Address from the host.voidremoveIPV6Address(String newIPV6Address) Removes an IPV6 address from the hostvoidremoveStatus(String aStatus) Removes a status from the host.voidremoveStatus(String aStatus, String aDesc, String aLang) Removes a status from the host with a description.protected voidResets the host instance to its initial state.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.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.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.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.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.voidsetExtensions(Vector<EPPCodecComponent> aExtensions) Sets the command extension objects.voidsetNewName(String aNewName) Sets the new name for the host.voidsetTransId(String newTransId) Sets the client transaction identifier.
-
Field Details
-
STAT_OK
"ok" status- See Also:
-
STAT_PENDING_DELETE
"pendingDelete" status- See Also:
-
STAT_PENDING_TRANSFER
"pendingTransfer" status- See Also:
-
STAT_PENDING_CREATE
"pendingCreate" status- See Also:
-
STAT_PENDING_UPDATE
"pendingUpdate" status- See Also:
-
STAT_CLIENT_DELETE_PROHIBITED
"clientDeleteProhibited" status- See Also:
-
STAT_CLIENT_UPDATE_PROHIBITED
"clientUpdateProhibited" status- See Also:
-
STAT_LINKED
"linked" status- See Also:
-
STAT_SERVER_DELETE_PROHIBITED
"serverDeleteProhibited" status- See Also:
-
STAT_SERVER_UPDATE_PROHIBITED
"serverUpdateProhibited" status- See Also:
-
DEFAULT_LANG
Default language for status descriptions- See Also:
-
-
Constructor Details
-
EPPHost
Constructs anEPPHostgiven an initialized EPP session.- Parameters:
newSession- Server session to use.
-
-
Method Details
-
addExtension
Adds a command extension object.- Parameters:
aExtension- command extension object associated with the command
-
setExtension
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
Sets the command extension objects.- Parameters:
aExtensions- command extension objects associated with the command
-
getExtensions
Gets the command extensions.- Returns:
Vectorof concreteEPPCodecComponentassociated with the command if exists;nullotherwise.
-
addHostName
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
Gets the new name for the host.- Returns:
- New host name if defined;
nullotherwise.
-
setNewName
Sets the new name for the host.- Parameters:
aNewName- New host name
-
addIPV4Address
Adds an IPV4 IP Address to the host.- Parameters:
newIPV4Address- IPV4 IP Address
-
removeIPV4Address
Removes an IPV4 IP Address from the host.- Parameters:
newIPV4Address- IPV4 IP Address
-
addIPV6Address
Adds an IPV6 address to the host- Parameters:
newIPV6Address- IPV6 Address
-
removeIPV6Address
Removes an IPV6 address from the host- Parameters:
newIPV6Address- IPV6 Address
-
addStatus
Adds a status to the host.- Parameters:
aStatus- One of theSTAT_constants
-
removeStatus
Removes a status from the host.- Parameters:
aStatus- One of theSTAT_constants
-
addStatus
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
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
Sets the client transaction identifier.- Parameters:
newTransId- Client transaction identifier
-
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
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 identifieraddIPV4Address- Add an IPV4 AddressaddIPV6Address- 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
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
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
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 identifieraddIPV4Address- Adds IPV4 AddressaddIPV6Address- Adds IPV6 AddressremoveIPV4Address- Removes IPV4 AddressremoveIPV6Address- Removes IPV6 AddressaddStatus- Add statusremoveStatus- Remove statussetNewName- Renames the host
- Returns:
EPPResponsecontaining the Host update result.- Throws:
EPPCommandException- Error executing the update command. UsegetResponseto get the associated server error response.
-
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. 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.
-
addExtension(EPPCodecComponent).