![JAR search and dependency download from the Maven repository](/logo.png)
org.apache.servicemix.activemq.commands.ActiveMQCommand Maven / Gradle / Ivy
The newest version!
/**
*
* 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.servicemix.activemq.commands;
import org.apache.felix.gogo.commands.Action;
import org.apache.felix.gogo.commands.Argument;
import org.apache.felix.gogo.commands.basic.AbstractCommand;
import org.apache.felix.gogo.commands.basic.ActionPreparator;
import org.apache.felix.gogo.commands.basic.DefaultActionPreparator;
import org.apache.felix.karaf.shell.console.BlueprintContainerAware;
import org.apache.felix.karaf.shell.console.BundleContextAware;
import org.apache.felix.karaf.shell.console.CompletableFunction;
import org.apache.felix.karaf.shell.console.Completer;
import org.apache.felix.karaf.shell.console.commands.GenericType;
import org.osgi.framework.BundleContext;
import org.osgi.service.blueprint.container.BlueprintContainer;
import org.osgi.service.blueprint.container.Converter;
import org.osgi.service.command.CommandSession;
import java.lang.reflect.Field;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
/**
* Base command to process options and wrap native ActiveMQ console commands.
*/
public class ActiveMQCommand extends AbstractCommand implements CompletableFunction
{
protected BlueprintContainer blueprintContainer;
protected Converter blueprintConverter;
protected String actionId;
protected List completers;
public void setBlueprintContainer(BlueprintContainer blueprintContainer) {
this.blueprintContainer = blueprintContainer;
}
public void setBlueprintConverter(Converter blueprintConverter) {
this.blueprintConverter = blueprintConverter;
}
public void setActionId(String actionId) {
this.actionId = actionId;
}
public List getCompleters() {
return completers;
}
public void setCompleters(List completers) {
this.completers = completers;
}
@Override
protected ActionPreparator getPreparator() throws Exception {
return new ActiveMQActionPreparator();
}
class ActiveMQActionPreparator extends DefaultActionPreparator {
@Override
public boolean prepare(Action action, CommandSession session, List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy