org.fusesource.fabric.boot.commands.support
Class FabricCommand

java.lang.Object
  extended by org.apache.karaf.shell.console.AbstractAction
      extended by org.apache.karaf.shell.console.OsgiCommandSupport
          extended by org.fusesource.fabric.boot.commands.support.FabricCommand
All Implemented Interfaces:
org.apache.felix.gogo.commands.Action, org.apache.karaf.shell.console.BundleContextAware
Direct Known Subclasses:
ContainerCreateSupport

public abstract class FabricCommand
extends org.apache.karaf.shell.console.OsgiCommandSupport


Field Summary
protected static java.lang.String AGENT_PID
           
protected  org.osgi.service.cm.ConfigurationAdmin configurationAdmin
           
protected  FabricService fabricService
           
 
Fields inherited from class org.apache.karaf.shell.console.OsgiCommandSupport
bundleContext, usedReferences
 
Fields inherited from class org.apache.karaf.shell.console.AbstractAction
log, session
 
Constructor Summary
FabricCommand()
           
 
Method Summary
protected  void checkFabricAvailable()
           
protected  boolean doesContainerExist(java.lang.String name)
           
 org.osgi.service.cm.ConfigurationAdmin getConfigurationAdmin()
           
protected  Container getContainer(java.lang.String name)
          Gets the container by the given name
 FabricService getFabricService()
           
protected  Profile getProfile(Version ver, java.lang.String name)
           
protected  Profile[] getProfiles(java.lang.String version, java.util.List<java.lang.String> names)
           
protected  Profile[] getProfiles(Version version, java.util.List<java.lang.String> names)
           
 IZKClient getZooKeeper()
           
protected  boolean isPartOfEnsemble(java.lang.String containerName)
          Checks if container is part of the ensemble.
protected  java.lang.String percentText(double value)
           
 void setConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin configurationAdmin)
           
 void setFabricService(FabricService fabricService)
           
 void setZooKeeper(IZKClient zooKeeper)
           
protected  java.lang.String toString(Profile[] profiles)
           
 
Methods inherited from class org.apache.karaf.shell.console.OsgiCommandSupport
execute, getAllServices, getBundleContext, getService, setBundleContext, ungetServices
 
Methods inherited from class org.apache.karaf.shell.console.AbstractAction
doExecute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fabricService

protected FabricService fabricService

configurationAdmin

protected org.osgi.service.cm.ConfigurationAdmin configurationAdmin

AGENT_PID

protected static java.lang.String AGENT_PID
Constructor Detail

FabricCommand

public FabricCommand()
Method Detail

getFabricService

public FabricService getFabricService()

setFabricService

public void setFabricService(FabricService fabricService)

getZooKeeper

public IZKClient getZooKeeper()

setZooKeeper

public void setZooKeeper(IZKClient zooKeeper)

getConfigurationAdmin

public org.osgi.service.cm.ConfigurationAdmin getConfigurationAdmin()

setConfigurationAdmin

public void setConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin configurationAdmin)

checkFabricAvailable

protected void checkFabricAvailable()
                             throws java.lang.Exception
Throws:
java.lang.Exception

toString

protected java.lang.String toString(Profile[] profiles)

getProfiles

protected Profile[] getProfiles(java.lang.String version,
                                java.util.List<java.lang.String> names)

getProfiles

protected Profile[] getProfiles(Version version,
                                java.util.List<java.lang.String> names)

getProfile

protected Profile getProfile(Version ver,
                             java.lang.String name)

isPartOfEnsemble

protected boolean isPartOfEnsemble(java.lang.String containerName)
Checks if container is part of the ensemble.

Parameters:
containerName -
Returns:

getContainer

protected Container getContainer(java.lang.String name)
Gets the container by the given name

Parameters:
name - the name of the container
Returns:
the found container, or null if not found

doesContainerExist

protected boolean doesContainerExist(java.lang.String name)

percentText

protected java.lang.String percentText(double value)


Copyright © 2013 Red Hat. All Rights Reserved.