class SccpExecutor implements ShellExecutor {

    public String execute(String[] options) {
        if (this.sccpStacks.size() == 0) {
            logger.warn("SCCP stack not set. Command will not be executed ");
            return SccpOAMMessage.SERVER_ERROR;
        }

        // Atleast 1 option is passed?
        if (options == null || options.length < 2) {
            return SccpOAMMessage.INVALID_COMMAND;
        }

        String firstOption = options[1];

        if (firstOption == null) {
            return SccpOAMMessage.INVALID_COMMAND;
        }

        try {
            if (firstOption.equals("rule")) {
                return this.manageRule(options);
            } else if (firstOption.equals("address")) {
                return this.manageAddress(options);
            } else if (firstOption.equals("rsp")) {
                return this.manageRsp(options);
            } else if (firstOption.equals("rss")) {
                return this.manageRss(options);
            } else if (firstOption.equals("lmr")) {
                return this.manageLmr(options);
            } else if (firstOption.equals("sap")) {
                return this.manageSap(options);
            } else if (firstOption.equals("dest")) {
                return this.manageDest(options);
            } else if (firstOption.equals("csp")) {
                return this.manageConcernedSpc(options);
            } else if (firstOption.equals("set")) {
                return this.manageSet(options);
            } else if (firstOption.equals("get")) {
                return this.manageGet(options);
            }
            // } catch (Exception e) {
            // logger.error(String.format("Error while executing comand %s", Arrays.toString(options)), e);
            // return e.getMessage();
        } catch (Throwable t) {
            logger.error(String.format("Error while executing comand %s", Arrays.toString(options)), t);
            return t.getMessage();
        }

        return SccpOAMMessage.INVALID_COMMAND;
    }

    public  SccpExecutor();

}