Examples of connectController()


Examples of org.jboss.as.cli.CommandContext.connectController()

    @Test
    public void testDeployArchive() throws Exception {

        final CommandContext ctx = CLITestUtil.getCommandContext();
        try {
            ctx.connectController();
            ctx.handle("deploy " + cliArchiveFile.getAbsolutePath() + " --script=install.scr");

            // check that now both wars are deployed
            String response = HttpRequest.get(getBaseURL(url) + "deployment0/SimpleServlet", 10, TimeUnit.SECONDS);
            assertTrue("Invalid response: " + response, response.indexOf("SimpleServlet") >=0);
View Full Code Here

Examples of org.jboss.as.cli.CommandContext.connectController()

    @Test
    public void testUnDeployArchive() throws Exception {

        final CommandContext ctx = CLITestUtil.getCommandContext();
        try {
            ctx.connectController();
            ctx.handle("deploy " + cliArchiveFile.getAbsolutePath() + " --script=install.scr");

            // check that now both wars are deployed
            String response = HttpRequest.get(getBaseURL(url) + "deployment0/SimpleServlet", 10, TimeUnit.SECONDS);
            assertTrue("Invalid response: " + response, response.indexOf("SimpleServlet") >=0);
View Full Code Here

Examples of org.jboss.as.cli.CommandContext.connectController()

    @Test
    public void testDeployUndeployArchive() throws Exception {

        final CommandContext ctx = CLITestUtil.getCommandContext();
        try {
            ctx.connectController();
            ctx.handle("deploy " + cliArchiveFile.getAbsolutePath());

            // check that now both wars are deployed
            String response = HttpRequest.get(getBaseURL(url) + "deployment0/SimpleServlet", 10, TimeUnit.SECONDS);
            assertTrue("Invalid response: " + response, response.indexOf("SimpleServlet") >=0);
View Full Code Here

Examples of org.jboss.as.cli.CommandContext.connectController()

    private static CommandContext initCommandContext(String defaultHost, int defaultPort, String username, char[] password, boolean initConsole, boolean connect, final int connectionTimeout) throws CliInitializationException {
        final CommandContext cmdCtx = CommandContextFactory.getInstance().newCommandContext(defaultHost, defaultPort, username, password, initConsole, connectionTimeout);
        if(connect) {
            try {
                cmdCtx.connectController();
            } catch (CommandLineException e) {
                throw new CliInitializationException("Failed to connect to the controller", e);
            }
        }
        return cmdCtx;
View Full Code Here

Examples of org.jboss.as.cli.CommandContext.connectController()

    private static CommandContext initCommandContext(String defaultHost, int defaultPort, String username, char[] password, boolean initConsole, boolean connect) throws CliInitializationException {
        final CommandContext cmdCtx = CommandContextFactory.getInstance().newCommandContext(defaultHost, defaultPort, username, password, initConsole);
        if(connect) {
            try {
                cmdCtx.connectController();
            } catch (CommandLineException e) {
                throw new CliInitializationException("Failed to connect to the controller", e);
            }
        }
        return cmdCtx;
View Full Code Here

Examples of org.jboss.as.cli.CommandContext.connectController()

    }

    private static CommandContext initCommandContext(String defaultHost, int defaultPort, String username, char[] password, boolean initConsole, boolean connect) throws CliInitializationException {
        final CommandContext cmdCtx = CommandContextFactory.getInstance().newCommandContext(defaultHost, defaultPort, username, password, initConsole);
        if(connect) {
            cmdCtx.connectController(null, -1);
        }
        return cmdCtx;
    }

    private static void processGui(final CommandContext cmdCtx) {
View Full Code Here

Examples of org.jboss.as.cli.CommandContext.connectController()

                public void cliEvent(CliEvent event, CommandContext ctx) {
                    _logger.debug("CLI Event: " + event.toString());
                }
            });
        }
        cmdCtx.connectController();
       
        BufferedReader reader = null;
        try {
            reader = new BufferedReader(new FileReader(file));
            _logger.info("Executing CLI script file: " + path);
View Full Code Here
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.