Package com.tll.server.rpc

Source Code of com.tll.server.rpc.ForgotPasswordServiceBootstrapper

/**
* The Logic Lab
* @author jpk
* Feb 4, 2009
*/
package com.tll.server.rpc;

import javax.servlet.ServletContext;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.google.inject.Injector;
import com.tll.mail.MailManager;
import com.tll.server.IBootstrapHandler;
import com.tll.service.IForgotPasswordHandler;

/**
* ForgotPasswordServiceBootstrapper
* @author jpk
*/
public class ForgotPasswordServiceBootstrapper implements IBootstrapHandler {

  private static final Log log = LogFactory.getLog(ForgotPasswordServiceBootstrapper.class);

  @Override
  public void startup(Injector injector, ServletContext servletContext) {
    log.debug("Creating the ForgotPasswordServiceContext...");
    final MailManager mailManager = injector.getInstance(MailManager.class);
    final IExceptionHandler exceptionHandler = injector.getInstance(IExceptionHandler.class);
    final IForgotPasswordHandler handler = injector.getInstance(IForgotPasswordHandler.class);
    servletContext.setAttribute(ForgotPasswordServiceContext.KEY, new ForgotPasswordServiceContext(
        handler, mailManager, exceptionHandler));
  }

  @Override
  public void shutdown(ServletContext servletContext) {
    // no-op
  }

}
TOP

Related Classes of com.tll.server.rpc.ForgotPasswordServiceBootstrapper

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.