massim.framework.connection
Class UsernamePasswordAccount

java.lang.Object
  extended by massim.framework.connection.UsernamePasswordAccount
All Implemented Interfaces:
Account

public class UsernamePasswordAccount
extends java.lang.Object
implements Account

This class represents an account that requires you to send username and password to login. They are checked by comparing them to a given username and password.


Constructor Summary
UsernamePasswordAccount(java.lang.String username, java.lang.String password)
          Construct a new UsernamePasswordAccount, using a given username and password.
 
Method Summary
 boolean authenticate(Authentication a)
          The contract of this method is that it is supposed to check if the Authentication object auth is sufficient to log into the account represented by the implementing class.
 java.lang.String getUsername()
          Retrieve username for this account.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UsernamePasswordAccount

public UsernamePasswordAccount(java.lang.String username,
                               java.lang.String password)
Construct a new UsernamePasswordAccount, using a given username and password.

Parameters:
username -
password -
Method Detail

authenticate

public boolean authenticate(Authentication a)
Description copied from interface: Account
The contract of this method is that it is supposed to check if the Authentication object auth is sufficient to log into the account represented by the implementing class.

Specified by:
authenticate in interface Account
Parameters:
a - authentification object to be checked.
Returns:
true if and only if auth is ok to log into this account

getUsername

public java.lang.String getUsername()
Retrieve username for this account.

Returns:


Copyright © 2012. All Rights Reserved.