com.cafesoft.core.jdbc
Class UsernamePasswordConnectionPoolAuthenticator

java.lang.Object
  |
  +--com.cafesoft.core.jdbc.UsernamePasswordConnectionPoolAuthenticator
All Implemented Interfaces:
ConnectionPoolAuthenticator

public class UsernamePasswordConnectionPoolAuthenticator
extends Object
implements ConnectionPoolAuthenticator

A username and password implementation of the ConnectionPoolAuthenticator interface.

This implementation succeeds if both the username and password are not null AND if the poolUser == user AND if the poolPassword == password. Both the poolUser and poolPassword are both found in the ConnectionPoolConfig object which is stored in the ConnectionPoolInfo Object

Since:
11/5/02
See Also:
ConnectionPool, ConnectionPoolAuthenticator, ConnectionPoolConfig, ConnectionPoolInfo

Constructor Summary
UsernamePasswordConnectionPoolAuthenticator(ConnectionPool pool)
          Create a new UsernamePasswordConnectionPoolAuthenticator
 
Method Summary
 boolean authenticate(String user, String password)
          Authenticate the user
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UsernamePasswordConnectionPoolAuthenticator

public UsernamePasswordConnectionPoolAuthenticator(ConnectionPool pool)
Create a new UsernamePasswordConnectionPoolAuthenticator

Parameters:
pool - the ConnectionPool this authenticator belongs to
Method Detail

authenticate

public boolean authenticate(String user,
                            String password)
Authenticate the user

Specified by:
authenticate in interface ConnectionPoolAuthenticator
Parameters:
user - the ConnectionPool user
password - the ConnectionPool password
Returns:
true if user is authenticated, false otherwise


Generated on 5:16:42 PM May 12, 2008, © 1996-2005 Cafésoft LLC. All rights reserved.