|
IP*Works! V8 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--ipworks.Whois
The Whois bean allows you to query a WHOIS Server for Domain registration information.
This component implements the WHOIS protocol defined in RFC 954.
To use the bean, simply call the Query method and set
the Domain parameter to the domain you wish to retrieve
information for. This is identical to setting the Domain property with the domain that you would like to get information
for. This will trigger a WHOIS search on the domain. Upon
completion of the search, the DomainInfo property contains
the information about the Domain .
If the Server property is empty, then a search is performed
automatically at "whois.internic.net" for the appropriate WHOIS
server for the Domain , and the Server property is set
to the server found.
| Constructor Summary | |
Whois()
|
|
| Method Summary | |
void |
addWhoisEventListener(ipworks.WhoisEventListener l)
|
java.lang.String |
config(java.lang.String configurationString)
Sets or retrieves a beanconfiguration setting. |
void |
doEvents()
Processes events from the internal message queue. |
java.lang.String |
getDefaultServer()
The default server from which to retrieve registrar information. |
java.lang.String |
getDomainInfo()
The information that is returned by the Server . |
ipworks.Firewall |
getFirewall()
A set of properties related to firewall access. |
java.lang.String |
getLocalHost()
The name of the local host or user-assigned IP interface through which connections are initiated or accepted. |
java.lang.String |
getServer()
The server to request domain information from. |
int |
getTimeout()
A timeout for the bean. |
void |
interrupt()
Interrupt the current method. |
void |
query(java.lang.String domain)
Get information about a domain. |
void |
removeWhoisEventListener(ipworks.WhoisEventListener l)
|
void |
setDefaultServer(java.lang.String defaultServer)
The default server from which to retrieve registrar information. |
void |
setFirewall(ipworks.Firewall firewall)
A set of properties related to firewall access. |
void |
setLocalHost(java.lang.String localHost)
The name of the local host or user-assigned IP interface through which connections are initiated or accepted. |
void |
setServer(java.lang.String server)
The server to request domain information from. |
void |
setTimeout(int timeout)
A timeout for the bean. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Whois()
| Method Detail |
public java.lang.String getDefaultServer()
If Server is empty, then the bean will attempt to connect
to DefaultServer and determine the WHOIS server of the registrar
of the domain. The Server property will then be set
to the name of the WHOIS server of the registrar, and a WHOIS request
will be issued against that server.
The default value for DefaultServer is "whois.internic.net".
public void setDefaultServer(java.lang.String defaultServer)
throws IPWorksException
If Server is empty, then the bean will attempt to connect
to DefaultServer and determine the WHOIS server of the registrar
of the domain. The Server property will then be set
to the name of the WHOIS server of the registrar, and a WHOIS request
will be issued against that server.
The default value for DefaultServer is "whois.internic.net".
IPWorksExceptionpublic java.lang.String getDomainInfo()
Server .
The default value is an empty string. After Domain is
set and the request completes, it contains the data returned by
the Server .
public ipworks.Firewall getFirewall()
This is a FIREWALL type property which
contains fields describing the firewall
through which the bean will attempt to connect.
public void setFirewall(ipworks.Firewall firewall)
throws IPWorksException
This is a FIREWALL type property which
contains fields describing the firewall
through which the bean will attempt to connect.
IPWorksExceptionpublic java.lang.String getLocalHost()
The LocalHost property contains the name of the local host
as obtained by the gethostname() system call, or if the
user has assigned an IP address, the value of that address.
In multihomed hosts (machines with more than one IP interface) setting LocalHost to the value of an interface will make the bean initiate connections (or accept in the case of server beans) only through that interface.
If the bean is connected, the LocalHost property shows
the IP address of the interface through which the connection
is made in internet dotted format (aaa.bbb.ccc.ddd). In most
cases, this is the address of the local host, except for multihomed
hosts (machines with more than one IP interface).
NOTE: LocalHost is not persistent. You must always set it in
code, and never in the property window.
public void setLocalHost(java.lang.String localHost)
throws IPWorksException
The LocalHost property contains the name of the local host
as obtained by the gethostname() system call, or if the
user has assigned an IP address, the value of that address.
In multihomed hosts (machines with more than one IP interface) setting LocalHost to the value of an interface will make the bean initiate connections (or accept in the case of server beans) only through that interface.
If the bean is connected, the LocalHost property shows
the IP address of the interface through which the connection
is made in internet dotted format (aaa.bbb.ccc.ddd). In most
cases, this is the address of the local host, except for multihomed
hosts (machines with more than one IP interface).
NOTE: LocalHost is not persistent. You must always set it in
code, and never in the property window.
IPWorksExceptionpublic java.lang.String getServer()
This property should be set to the valid Internet address of computer
running WHOIS services. If the address is not valid or the specified Server is not running WHOIS services, the bean throws an IPWorksException
raises an IPWorksException exception
when Domain is set.
If the address is empty, then the bean will attempt to connect
to DefaultServer and determine the WHOIS server of the registrar
of the domain. The Server property will then be set
to the name of the WHOIS server of the registrar, and a WHOIS request
will be issued against that server.
If the bean is configured to use a SOCKS firewall, the value assigned to this property may be preceeded with a "*". If this is the case, the host name is passed to the firewall unresolved and the firewall performs the DNS resolution.
public void setServer(java.lang.String server)
throws IPWorksException
This property should be set to the valid Internet address of computer
running WHOIS services. If the address is not valid or the specified Server is not running WHOIS services, the bean throws an IPWorksException
raises an IPWorksException exception
when Domain is set.
If the address is empty, then the bean will attempt to connect
to DefaultServer and determine the WHOIS server of the registrar
of the domain. The Server property will then be set
to the name of the WHOIS server of the registrar, and a WHOIS request
will be issued against that server.
If the bean is configured to use a SOCKS firewall, the value assigned to this property may be preceeded with a "*". If this is the case, the host name is passed to the firewall unresolved and the firewall performs the DNS resolution.
IPWorksExceptionpublic int getTimeout()
If the Timeout property is set to 0, all operations
will run uninterrupted until successful completion, or an error condition
is encountered.
If Timeout is set to a positive value, the bean will
wait for the operation to complete before returning control.
The bean will use DoEvents to enter an efficient wait loop
during any potential waiting period, making sure that all system events
are processed immediately as they arrive. This ensures that the host
application does not "freeze" and remains responsive.
If Timeout expires, and the operation is not yet complete,
the bean throws an IPWorksException
raises an IPWorksException exception
.
Please note that by default, all timeouts are inactivity timeouts ,
i.e. the timeout period is extended by Timeout seconds when
data is successfully sent or received.
Optionally, the behaviour of the bean may be changed to absolute timeouts , i.e. the bean will wait for a maximum
of Timeout seconds since the beginning of the operation, without
extending the timeout period during communications.
This behavior is controlled by theAbsoluteTimeoutconfiguration setting.
The default value for the Timeout property is 60 (seconds).
public void setTimeout(int timeout)
throws IPWorksException
If the Timeout property is set to 0, all operations
will run uninterrupted until successful completion, or an error condition
is encountered.
If Timeout is set to a positive value, the bean will
wait for the operation to complete before returning control.
The bean will use DoEvents to enter an efficient wait loop
during any potential waiting period, making sure that all system events
are processed immediately as they arrive. This ensures that the host
application does not "freeze" and remains responsive.
If Timeout expires, and the operation is not yet complete,
the bean throws an IPWorksException
raises an IPWorksException exception
.
Please note that by default, all timeouts are inactivity timeouts ,
i.e. the timeout period is extended by Timeout seconds when
data is successfully sent or received.
Optionally, the behaviour of the bean may be changed to absolute timeouts , i.e. the bean will wait for a maximum
of Timeout seconds since the beginning of the operation, without
extending the timeout period during communications.
This behavior is controlled by theAbsoluteTimeoutconfiguration setting.
The default value for the Timeout property is 60 (seconds).
IPWorksException
public java.lang.String config(java.lang.String configurationString)
throws IPWorksException
Config is a generic method available in every bean.
It is used to set and retrieveconfiguration settingsfor the
bean.
Configuration settings are similar in functionality to properties,
but they are rarely used. In order to avoid "polluting" the property
namespace of the bean, access to these internal properties is provided through the Config method.
To set a configuration setting named PROPERTY , you must call Config("PROPERTY=VALUE") , where VALUE is the value of the setting expressed as a string. For boolean values, use the strings "True", "False", "0", "1", "Yes", or "No" (case does not matter).
To read (query) the value of a configuration setting, you must call Config("PROPERTY") . The value will be returned as a string.
IPWorksException
public void doEvents()
throws IPWorksException
When DoEvents is called, the bean processes any
available events. If no events are available, it waits for a
preset period of time, and then returns.
IPWorksException
public void interrupt()
throws IPWorksException
If there is no method in progress, Interrupt simply returns doing nothing.
IPWorksException
public void query(java.lang.String domain)
throws IPWorksException
Calling this method gets information about the domain specified by
the Domain property. The result is returned to the DomainInfo property.
IPWorksException
public void addWhoisEventListener(ipworks.WhoisEventListener l)
throws java.util.TooManyListenersException
java.util.TooManyListenersExceptionpublic void removeWhoisEventListener(ipworks.WhoisEventListener l)
|
IP*Works! V8 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||