public class Finger
extends java.lang.Object
implements java.io.Serializable
Finger finger = new Finger();
finger.setHostname("myserver.com");
try
{
// attempts to lookup information about user jsmith on machine myserver.com
String results = finger.query("jsmith");
System.out.println(results);
}
catch(FingerException e)
{
System.out.println(e);
}
| Constructor and Description |
|---|
Finger()
Constructs new Finger instance.
|
Finger(java.lang.String hostname)
Constructs new Finger instance.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getHostname()
Gets hostname of FINGER server.
|
int |
getPort()
Gets port of finger server.
|
int |
getTimeout()
Gets the timeout for opening a FINGER connection.
|
java.lang.String |
query(java.lang.String user)
Connects to finger server and performs finger query.
|
void |
setHostname(java.lang.String hostname)
Sets hostname of FINGER server.
|
void |
setPort(int port)
Sets port of FINGER server.
|
void |
setProxyAuthentication(java.lang.String proxyUsername,
java.lang.String proxyPassword)
Sets the username and password to use when for authentication with
proxy server.
|
void |
setProxyHost(java.lang.String proxyHostname,
int proxyPort)
Sets the proxy hostname and port for this connection.
|
void |
setProxyType(java.lang.String proxyType)
Sets the proxy type will be used for this connection.
|
void |
setTimeout(int timeout)
Sets the timeout for opening a FINGER connection.
|
public Finger()
public Finger(java.lang.String hostname)
hostname - the hostname of FINGER serverpublic void setPort(int port)
port - the port of FINGER serverpublic int getPort()
public void setHostname(java.lang.String hostname)
hostname - the hostname of FINGER serverpublic java.lang.String getHostname()
public void setTimeout(int timeout)
timeout - in millisecondspublic int getTimeout()
public void setProxyAuthentication(java.lang.String proxyUsername,
java.lang.String proxyPassword)
#clearProxySettings method.proxyUsername - the proxy usernameproxyPassword - the proxy passwordpublic void setProxyHost(java.lang.String proxyHostname,
int proxyPort)
#clearProxySettings method.proxyHostname - the hostname or ip address of the proxy serverproxyPort - the port of the proxy serverpublic void setProxyType(java.lang.String proxyType)
proxyType - The proxy type. Valid values: HTTP, SOCKS5public java.lang.String query(java.lang.String user)
throws FingerException
user - the user to queryFingerException - if a FINGER or I/O error occursCopyright © JSCAPE LLC. 1999-2021. All Rights Reserved