* protocol identifier. The connection is closed in this case.
*/
protected synchronized void doLogin(long timeout, String eventMask) throws IOException, AuthenticationFailedException,
TimeoutException
{
ChallengeAction challengeAction;
ManagerResponse challengeResponse;
String challenge;
String key;
LoginAction loginAction;
ManagerResponse loginResponse;
if (socket == null)
{
connect();
}
synchronized (protocolIdentifier)
{
if (protocolIdentifier.value == null)
{
try
{
protocolIdentifier.wait(timeout);
}
catch (InterruptedException e) // NOPMD
{
Thread.currentThread().interrupt();
}
}
if (protocolIdentifier.value == null)
{
disconnect();
if (reader != null && reader.getTerminationException() != null)
{
throw reader.getTerminationException();
}
else
{
throw new TimeoutException("Timeout waiting for protocol identifier");
}
}
}
challengeAction = new ChallengeAction("MD5");
try
{
challengeResponse = sendAction(challengeAction);
}
catch (Exception e)