Package org.apache.activemq.console.formatter

Examples of org.apache.activemq.console.formatter.CommandShellOutputFormatter


     *
     * @see org.apache.commons.daemon.Daemon#start()
     */
    public void start() throws Exception {
        CommandContext context = new CommandContext();
        context.setFormatter(new CommandShellOutputFormatter(System.out));

        Command command = new StartCommand();
        command.setCommandContext(context);

        command.execute(args);
View Full Code Here


     *
     * @see org.apache.commons.daemon.Daemon#stop()
     */
    public void stop() throws Exception {
        CommandContext context = new CommandContext();
        context.setFormatter(new CommandShellOutputFormatter(System.out));

        Command command = new ShutdownCommand();
        command.setCommandContext(context);

        List<String> tokens = new ArrayList<String>(Arrays.asList(new String[] {
View Full Code Here

     * @return 0 for a successful run, -1 if there are any exception
     */
    public static int main(String[] args, InputStream in, PrintStream out) {
       
        CommandContext context = new CommandContext();
        context.setFormatter(new CommandShellOutputFormatter(out));

        // Convert arguments to list for easier management
        List<String> tokens = new ArrayList<String>(Arrays.asList(args));

        ShellCommand main = new ShellCommand();
View Full Code Here

    private ShellCommand command = new ShellCommand();

    public void processCommand(TextMessage request, TextMessage response) throws Exception {

        ByteArrayOutputStream out = new ByteArrayOutputStream();
        GlobalWriter.instantiate(new CommandShellOutputFormatter(out));

        // lets turn the text into a list of arguments
        List tokens = tokenize(request.getText());
        command.execute(tokens);
View Full Code Here

     * @param in - input stream to use
     * @param out - output stream to use
     * @return 0 for a successful run, -1 if there are any exception
     */
    public static int main(String[] args, InputStream in, PrintStream out) {
        GlobalWriter.instantiate(new CommandShellOutputFormatter(out));

        // Convert arguments to list for easier management
        List tokens = new ArrayList(Arrays.asList(args));

        ShellCommand main = new ShellCommand();
View Full Code Here

    public void testPurgeCommandSimpleSelector() throws Exception {
        try {
            PurgeCommand purgeCommand = new PurgeCommand();
            CommandContext context = new CommandContext();

            context.setFormatter(new CommandShellOutputFormatter(System.out));

            purgeCommand.setCommandContext(context);
            purgeCommand.setJmxUseLocal(true);

            List<String> tokens = new ArrayList<String>();
View Full Code Here

    public void testPurgeCommandComplexSelector() throws Exception {
        try {
            PurgeCommand purgeCommand = new PurgeCommand();
            CommandContext context = new CommandContext();

            context.setFormatter(new CommandShellOutputFormatter(System.out));

            purgeCommand.setCommandContext(context);
            purgeCommand.setJmxUseLocal(true);

            List<String> tokens = new ArrayList<String>();
View Full Code Here

            }

            PurgeCommand purgeCommand = new PurgeCommand();
            CommandContext context = new CommandContext();

            context.setFormatter(new CommandShellOutputFormatter(System.out));

            purgeCommand.setCommandContext(context);
            purgeCommand.setJmxUseLocal(true);

            List<String> tokens = new ArrayList<String>();
View Full Code Here

    public void testPurgeCommandComplexSQLSelector_OR() throws Exception {
        try {
            PurgeCommand purgeCommand = new PurgeCommand();
            CommandContext context = new CommandContext();

            context.setFormatter(new CommandShellOutputFormatter(System.out));

            purgeCommand.setCommandContext(context);
            purgeCommand.setJmxUseLocal(true);

            List<String> tokens = new ArrayList<String>();
View Full Code Here

            }

            PurgeCommand purgeCommand = new PurgeCommand();
            CommandContext context = new CommandContext();

            context.setFormatter(new CommandShellOutputFormatter(System.out));

            purgeCommand.setCommandContext(context);
            purgeCommand.setJmxUseLocal(true);

            List<String> tokens = new ArrayList<String>();
View Full Code Here

TOP

Related Classes of org.apache.activemq.console.formatter.CommandShellOutputFormatter

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.