Package org.apache.activemq.console.formatter

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


     * @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<String> tokens = new ArrayList<String>(Arrays.asList(args));

        ShellCommand main = new ShellCommand();
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

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

        ByteArrayOutputStream out = new ByteArrayOutputStream();
        CommandContext ctx = new CommandContext();
        ctx.setFormatter(new CommandShellOutputFormatter(out));

        // lets turn the text into a list of arguments
        String requestText = request.getText();

        List<String> tokens = tokenize(requestText);
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

    @Argument(index=0, multiValued=true, required=true)
    private ArrayList<String> arguments = new ArrayList<String>();

    protected Object doExecute() throws Exception {
        CommandContext context2 = new CommandContext();
        context2.setFormatter(new CommandShellOutputFormatter(System.out));
        Command currentCommand = command.getClass().newInstance();

        try {
            currentCommand.setCommandContext(context2);
            // must be added first
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

     *
     * @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

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.