camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [09/15] camel git commit: CAMEL-8140: Camel commands - Remove backlog tracer commands
Date Wed, 10 Dec 2014 16:32:19 GMT
CAMEL-8140: Camel commands - Remove backlog tracer commands


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/050ee060
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/050ee060
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/050ee060

Branch: refs/heads/master
Commit: 050ee0609923cccd41efcc3986b8208a0aefdb1e
Parents: 0fe994b
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Wed Dec 10 14:25:40 2014 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Wed Dec 10 14:25:40 2014 +0100

----------------------------------------------------------------------
 .../commands/BacklogTracerDumpCommand.java      | 121 -------------------
 .../commands/BacklogTracerInfoCommand.java      |  54 ---------
 .../commands/BacklogTracerStartCommand.java     |  62 ----------
 .../commands/BacklogTracerStopCommand.java      |  48 --------
 .../camel/karaf/commands/BacklogTracerDump.java |  45 -------
 .../camel/karaf/commands/BacklogTracerInfo.java |  34 ------
 .../karaf/commands/BacklogTracerStart.java      |  53 --------
 .../camel/karaf/commands/BacklogTracerStop.java |  35 ------
 8 files changed, 452 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/050ee060/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/BacklogTracerDumpCommand.java
----------------------------------------------------------------------
diff --git a/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/BacklogTracerDumpCommand.java
b/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/BacklogTracerDumpCommand.java
deleted file mode 100644
index 65fe217..0000000
--- a/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/BacklogTracerDumpCommand.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.commands;
-
-import java.io.PrintStream;
-import java.io.StringReader;
-import java.text.SimpleDateFormat;
-import java.util.List;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.Unmarshaller;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.Exchange;
-import org.apache.camel.api.management.mbean.BacklogTracerEventMessage;
-import org.apache.camel.processor.interceptor.BacklogTracer;
-import org.apache.camel.util.MessageDump;
-
-/**
- * Command to use the <a href="camel.apache.org/backlogtracer">Backlog Tracer</a>.
- */
-public class BacklogTracerDumpCommand extends AbstractContextCommand {
-
-    private String pattern;
-    private String format;
-    private Integer bodySize;
-
-    /**
-     * @param context  The name of the Camel context.
-     * @param pattern  To dump trace messages only for nodes or routes matching the given
pattern (default is all)
-     * @param format   Format to use with the dump action (text or xml)
-     * @param bodySize To limit the body size when using text format
-     */
-    public BacklogTracerDumpCommand(String context, String pattern, String format, Integer
bodySize) {
-        super(context);
-        this.pattern = pattern;
-        this.format = format;
-        this.bodySize = bodySize;
-    }
-
-    @Override
-    protected Object performContextCommand(CamelController camelController, CamelContext
camelContext, PrintStream out, PrintStream err) throws Exception {
-        BacklogTracer backlogTracer = BacklogTracer.getBacklogTracer(camelContext);
-        if (backlogTracer == null) {
-            backlogTracer = (BacklogTracer) camelContext.getDefaultBacklogTracer();
-        }
-
-        if (format == null || "text".equals(format)) {
-            JAXBContext context = JAXBContext.newInstance(MessageDump.class);
-            Unmarshaller unmarshaller = context.createUnmarshaller();
-            SimpleDateFormat sdf = new SimpleDateFormat(BacklogTracerEventMessage.TIMESTAMP_FORMAT);
-
-            List<BacklogTracerEventMessage> events;
-            if (pattern != null) {
-                events = backlogTracer.dumpTracedMessages(pattern);
-            } else {
-                events = backlogTracer.dumpAllTracedMessages();
-            }
-            for (BacklogTracerEventMessage event : events) {
-                MessageDump msg = (MessageDump) unmarshaller.unmarshal(new StringReader(event.getMessageAsXml()));
-                String breadcrumb = getBreadcrumbId(msg.getHeaders());
-
-                out.println("#" + event.getUid() + "\tTimestamp:\t" + sdf.format(event.getTimestamp()));
-                if (breadcrumb != null) {
-                    out.println("Breadcrumb: " + breadcrumb);
-                }
-                out.println("ExchangeId: " + event.getExchangeId());
-
-                if (event.getToNode() != null) {
-                    out.println("Route: " + event.getRouteId() + "\t--> " + event.getToNode());
-                } else {
-                    out.println("Route: " + event.getRouteId());
-                }
-
-                String body = msg.getBody().getValue();
-                if (bodySize != null && bodySize > 0) {
-                    if (body.length() > bodySize) {
-                        body = body.substring(0, bodySize);
-                    }
-                }
-                out.println(body);
-                out.println("");
-            }
-        } else if ("xml".equals(format)) {
-            if (pattern != null) {
-                out.println("BacklogTracer messages:\n" + backlogTracer.dumpTracedMessages(pattern));
-            } else {
-                out.println("BacklogTracer messages:\n" + backlogTracer.dumpAllTracedMessagesAsXml());
-            }
-            return null;
-        }
-
-        return null;
-    }
-
-    private static String getBreadcrumbId(List<MessageDump.Header> headers) {
-        if (headers == null || headers.isEmpty()) {
-            return null;
-        }
-        for (MessageDump.Header header : headers) {
-            if (header.getKey().equals(Exchange.BREADCRUMB_ID)) {
-                return header.getValue();
-            }
-        }
-        return null;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/050ee060/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/BacklogTracerInfoCommand.java
----------------------------------------------------------------------
diff --git a/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/BacklogTracerInfoCommand.java
b/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/BacklogTracerInfoCommand.java
deleted file mode 100644
index 8ed5db1..0000000
--- a/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/BacklogTracerInfoCommand.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.commands;
-
-import java.io.PrintStream;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.processor.interceptor.BacklogTracer;
-
-/**
- * Command to use the <a href="camel.apache.org/backlogtracer">Backlog Tracer</a>.
- */
-public class BacklogTracerInfoCommand extends AbstractContextCommand {
-
-    public BacklogTracerInfoCommand(String context) {
-        super(context);
-    }
-
-    @Override
-    protected Object performContextCommand(CamelController camelController, CamelContext
camelContext, PrintStream out, PrintStream err) throws Exception {
-        BacklogTracer backlogTracer = BacklogTracer.getBacklogTracer(camelContext);
-        if (backlogTracer == null) {
-            backlogTracer = (BacklogTracer) camelContext.getDefaultBacklogTracer();
-        }
-
-        out.println("BacklogTracer context:\t\t" + camelContext.getName());
-        out.println("BacklogTracer enabled:\t\t" + backlogTracer.isEnabled());
-        out.println("BacklogTracer pattern:\t\t" + (backlogTracer.getTracePattern() != null
? backlogTracer.getTracePattern() : ""));
-        out.println("BacklogTracer filter:\t\t" + (backlogTracer.getTraceFilter() != null
? backlogTracer.getTraceFilter() : ""));
-        out.println("BacklogTracer removeOnDump:\t" + backlogTracer.isRemoveOnDump());
-        out.println("BacklogTracer backlogSize:\t" + backlogTracer.getBacklogSize());
-        out.println("BacklogTracer tracerCount:\t" + backlogTracer.getTraceCounter());
-        out.println("BacklogTracer body...");
-        out.println("\tmaxChars:\t\t" + backlogTracer.getBodyMaxChars());
-        out.println("\tincludeFiles:\t\t" + backlogTracer.isBodyIncludeFiles());
-        out.println("\tincludeStreams:\t\t" + backlogTracer.isBodyIncludeStreams());
-        return null;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/050ee060/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/BacklogTracerStartCommand.java
----------------------------------------------------------------------
diff --git a/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/BacklogTracerStartCommand.java
b/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/BacklogTracerStartCommand.java
deleted file mode 100644
index 9d9a66d..0000000
--- a/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/BacklogTracerStartCommand.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.commands;
-
-import java.io.PrintStream;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.processor.interceptor.BacklogTracer;
-
-/**
- * Command to use the <a href="camel.apache.org/backlogtracer">Backlog Tracer</a>.
- */
-public class BacklogTracerStartCommand extends AbstractContextCommand {
-
-    private String pattern;
-    private String filter;
-    private Integer backlogSize;
-    private Boolean removeOnDump;
-
-    public BacklogTracerStartCommand(String context, String pattern, String filter, Integer
backlogSize, Boolean removeOnDump) {
-        super(context);
-        this.pattern = pattern;
-        this.filter = filter;
-        this.backlogSize = backlogSize;
-        this.removeOnDump = removeOnDump;
-    }
-
-    @Override
-    protected Object performContextCommand(CamelController camelController, CamelContext
camelContext, PrintStream out, PrintStream err) throws Exception {
-        BacklogTracer backlogTracer = BacklogTracer.getBacklogTracer(camelContext);
-        if (backlogTracer == null) {
-            backlogTracer = (BacklogTracer) camelContext.getDefaultBacklogTracer();
-        }
-
-        backlogTracer.setEnabled(true);
-        if (backlogSize != null) {
-            backlogTracer.setBacklogSize(backlogSize);
-        }
-        if (removeOnDump != null) {
-            backlogTracer.setRemoveOnDump(removeOnDump);
-        }
-        backlogTracer.setTracePattern(pattern);
-        backlogTracer.setTraceFilter(filter);
-
-        out.println("BacklogTracer started on " + camelContext.getName() + " with size: "
+ backlogTracer.getBacklogSize());
-        return null;
-    }
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/050ee060/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/BacklogTracerStopCommand.java
----------------------------------------------------------------------
diff --git a/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/BacklogTracerStopCommand.java
b/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/BacklogTracerStopCommand.java
deleted file mode 100644
index 3d53c82..0000000
--- a/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/BacklogTracerStopCommand.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.commands;
-
-import java.io.PrintStream;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.processor.interceptor.BacklogTracer;
-
-/**
- * Command to use the <a href="camel.apache.org/backlogtracer">Backlog Tracer</a>.
- */
-public class BacklogTracerStopCommand extends AbstractContextCommand {
-
-    public BacklogTracerStopCommand(String context) {
-        super(context);
-    }
-
-    @Override
-    protected Object performContextCommand(CamelController camelController, CamelContext
camelContext, PrintStream out, PrintStream err) throws Exception {
-        BacklogTracer backlogTracer = BacklogTracer.getBacklogTracer(camelContext);
-        if (backlogTracer == null) {
-            backlogTracer = (BacklogTracer) camelContext.getDefaultBacklogTracer();
-        }
-
-        // disable tracer and clear counter and the backlog queue
-        backlogTracer.setEnabled(false);
-        backlogTracer.resetTraceCounter();
-        backlogTracer.clear();
-        out.println("BacklogTracer stopped on " + camelContext.getName());
-        return null;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/050ee060/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/BacklogTracerDump.java
----------------------------------------------------------------------
diff --git a/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/BacklogTracerDump.java
b/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/BacklogTracerDump.java
deleted file mode 100644
index 1ecfaa4..0000000
--- a/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/BacklogTracerDump.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.karaf.commands;
-
-import org.apache.camel.commands.BacklogTracerDumpCommand;
-import org.apache.felix.gogo.commands.Argument;
-import org.apache.felix.gogo.commands.Command;
-import org.apache.felix.gogo.commands.Option;
-
-@Command(scope = "camel", name = "backlog-tracer-dump", description = "Dumps traced messages
from the Backlog tracer")
-public class BacklogTracerDump extends CamelCommandSupport {
-
-    @Argument(index = 0, name = "context", description = "The name of the Camel context.",
required = true, multiValued = false)
-    String context;
-
-    @Argument(index = 1, name = "pattern", description = "To dump trace messages only for
nodes or routes matching the given pattern (default is all)", required = false, multiValued
= false)
-    String pattern;
-
-    @Option(name = "--format", aliases = "-f", description = "Format to use with the dump
action (text or xml)", required = false, multiValued = false, valueToShowInHelp = "text")
-    String format;
-
-    @Option(name = "--bodySize", aliases = "-bs", description = "To limit the body size when
using text format", required = false, multiValued = false)
-    Integer bodySize;
-
-    @Override
-    protected Object doExecute() throws Exception {
-        BacklogTracerDumpCommand command = new BacklogTracerDumpCommand(context, pattern,
format, bodySize);
-        return command.execute(camelController, System.out, System.err);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/050ee060/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/BacklogTracerInfo.java
----------------------------------------------------------------------
diff --git a/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/BacklogTracerInfo.java
b/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/BacklogTracerInfo.java
deleted file mode 100644
index 5ae7c08..0000000
--- a/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/BacklogTracerInfo.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.karaf.commands;
-
-import org.apache.camel.commands.BacklogTracerInfoCommand;
-import org.apache.felix.gogo.commands.Argument;
-import org.apache.felix.gogo.commands.Command;
-
-@Command(scope = "camel", name = "backlog-tracer-info", description = "Displays the current
status of the Backlog tracer")
-public class BacklogTracerInfo extends CamelCommandSupport {
-
-    @Argument(index = 0, name = "context", description = "The name of the Camel context.",
required = true, multiValued = false)
-    String context;
-
-    @Override
-    protected Object doExecute() throws Exception {
-        BacklogTracerInfoCommand command = new BacklogTracerInfoCommand(context);
-        return command.execute(camelController, System.out, System.err);
-    }
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/050ee060/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/BacklogTracerStart.java
----------------------------------------------------------------------
diff --git a/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/BacklogTracerStart.java
b/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/BacklogTracerStart.java
deleted file mode 100644
index 743e921..0000000
--- a/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/BacklogTracerStart.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.karaf.commands;
-
-import org.apache.camel.commands.BacklogTracerStartCommand;
-import org.apache.felix.gogo.commands.Argument;
-import org.apache.felix.gogo.commands.Command;
-import org.apache.felix.gogo.commands.Option;
-
-@Command(scope = "camel", name = "backlog-tracer-start", description = "Starts the Backlog
tracer")
-public class BacklogTracerStart extends CamelCommandSupport {
-
-    @Argument(index = 0, name = "context", description = "The name of the Camel context.",
-            required = true, multiValued = false)
-    String context;
-
-    @Option(name = "--pattern", aliases = "-p", description = "To trace messages only for
nodes or routes matching the given pattern (default is all)",
-            required = false, multiValued = false)
-    String pattern;
-
-    @Option(name = "--filter", aliases = "-f", description = "To trace messages only for
nodes or routes matching the given filter (using simple language by default)",
-            required = false, multiValued = false)
-    String filter;
-
-    @Option(name = "--backlogSize", aliases = "-s", description = "Number of maximum traced
messages in total to keep in the backlog (FIFO queue)",
-            required = false, multiValued = false, valueToShowInHelp = "1000")
-    Integer backlogSize;
-
-    @Option(name = "--removeOnDump", aliases = "-r", description = "Whether to remove traced
messages when dumping the messages",
-            required = false, multiValued = false)
-    Boolean removeOnDump;
-
-    @Override
-    protected Object doExecute() throws Exception {
-        BacklogTracerStartCommand command = new BacklogTracerStartCommand(context, pattern,
filter, backlogSize, removeOnDump);
-        return command.execute(camelController, System.out, System.err);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/050ee060/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/BacklogTracerStop.java
----------------------------------------------------------------------
diff --git a/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/BacklogTracerStop.java
b/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/BacklogTracerStop.java
deleted file mode 100644
index aa21f21..0000000
--- a/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/BacklogTracerStop.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.karaf.commands;
-
-import org.apache.camel.commands.BacklogTracerStopCommand;
-import org.apache.felix.gogo.commands.Argument;
-import org.apache.felix.gogo.commands.Command;
-
-@Command(scope = "camel", name = "backlog-tracer-stop", description = "Stops the Backlog
tracer")
-public class BacklogTracerStop extends CamelCommandSupport {
-
-    @Argument(index = 0, name = "context", description = "The name of the Camel context.",
required = true, multiValued = false)
-    String context;
-
-    @Override
-    protected Object doExecute() throws Exception {
-        BacklogTracerStopCommand command = new BacklogTracerStopCommand(context);
-        return command.execute(camelController, System.out, System.err);
-    }
-
-}


Mime
View raw message