Package org.playorm.cron.impl

Examples of org.playorm.cron.impl.CronServiceImpl


public class CronServiceFactoryImpl extends CronServiceFactory {

  @Override
  protected CronService createService(Map<String, Object> properties) {
    Injector injector = Guice.createInjector(new CronProdBindings(properties));
    CronServiceImpl impl = injector.getInstance(CronServiceImpl.class);
   
    Object factoryObj = properties.get(CronServiceFactory.NOSQL_MGR_FACTORY);
    if(factoryObj == null)
      throw new IllegalArgumentException("NOSQL_MGR_FACTORY is required and must be set");
    else if(!(factoryObj instanceof NoSqlEntityManagerFactory))
      throw new IllegalArgumentException("NOSQL_MGR_FACTORY is not an instance of NoSqlEntityManagerFactory");
    NoSqlEntityManagerFactory factory = (NoSqlEntityManagerFactory) factoryObj;
    impl.setFactory(factory);
    return impl;
  }
View Full Code Here

TOP

Related Classes of org.playorm.cron.impl.CronServiceImpl

Copyright © 2018 www.massapicom. 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.