org.apache.commons.httpclient.auth
Class HttpAuthRealm

java.lang.Object
  extended byorg.apache.commons.httpclient.auth.HttpAuthRealm

public class HttpAuthRealm
extends java.lang.Object

The key used to look up authentication credentials.

Author:
Oleg Kalnichevski, Adrian Sutton

Constructor Summary
HttpAuthRealm()
          Creates a new authentication realm token that matches any authentication realm.
HttpAuthRealm(HttpAuthRealm token)
          Creates a copy of the given authentication realm token.
HttpAuthRealm(java.lang.String host, int port)
          Creates a new authentication realm token for the given host, port, any realm name, and any authentication scheme.
HttpAuthRealm(java.lang.String host, int port, java.lang.String realm)
          Creates a new authentication realm token for the given host, port, realm, and any authentication scheme.
HttpAuthRealm(java.lang.String host, int port, java.lang.String realm, java.lang.String scheme)
          Creates a new authentication realm token for the given host, port, realm, and authentication scheme.
HttpAuthRealm(java.lang.String host, java.lang.String realm)
          Creates a new authentication realm token for the given host, realm, any port, and any authentication scheme.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.lang.String getHost()
           
 int getPort()
           
 java.lang.String getRealm()
           
 java.lang.String getScheme()
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HttpAuthRealm

public HttpAuthRealm(java.lang.String host,
                     int port,
                     java.lang.String realm,
                     java.lang.String scheme)
Creates a new authentication realm token for the given host, port, realm, and authentication scheme.

Parameters:
host - the host the credentials apply to. May be set to null if credenticals are applicable to any host.
port - the port the credentials apply to. May be set to negative value if credenticals are applicable to any port.
realm - the realm the credentials apply to. May be set to null if credenticals are applicable to any realm.
scheme - the authentication scheme the credentials apply to. May be set to null if credenticals are applicable to any authentication scheme.

HttpAuthRealm

public HttpAuthRealm(java.lang.String host,
                     int port,
                     java.lang.String realm)
Creates a new authentication realm token for the given host, port, realm, and any authentication scheme.

Parameters:
host - the host the credentials apply to. May be set to null if credenticals are applicable to any host.
port - the port the credentials apply to. May be set to negative value if credenticals are applicable to any port.
realm - the realm the credentials apply to. May be set to null if credenticals are applicable to any realm.

HttpAuthRealm

public HttpAuthRealm(java.lang.String host,
                     int port)
Creates a new authentication realm token for the given host, port, any realm name, and any authentication scheme.

Parameters:
host - the host the credentials apply to. May be set to null if credenticals are applicable to any host.
port - the port the credentials apply to. May be set to negative value if credenticals are applicable to any port.

HttpAuthRealm

public HttpAuthRealm(java.lang.String host,
                     java.lang.String realm)
Creates a new authentication realm token for the given host, realm, any port, and any authentication scheme.

Parameters:
host - the host the credentials apply to. May be set to null if credenticals are applicable to any host.
realm - the realm the credentials apply to. May be set to null if credenticals are applicable to any realm.

HttpAuthRealm

public HttpAuthRealm()
Creates a new authentication realm token that matches any authentication realm.


HttpAuthRealm

public HttpAuthRealm(HttpAuthRealm token)
Creates a copy of the given authentication realm token.

Method Detail

getHost

public java.lang.String getHost()
Returns:
the host

getPort

public int getPort()
Returns:
the port

getRealm

public java.lang.String getRealm()
Returns:
the realm name

getScheme

public java.lang.String getScheme()
Returns:
the scheme type

equals

public boolean equals(java.lang.Object o)
See Also:
Object.equals(Object)

toString

public java.lang.String toString()
See Also:
Object.toString()

hashCode

public int hashCode()
See Also:
Object.hashCode()


Copyright © 2001-2004 Apache Software Foundation. All Rights Reserved.