/**
 * LOGICAL-PARADOX.ORG
 * Copyright (C)2004 satoshi akabane(akabane@logical-paradox.org)
 *
 */
package org.logical_paradox.rss.oqs4r;

import org.logical_paradox.common.cli.Argument;
import org.logical_paradox.common.cli.ArgumentParser;

/**
 * OQS4Rのローダー
 * @author satoshi akabane@logical-paradox.org
 * @version $Revision: 1.4 $
 */
public class OQS4RLoader {
	/**
	 * メインメソッド．
	 * @param args プログラム引数
	 * @throws Exception 処理されなかった例外
	 */
	public static void main(String[] args) throws Exception {
		Argument[] arguments = ArgumentParser.parse(args);
		String filename = null;
		for(Argument arg : arguments) {
			if(arg.isOption() == true) {
				if("config".equals(arg.getName())) {
					filename = arg.getValue();
				}
			}
		}

		ObjectQueueServerImpl oqs4r = null;
		if(filename == null) {
			oqs4r = new ObjectQueueServerImpl();
		} else {
			oqs4r = new ObjectQueueServerImpl(filename);
		}

		oqs4r.start();
	}
}
