org.apache.ode.karaf.commands
Class OdeCommandsBase

java.lang.Object
  extended by org.apache.karaf.shell.console.AbstractAction
      extended by org.apache.karaf.shell.console.OsgiCommandSupport
          extended by org.apache.ode.karaf.commands.OdeCommandsBase
All Implemented Interfaces:
org.apache.felix.gogo.commands.Action, org.apache.karaf.shell.console.BundleContextAware
Direct Known Subclasses:
OdeListCommand, OdeRecoverActivityCommand, OdeResumeCommand, OdeSuspendCommand, OdeTerminateCommand

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


Field Summary
protected static java.lang.String COMPONENT_NAME
           
protected static java.lang.String LIST_ALL_INSTANCES
           
protected static java.lang.String LIST_ALL_PROCESSES
           
protected static java.lang.String LIST_INSTANCES
           
protected static java.lang.String RECOVER_ACTIVITY
           
protected static java.lang.String RESUME
           
protected static java.lang.String SUSPEND
           
protected static java.lang.String TERMINATE
           
 
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
OdeCommandsBase()
           
 
Method Summary
protected  java.util.List<TInstanceInfo> getActiveInstances(long timeoutInSeconds)
           
protected  java.util.List<TInstanceInfo> getAllInstances(long timeoutInSeconds)
           
protected  java.util.List<TInstanceInfo> getFilteredInstances(long timeoutInSeconds, java.lang.String filter)
           
protected  javax.management.MBeanServer getMBeanServer()
           
protected  java.util.List<TProcessInfo> getProcesses(long timeoutInSeconds)
           
protected  java.util.List<TInstanceInfo> getSuspendedInstances(long timeoutInSeconds)
           
protected
<T> T
invoke(java.lang.String operationName, java.lang.Object[] params, java.lang.String[] signature, long timeoutInSeconds)
          Invokes an operation on the ODE MBean server
protected  InstanceInfoDocument recoverActivity(java.lang.Long instanceId, java.lang.Long activityId, java.lang.String action, long timeoutInSeconds)
           
protected  void resume(java.lang.Long iid, long timeoutInSeconds)
           
protected  void suspend(java.lang.Long iid, long timeoutInSeconds)
           
protected  void terminate(java.lang.Long iid, long timeoutInSeconds)
           
 
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

COMPONENT_NAME

protected static java.lang.String COMPONENT_NAME

LIST_INSTANCES

protected static final java.lang.String LIST_INSTANCES
See Also:
Constant Field Values

LIST_ALL_INSTANCES

protected static final java.lang.String LIST_ALL_INSTANCES
See Also:
Constant Field Values

LIST_ALL_PROCESSES

protected static final java.lang.String LIST_ALL_PROCESSES
See Also:
Constant Field Values

RECOVER_ACTIVITY

protected static final java.lang.String RECOVER_ACTIVITY
See Also:
Constant Field Values

TERMINATE

protected static final java.lang.String TERMINATE
See Also:
Constant Field Values

SUSPEND

protected static final java.lang.String SUSPEND
See Also:
Constant Field Values

RESUME

protected static final java.lang.String RESUME
See Also:
Constant Field Values
Constructor Detail

OdeCommandsBase

public OdeCommandsBase()
Method Detail

getMBeanServer

protected javax.management.MBeanServer getMBeanServer()

invoke

protected <T> T invoke(java.lang.String operationName,
                       java.lang.Object[] params,
                       java.lang.String[] signature,
                       long timeoutInSeconds)
            throws java.lang.Exception
Invokes an operation on the ODE MBean server

Type Parameters:
T -
Parameters:
operationName -
args -
T -
Returns:
Throws:
java.lang.Exception

getActiveInstances

protected java.util.List<TInstanceInfo> getActiveInstances(long timeoutInSeconds)
                                                    throws java.lang.Exception
Throws:
java.lang.Exception

getSuspendedInstances

protected java.util.List<TInstanceInfo> getSuspendedInstances(long timeoutInSeconds)
                                                       throws java.lang.Exception
Throws:
java.lang.Exception

getFilteredInstances

protected java.util.List<TInstanceInfo> getFilteredInstances(long timeoutInSeconds,
                                                             java.lang.String filter)
                                                      throws java.lang.Exception
Throws:
java.lang.Exception

getAllInstances

protected java.util.List<TInstanceInfo> getAllInstances(long timeoutInSeconds)
                                                 throws java.lang.Exception
Throws:
java.lang.Exception

getProcesses

protected java.util.List<TProcessInfo> getProcesses(long timeoutInSeconds)
                                             throws java.lang.Exception
Throws:
java.lang.Exception

recoverActivity

protected InstanceInfoDocument recoverActivity(java.lang.Long instanceId,
                                               java.lang.Long activityId,
                                               java.lang.String action,
                                               long timeoutInSeconds)
                                        throws java.lang.Exception
Throws:
java.lang.Exception

terminate

protected void terminate(java.lang.Long iid,
                         long timeoutInSeconds)
                  throws java.lang.Exception
Throws:
java.lang.Exception

suspend

protected void suspend(java.lang.Long iid,
                       long timeoutInSeconds)
                throws java.lang.Exception
Throws:
java.lang.Exception

resume

protected void resume(java.lang.Long iid,
                      long timeoutInSeconds)
               throws java.lang.Exception
Throws:
java.lang.Exception