tools/twiddle/cli/src/main/java/org/mobicents/tools/twiddle/jslee/SleeCommand.java
@Override
	protected void processArguments(String[] args) throws CommandException {
		String sopts = ":rsdi";

		LongOpt[] lopts = {
				new LongOpt("start", LongOpt.NO_ARGUMENT, null, 'r'),
				new LongOpt("stopt", LongOpt.NO_ARGUMENT, null, 's'),
				new LongOpt("shutdown", LongOpt.NO_ARGUMENT, null, 'd'),
				new LongOpt("info", LongOpt.NO_ARGUMENT, null, 'i'),
				
				 };

		Getopt getopt = new Getopt(null, args, sopts, lopts);
		// getopt.setOpterr(false);

		int code;
		while ((code = getopt.getopt()) != -1) {
			switch (code) {
			case ':':
				throw new CommandException("Option requires an argument: " + args[getopt.getOptind() - 1]);

			case '?':
				throw new CommandException("Invalid (or ambiguous) option: " + args[getopt.getOptind() - 1]);

			case 'r':

				super.operation = new StartOperation(super.context, super.log, this);
				super.operation.buildOperation(getopt, args);
				break;

			case 's':

				super.operation = new StopOperation(super.context, super.log, this);
				super.operation.buildOperation(getopt, args);
				break;
			case 'd':

				super.operation = new ShutdownOperation(super.context, super.log, this);
				super.operation.buildOperation(getopt, args);
				break;
			case 'i':

				super.operation = new InfoOperation(super.context, super.log, this);
				super.operation.buildOperation(getopt, args);
				break;
			
			default:
				throw new CommandException("Command: \"" + getName() + "\", found unexpected opt: " + args[getopt.getOptind() - 1]);

			}
		}

	}
@Override
	protected void processArguments(String[] args) throws CommandException {
		String sopts = ":rsdi";

		LongOpt[] lopts = {
				new LongOpt("start", LongOpt.NO_ARGUMENT, null, 'r'),
				new LongOpt("stopt", LongOpt.NO_ARGUMENT, null, 's'),
				new LongOpt("shutdown", LongOpt.NO_ARGUMENT, null, 'd'),
				new LongOpt("info", LongOpt.NO_ARGUMENT, null, 'i'),
				
				 };

		Getopt getopt = new Getopt(null, args, sopts, lopts);
		// getopt.setOpterr(false);

		int code;
		while ((code = getopt.getopt()) != -1) {
			switch (code) {
			case ':':
				throw new CommandException("Option requires an argument: " + args[getopt.getOptind() - 1]);

			case '?':
				throw new CommandException("Invalid (or ambiguous) option: " + args[getopt.getOptind() - 1]);

			case 'r':

				super.operation = new StartOperation(super.context, super.log, this);
				super.operation.buildOperation(getopt, args);
				break;

			case 's':

				super.operation = new StopOperation(super.context, super.log, this);
				super.operation.buildOperation(getopt, args);
				break;
			case 'd':

				super.operation = new ShutdownOperation(super.context, super.log, this);
				super.operation.buildOperation(getopt, args);
				break;
			case 'i':

				super.operation = new InfoOperation(super.context, super.log, this);
				super.operation.buildOperation(getopt, args);
				break;
			
			default:
				throw new CommandException("Command: \"" + getName() + "\", found unexpected opt: " + args[getopt.getOptind() - 1]);

			}
		}

	}
/*
(non-Javadoc)

@see
org.mobicents.slee.tools.twiddle.AbstractSleeCommand#processArguments
(java.lang.String[])