processElement();
}
public void doReconnect()
{
ValidationBuilderXhtml builder = new ValidationBuilderXhtml();
ArrayList errors = new ArrayList();
String botname = getParameter("bot_to_reconnect");
Bot bot = Home.validateBotName(errors, botname);
if (null == bot)
{
if (botname != null)
{
mTemplate.setValue("botname", encodeHtml(botname));
}
builder.generateValidationErrors(mTemplate, errors, null, null);
processElement();
return;
}
try
{
bot.addBotListener(this);
synchronized (this)
{
bot.redoLogon();
try
{
this.wait();
}
catch (InterruptedException e)
{
// do nothing
}
}
bot.removeBotListener(this);
}
catch (CoreException e)
{
builder.setFallbackErrorArea(mTemplate, "Error while reconnecting the bot '"+encodeHtml(bot.getName())+"' : "+ExceptionUtils.getExceptionStackTrace(e));
}
processElement();
}