osdep.cache
Class CacheProxyAuthenticationSource

java.lang.Object
  extended by osdep.cache.CacheProxyAuthenticationSource
All Implemented Interfaces:
IProxyAuthenticationSource

public class CacheProxyAuthenticationSource
extends java.lang.Object
implements IProxyAuthenticationSource

It happens that the user id and passwords are checked more than once in this library. This means that ConsoleProxyAuthenticationSource asks these information to the user more than once, which is not acceptable. Putting an instance of this class in the middle, the values are cached and so they are asked only once.

Author:
SHZ Mar 10, 2008

Constructor Summary
CacheProxyAuthenticationSource(IProxyAuthenticationSource source)
           
 
Method Summary
 java.lang.String getProxyPassword()
          The password to authenticate to the proxy
 java.lang.String getProxyUserId()
          The user id to authenticate to the proxy
 boolean needsProxyAuthentication()
          Do the proxy need authentication?
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheProxyAuthenticationSource

public CacheProxyAuthenticationSource(IProxyAuthenticationSource source)
Parameters:
source -
Method Detail

getProxyPassword

public java.lang.String getProxyPassword()
Description copied from interface: IProxyAuthenticationSource
The password to authenticate to the proxy

Specified by:
getProxyPassword in interface IProxyAuthenticationSource
Returns:
the password

getProxyUserId

public java.lang.String getProxyUserId()
Description copied from interface: IProxyAuthenticationSource
The user id to authenticate to the proxy

Specified by:
getProxyUserId in interface IProxyAuthenticationSource
Returns:
the user id

needsProxyAuthentication

public boolean needsProxyAuthentication()
Description copied from interface: IProxyAuthenticationSource
Do the proxy need authentication?

Specified by:
needsProxyAuthentication in interface IProxyAuthenticationSource
Returns:
true if the proxy needs authentication