Package ar.com.AmberSoft.iEvenTask.services

Source Code of ar.com.AmberSoft.iEvenTask.services.BackgroundProcessService

package ar.com.AmberSoft.iEvenTask.services;

import java.util.HashMap;
import java.util.Map;

import ar.com.AmberSoft.iEvenTask.events.BackgroundEventController;
import ar.com.AmberSoft.iEvenTask.events.BackgroundEventDetectFilesProcess;
import ar.com.AmberSoft.iEvenTask.events.BackgroundEventDetectProcess;
import ar.com.AmberSoft.util.ParamsConst;
@SuppressWarnings({"rawtypes","unchecked"})
public class BackgroundProcessService extends Service {

  @Override
  public Map onExecute(Map params) {
   
    BackgroundEventController controller = BackgroundEventController.getInstance();

    Map map = new HashMap();
    map.put(ParamsConst.PROCESS, controller.getActiveProcesses());
   
    return map;
  }

  @Override
  public Map onEmulate(Map params) {
    Map<Integer, BackgroundEventDetectProcess> activeProcesses = new HashMap<Integer, BackgroundEventDetectProcess>();
    activeProcesses.put(1, new BackgroundEventDetectFilesProcess(null));

    Map map = new HashMap();
    map.put(ParamsConst.PROCESS, activeProcesses);
   
    return map;

  }

}
TOP

Related Classes of ar.com.AmberSoft.iEvenTask.services.BackgroundProcessService

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.