Package org.jboss.as.cli.parsing

Examples of org.jboss.as.cli.parsing.EnterStateCharacterHandler


    }

    ServerGroupState(ServerGroupNameState name, final PropertyListState propList) {
        super(ID);
        this.setIgnoreWhitespaces(true);
        setEnterHandler(new EnterStateCharacterHandler(name));
        putHandler(',', GlobalCharacterHandlers.LEAVE_STATE_HANDLER);
        putHandler('^', GlobalCharacterHandlers.LEAVE_STATE_HANDLER);
        putHandler('}', GlobalCharacterHandlers.LEAVE_STATE_HANDLER);
        putHandler(';', GlobalCharacterHandlers.LEAVE_STATE_HANDLER);
        putHandler('(', new EnterStateCharacterHandler(propList));
        setDefaultHandler(new LineBreakHandler(false, false){
            @Override
            protected void doHandle(ParsingContext ctx) throws CommandFormatException {
                final char ch = ctx.getCharacter();
                if(ch == '(') {
View Full Code Here


        this(AddressCommandSeparatorState.INSTANCE, ArgumentListState.INSTANCE, OutputTargetState.INSTANCE);
    }

    CommandState(AddressCommandSeparatorState addrCmdSeparator, final ArgumentListState argList, OutputTargetState outputRedirect) {
        super(ID);
        setEnterHandler(new EnterStateCharacterHandler(addrCmdSeparator));
        setDefaultHandler(new LineBreakHandler(false, false){
            @Override
            protected void doHandle(ParsingContext ctx) throws CommandFormatException {
                ctx.enterState(argList);
            }
View Full Code Here

        setEnterHandler(GlobalCharacterHandlers.CONTENT_CHARACTER_HANDLER);
        final NameValueSeparatorState nvSep = new NameValueSeparatorState(valueState);
        enterState('=', nvSep);
        //setLeaveOnWhitespace(true);
        setDefaultHandler(WordCharacterHandler.IGNORE_LB_ESCAPE_ON);
        setWhitespaceHandler(new EnterStateCharacterHandler(new WhitespaceState()));
        setReturnHandler(new CharacterHandler(){
            @Override
            public void handle(ParsingContext ctx) throws CommandFormatException {
                if(ctx.isEndOfContent()) {
                    ctx.leaveState();
View Full Code Here

    }

    public AddressOperationSeparatorState(final OperationNameState opName) {
        super("ADDR_OP_SEP");
        this.setIgnoreWhitespaces(true);
        setDefaultHandler(new EnterStateCharacterHandler(opName));
        setReturnHandler(GlobalCharacterHandlers.LEAVE_STATE_HANDLER);
    }
View Full Code Here

    public static final ArgumentValueInitialState INSTANCE = new ArgumentValueInitialState();

    public ArgumentValueInitialState() {
        super("ARG_VALUE_INIT");
        setDefaultHandler(new EnterStateCharacterHandler(new ArgumentValueState()));
        enterState('[', new ListState(new ArgumentValueState()));
        enterState('{', new ArgumentValueState());
    }
View Full Code Here

    }

    HeaderState(HeaderNameState headerName, final HeaderValueState headerValue) {
        super(ID);
        this.setIgnoreWhitespaces(true);
        setEnterHandler(new EnterStateCharacterHandler(headerName));
        putHandler(';', GlobalCharacterHandlers.LEAVE_STATE_HANDLER);
        putHandler('}', GlobalCharacterHandlers.LEAVE_STATE_HANDLER);
        final NameValueSeparatorState nameValueSep = new NameValueSeparatorState(headerValue);
        enterState('=', nameValueSep);
        setDefaultHandler(new EnterStateCharacterHandler(headerValue));
        setReturnHandler(new CharacterHandler(){
            @Override
            public void handle(ParsingContext ctx) throws CommandFormatException {
                if(ctx.isEndOfContent()) {
                    return;
View Full Code Here

    }

    private static class NameValueSeparatorState extends DefaultParsingState {
        NameValueSeparatorState(PropertyValueState valueState) {
            super("NAME_VALUE_SEPARATOR");
            setDefaultHandler(new EnterStateCharacterHandler(valueState));
            setReturnHandler(GlobalCharacterHandlers.LEAVE_STATE_HANDLER);
            setIgnoreWhitespaces(true);
        }
View Full Code Here

    }

    private static class NameValueSeparatorState extends DefaultParsingState {
        NameValueSeparatorState(PropertyValueState valueState) {
            super("NAME_VALUE_SEPARATOR");
            setDefaultHandler(new EnterStateCharacterHandler(valueState));
            setReturnHandler(GlobalCharacterHandlers.LEAVE_STATE_HANDLER);
            setIgnoreWhitespaces(true);
        }
View Full Code Here

            public void handle(ParsingContext ctx) throws CommandFormatException {
                if(ctx.getCharacter() != '[') {
                    ctx.enterState(value);
                }
            }});
        setDefaultHandler(new EnterStateCharacterHandler(value));
        enterState(',', ListItemSeparatorState.INSTANCE);
        leaveState(']');
        setReturnHandler(new CharacterHandler(){
            @Override
            public void handle(ParsingContext ctx) throws CommandFormatException {
View Full Code Here

        this(AddressCommandSeparatorState.INSTANCE, ArgumentListState.INSTANCE, OutputTargetState.INSTANCE);
    }

    CommandState(AddressCommandSeparatorState addrCmdSeparator, final ArgumentListState argList, OutputTargetState outputRedirect) {
        super(ID);
        setEnterHandler(new EnterStateCharacterHandler(addrCmdSeparator));
        setDefaultHandler(new LineBreakHandler(false, false){
            @Override
            protected void doHandle(ParsingContext ctx) throws CommandFormatException {
                ctx.enterState(argList);
            }
View Full Code Here

TOP

Related Classes of org.jboss.as.cli.parsing.EnterStateCharacterHandler

Copyright © 2018 www.massapicom. 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.