org.apache.servicemix.jbi.framework
Class AdminCommandsService

java.lang.Object
  extended by org.apache.servicemix.jbi.management.BaseLifeCycle
      extended by org.apache.servicemix.jbi.management.BaseSystemService
          extended by org.apache.servicemix.jbi.framework.AdminCommandsService
All Implemented Interfaces:
javax.jbi.management.LifeCycleMBean, AdminCommandsServiceMBean, MBeanInfoProvider

public class AdminCommandsService
extends BaseSystemService
implements AdminCommandsServiceMBean


Field Summary
 
Fields inherited from class org.apache.servicemix.jbi.management.BaseSystemService
container
 
Fields inherited from class org.apache.servicemix.jbi.management.BaseLifeCycle
currentState, INITIALIZED, listener
 
Fields inherited from interface javax.jbi.management.LifeCycleMBean
SHUTDOWN, STARTED, STOPPED, UNKNOWN
 
Constructor Summary
AdminCommandsService()
           
 
Method Summary
 String deployServiceAssembly(String file, boolean deferException)
          Deploys a Service Assembly.
 String getDescription()
          Get the Description of the item
 MBeanOperationInfo[] getOperationInfos()
          Get an array of MBeanOperationInfo
protected  Class getServiceMBean()
           
 String installArchive(String location)
          load an archive from an external location and starts it The archive can be a Component, Service Assembly or Shared Library.
 String installComponent(String file, Properties props, boolean deferException)
          Install a JBI component (a Service Engine or Binding Component)
 String installSharedLibrary(String file, boolean deferException)
          Installs a Shared Library.
 String listComponents(boolean excludeSEs, boolean excludeBCs, boolean excludePojos, String requiredState, String sharedLibraryName, String serviceAssemblyName)
          Prints information about all components (Service Engine or Binding Component) installed
 String listServiceAssemblies(String state, String componentName, String serviceAssemblyName)
          Prints information about service assemblies deployed.
 String listSharedLibraries(String componentName, String sharedLibraryName)
          Prints information about shared libraries installed.
 String shutdownComponent(String name)
          Shuts down a particular Component.
 String shutdownServiceAssembly(String name)
          Shuts down a particular service assembly.
 String startComponent(String name)
          Starts a particular Component (Service Engine or Binding Component).
 String startServiceAssembly(String name)
          Starts a service assembly.
 String stopComponent(String name)
          Stops a particular Component (Service Engine or Binding Component).
 String stopServiceAssembly(String name)
          Stops a particular service assembly.
 String undeployServiceAssembly(String name)
          Undeploys a previously deployed service assembly.
 String uninstallComponent(String name)
          Uninstalls a previously install JBI Component (a Service Engine or Binding Component)
 String uninstallSharedLibrary(String name)
          Uninstalls a previously installed Shared Library.
 
Methods inherited from class org.apache.servicemix.jbi.management.BaseSystemService
getContainer, getName, getType, init, shutDown
 
Methods inherited from class org.apache.servicemix.jbi.management.BaseLifeCycle
firePropertyChanged, getAttributeInfos, getCurrentState, getObjectToManage, getSubType, init, isInitialized, isShutDown, isStarted, isStopped, isUnknown, setCurrentState, setPropertyChangeListener, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.jbi.management.LifeCycleMBean
getCurrentState, shutDown, start, stop
 

Constructor Detail

AdminCommandsService

public AdminCommandsService()
Method Detail

getDescription

public String getDescription()
Description copied from interface: MBeanInfoProvider
Get the Description of the item

Specified by:
getDescription in interface MBeanInfoProvider
Returns:
a description of this

getServiceMBean

protected Class getServiceMBean()
Specified by:
getServiceMBean in class BaseSystemService

installComponent

public String installComponent(String file,
                               Properties props,
                               boolean deferException)
                        throws Exception
Install a JBI component (a Service Engine or Binding Component)

Specified by:
installComponent in interface AdminCommandsServiceMBean
Parameters:
file - jbi component archive to install
props - installation properties
Returns:
Throws:
Exception

uninstallComponent

public String uninstallComponent(String name)
                          throws Exception
Uninstalls a previously install JBI Component (a Service Engine or Binding Component)

Specified by:
uninstallComponent in interface AdminCommandsServiceMBean
Parameters:
name -
Returns:
Throws:
Exception

installSharedLibrary

public String installSharedLibrary(String file,
                                   boolean deferException)
                            throws Exception
Installs a Shared Library.

