nz.ac.waikato.mcennis.rat.crawler
Class Authenticator

java.lang.Object
  extended by java.net.Authenticator
      extended by nz.ac.waikato.mcennis.rat.crawler.Authenticator

public class Authenticator
extends java.net.Authenticator

Authenticator used to go through HTTP proxies.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.net.Authenticator
java.net.Authenticator.RequestorType
 
Constructor Summary
Authenticator()
           
 
Method Summary
static void getPassword()
          Acquires a password for this object through System.in
protected  java.net.PasswordAuthentication getPasswordAuthentication()
          protected method that creates the authenticator used by java.net objects
static void setPassword(java.lang.String p)
          Set the password to be the given string
static void setUser(java.lang.String p)
          Set the username for the proxy to the given string
 
Methods inherited from class java.net.Authenticator
getRequestingHost, getRequestingPort, getRequestingPrompt, getRequestingProtocol, getRequestingScheme, getRequestingSite, getRequestingURL, getRequestorType, requestPasswordAuthentication, requestPasswordAuthentication, requestPasswordAuthentication, setDefault
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Authenticator

public Authenticator()
Method Detail

getPassword

public static void getPassword()
Acquires a password for this object through System.in


setPassword

public static void setPassword(java.lang.String p)
Set the password to be the given string

Parameters:
p - password to be set

setUser

public static void setUser(java.lang.String p)
Set the username for the proxy to the given string

Parameters:
p - username of proxy

getPasswordAuthentication

protected java.net.PasswordAuthentication getPasswordAuthentication()
protected method that creates the authenticator used by java.net objects

Overrides:
getPasswordAuthentication in class java.net.Authenticator
Returns:
Password Authenticator with static username and password.