Package org.seefan.prism.transfer

Source Code of org.seefan.prism.transfer.PlusPool

package org.seefan.prism.transfer;

import java.util.ArrayList;
import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.seefan.prism.plus.InitMethon;
import org.seefan.prism.plus.PlusProxy;
import org.seefan.prism.util.ReflectUtil;
import org.seefan.prism.util.StringUtil;

public class PlusPool {
  private static Log log = LogFactory.getLog(PlusPool.class);
  public static List<PlusProxy> plus = new ArrayList<PlusProxy>();

  public static void init() {
    plus.add(new InitMethon());
  }

  public static void load(String pss) {
    if (StringUtil.isEmpty(pss)) {
      String[] ps = pss.split(",");
      for (String p : ps) {
        try {
          plus.add((PlusProxy) ReflectUtil.newInstance(p, null));
        } catch (Exception e) {
          log.error("Prism Framework!加载插件出错:" + p, e);
        }
      }
    }
  }
}
TOP

Related Classes of org.seefan.prism.transfer.PlusPool

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.