Specified by:
installSharedLibrary in interface AdminCommandsServiceMBean
Parameters:
file -
Returns:
Throws:
Exception

uninstallSharedLibrary

public String uninstallSharedLibrary(String name)
                              throws Exception
Uninstalls a previously installed Shared Library.

Specified by:
uninstallSharedLibrary in interface AdminCommandsServiceMBean
Parameters:
name -
Returns:
Throws:
Exception

startComponent

public String startComponent(String name)
                      throws Exception
Starts a particular Component (Service Engine or Binding Component).

Specified by:
startComponent in interface AdminCommandsServiceMBean
Parameters:
name -
Returns:
Throws:
Exception

stopComponent

public String stopComponent(String name)
                     throws Exception
Stops a particular Component (Service Engine or Binding Component).

Specified by:
stopComponent in interface AdminCommandsServiceMBean
Parameters:
name -
Returns:
Throws:
Exception

shutdownComponent

public String shutdownComponent(String name)
                         throws Exception
Shuts down a particular Component.

Specified by:
shutdownComponent in interface AdminCommandsServiceMBean
Parameters:
name -
Returns:
Throws:
Exception

deployServiceAssembly

public String deployServiceAssembly(String file,
                                    boolean deferException)
                             throws Exception
Deploys a Service Assembly.

Specified by:
deployServiceAssembly in interface AdminCommandsServiceMBean
Parameters:
file -
Returns:
Throws:
Exception

undeployServiceAssembly

public String undeployServiceAssembly(String name)
                               throws Exception
Undeploys a previously deployed service assembly.

Specified by:
undeployServiceAssembly in interface AdminCommandsServiceMBean
Parameters:
name -
Returns:
Throws:
Exception

startServiceAssembly

public String startServiceAssembly(String name)
                            throws Exception
Starts a service assembly.

Specified by:
startServiceAssembly in interface AdminCommandsServiceMBean
Parameters:
name -
Returns:
Throws:
Exception

stopServiceAssembly

public String stopServiceAssembly(String name)
                           throws Exception
Stops a particular service assembly.

Specified by:
stopServiceAssembly in interface AdminCommandsServiceMBean
Parameters:
name -
Returns:
Throws:
Exception

shutdownServiceAssembly

public String shutdownServiceAssembly(String name)
                               throws Exception
Shuts down a particular service assembly.

Specified by:
shutdownServiceAssembly in interface AdminCommandsServiceMBean
Parameters:
name -
Returns:
Throws:
Exception

installArchive

public String installArchive(String location)
                      throws Exception
load an archive from an external location and starts it The archive can be a Component, Service Assembly or Shared Library.

Specified by:
installArchive in interface AdminCommandsServiceMBean
Parameters:
location - - can either be a url or filename (if relative - must be relative to the container)
Returns:
status
Throws:
Exception

listComponents

public String listComponents(boolean excludeSEs,
                             boolean excludeBCs,
                             boolean excludePojos,
                             String requiredState,
                             String sharedLibraryName,
                             String serviceAssemblyName)
                      throws Exception
Prints information about all components (Service Engine or Binding Component) installed

Specified by:
listComponents in interface AdminCommandsServiceMBean
Parameters:
serviceEngines -
bindingComponents -
state -
sharedLibraryName -
serviceAssemblyName -
Returns:
list of components in an XML blob
Throws:
Exception

listSharedLibraries

public String listSharedLibraries(String componentName,
                                  String sharedLibraryName)
                           throws Exception
Prints information about shared libraries installed.

Specified by:
listSharedLibraries in interface AdminCommandsServiceMBean
Parameters:
componentName -
sharedLibraryName -
Returns:
Throws:
Exception

listServiceAssemblies

public String listServiceAssemblies(String state,
                                    String componentName,
                                    String serviceAssemblyName)
                             throws Exception
Prints information about service assemblies deployed.

Specified by:
listServiceAssemblies in interface AdminCommandsServiceMBean
Parameters:
state -
componentName -
serviceAssemblyName -
Returns:
Throws:
Exception

getOperationInfos

public MBeanOperationInfo[] getOperationInfos()
                                       throws JMException
Description copied from class: BaseLifeCycle
Get an array of MBeanOperationInfo

Specified by:
getOperationInfos in interface MBeanInfoProvider
Overrides:
getOperationInfos in class BaseLifeCycle
Returns:
array of OperationInfos
Throws:
JMException


Copyright © 2005-2008 Apache Software Foundation. All Rights Reserved.