for (int i = 0; i < callbacks.length; i++)
{
if (callbacks[i] instanceof UserLoginCallback)
{
// set the username to the username given in the constructor
UserLoginCallback ulc = (UserLoginCallback) callbacks[i];
ulc.setUserLogin(userLogin);
}
else if (callbacks[i] instanceof PasswordCallback)
{
// set the password to the password given in the constructor
PasswordCallback pc = (PasswordCallback) callbacks[i];