{
if (session.getAttribute("admin") == null)
{
AdministrationBean admin = new AdministrationBean();
admin.setTitle("Stop ReceiverThread");
admin.setResult(new Administrator()
.demandStopBackgroundReceiver(threadName));
session.setAttribute("admin", admin);
}
else
{
AdministrationBean admin = (AdministrationBean) session
.getAttribute("admin");
admin.setTitle("Stop ReceiverThread");
admin.setResult(new Administrator()
.demandStopBackgroundReceiver(threadName));
}
forwardTo(mResultPage, servlet, request, response);
}
else if ((threadName = request
.getParameter("startReceiverThread")) != null)
{
if (session.getAttribute("admin") == null)
{
AdministrationBean admin = new AdministrationBean();
admin.setTitle("Start ReceiverThread");
admin.setResult(new Administrator()
.startBackgroundReceiver(threadName));
session.setAttribute("admin", admin);
}
else
{
AdministrationBean admin = (AdministrationBean) session
.getAttribute("admin");
admin.setTitle("Start ReceiverThread");
admin.setResult(new Administrator()
.startBackgroundReceiver(threadName));
}
forwardTo(mResultPage, servlet, request, response);
}
else if ((threadName = request.getParameter("resend")) != null)
{
if (session.getAttribute("admin") == null)
{
AdministrationBean admin = new AdministrationBean();
admin.setTitle("Resend Deleted Message");
admin.setResult(new Administrator()
.resendDeletedMessage(threadName));
session.setAttribute("admin", admin);
}
else
{
AdministrationBean admin = (AdministrationBean) session
.getAttribute("admin");
admin.setTitle("Resend Deletet Message");
admin.setResult(new Administrator()
.resendDeletedMessage(threadName));
}
forwardTo(mResultPage, servlet, request, response);
}