public class AbstractUIMBeanImpl extends Object
| Constructor and Description |
|---|
AbstractUIMBeanImpl(EnvironmentContext anEnvContext)
constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected AttributeList |
constructMBeanAttributes(MBeanServerConnection mbeanServer,
ObjectName objectName,
Properties params)
invokes the operation on mbean
|
protected AttributeList |
constructMBeanAttributes(ObjectName objectName,
Properties params)
invokes the operation on mbean
|
ObjectName |
findDeployerMBean(String componentName)
returns the ObjectName for the DeployerMBean for the component.
|
protected AdministrationService |
getAdministrationService()
Get the Administration Service
|
ObjectName |
getAdminServiceMBeanObjectName()
returns the ObjectName for the AdminService Mbean of this component.
|
protected Object |
getAttributeValue(MBeanServer mbeanServer,
ObjectName objectName,
String attributeName)
Invokes the mbean and retrieves the attribute value
|
protected Object |
getAttributeValue(ObjectName objectName,
String attributeName)
Invokes the mbean and retrieves the attribute value
|
ObjectName |
getComponentLifeCycleMBeanObjectName(String componentName,
String targetName)
returns the ObjectName for the lifecycle Mbean of this component.
|
protected String |
getComponentNameFromJmxObjectName(ObjectName jmxObjectName)
finds the component id property in the object name
|
Collection |
getComponentNamesDependentOnServiceAssembly(ComponentType frameworkCompType,
ComponentState frameworkCompStatus,
String saName,
String targetName)
list of component names
|
Collection |
getComponentNamesDependentOnServiceAssembly(String saId,
String targetName)
list of component names
|
Collection |
getComponentNamesDependentOnSharedLibrary(ComponentType frameworkCompType,
ComponentState frameworkCompStatus,
String slibName,
String targetName)
list of component names
|
Collection |
getComponentNamesDependentOnSharedLibrary(String slibName,
String targetName)
list of component names
|
Collection |
getComponentNamesDependentOnSharedLibraryAndServiceAssembly(ComponentType frameworkCompType,
ComponentState frameworkCompStatus,
String slibName,
String saName,
String targetName)
list of component names. this method requires non null inputs
|
Set |
getComponentNamesWithStatus(ComponentType frameworkCompType,
ComponentState frameworkCompStatus,
String targetName)
list of component names
|
protected Properties |
getConfigurationAttributeValues(ObjectName objectName)
Get the config extension MBean attribute values
|
protected Map<String,Descriptor> |
getConfigurationDescriptors(ObjectName objectName)
Get the attributes on the MBean
|
ObjectName |
getConfigurationMBeanObjectName(String targetName,
String configurationType) |
protected ConfigurationService |
getConfigurationService()
Get the Configuration Service
|
protected DeploymentService |
getDeploymentService()
Get the Deployment Service
|
ObjectName |
getDeploymentServiceMBeanObjectName(String targetName)
returns the ObjectName for the DeploymentService Mbean of this
component.
|
protected static EnvironmentContext |
getEnvironmentContext() |
ObjectName |
getExtensionMBeanObjectName(String componentName,
String targetName)
returns the ObjectName for the Extension Mbean of this component.
|
List |
getFrameworkComponentInfoList(Collection compNameList,
String targetName)
framework component info list
|
protected List |
getFrameworkComponentInfoListForEnginesAndBindings(ComponentType frameworkCompType,
ComponentState frameworkCompState,
String sharedLibraryName,
String serviceAssemblyName,
String targetName)
list of componentinfo objects. this methods check for valid inputs and
take only a valid inputs. for example slib, saName both can be null
|
protected List |
getFrameworkComponentInfoListForSharedLibraries(String componentName,
String targetName)
this methods check for valid inputs and take only a valid inputs. for
example slib, saName both can be null
|
List |
getFrameworkComponentInfoListForSharedLibraryNames(Collection slibNameList,
String targetName)
list of component infos
|
protected ComponentQuery |
getFrameworkComponentQuery(String targetName)
return framework query
|
protected static I18NBundle |
getI18NBundle()
gives the I18N bundle
|
String |
getInstallationDescriptor(String componentName,
String targetName)
Retrieve the Component Installation descriptor for the server target.
|
protected InstallationService |
getInstallationService()
Get the Installation Service
|
ObjectName |
getInstallationServiceMBeanObjectName()
returns the ObjectName for the InstallationService Mbean of this
component.
|
ObjectName |
getInstallationServiceMBeanObjectName(String targetName)
returns the ObjectName for the InstallationService Mbean of this
component.
|
ObjectName |
getLoggingServiceMBeanObjectName(String targetName)
returns the ObjectName for the LoggingService Mbean of this target.
|
protected Object |
getMBeanAttribute(ObjectName objectName,
String attributeName)
invokes the operation on mbean
|
protected Properties |
getMBeanAttributeValues(MBeanServerConnection connection,
ObjectName objectName)
Get the attributes on the MBean
|
protected Properties |
getMBeanAttributeValues(MBeanServer mbeanServer,
ObjectName objectName)
Get the attributes on the MBean
|
protected MBeanInfo |
getMBeanInfo(ObjectName mbeanName)
This method is used to get MBeanInfo for the given mbean object
|
protected PerformanceMeasurementService |
getPerformanceMeasurementService()
Get the Performance Measurement Service
|
protected PlatformContext |
getPlatformContext() |
protected RuntimeManagementService |
getRuntimeManagementService()
Get the Runtime management Service
|
protected List |
getServiceAssemblyInfoList(String frameworkState,
String componentName,
String targetName)
list of service assembly infos
|
String |
getSharedLibraryDescriptor(String libraryName,
String targetName)
Retrieve the Shared Library Installation descriptor for the server
target.
|
ObjectName[] |
getSystemLoggerMBeans(String instanceName)
Looks up the cascaded LoggerMBeans for all JBI Framework
System Services for a specific instance
|
List |
getUiComponentInfoList(ComponentType frameworkCompType,
String targetName)
list of ui component infos
|
protected Object |
invokeMBeanOperation(ObjectName objectName,
String operationName)
invokes the operation on mbean
|
protected Object |
invokeMBeanOperation(ObjectName objectName,
String operationName,
Object[] params,
String[] signature)
invokes the operation on mbean
|
protected Object |
invokeMBeanOperation(ObjectName objectName,
String operationName,
String param)
invokes the operation on mbean
|
boolean |
isExistingComponent(String componentName,
String targetName)
checks the component name in the registry
|
boolean |
isExistingSharedLibrary(String sharedLibraryName,
String targetName)
check for shared namespace
|
boolean |
isSharedLibraryArchive(String zipPath)
check for shared library
|
static void |
log(String aMsg)
logs the message
|
static void |
logDebug(Exception ex)
logs the message
|
static void |
logDebug(String aMsg)
logs the message
|
static void |
logError(Exception ex)
logs errors
|
static void |
logWarning(Exception ex)
logs warnings
|
protected void |
setAttributeValue(ObjectName objectName,
String attributeName,
Object attributeValue)
Invokes the mbean and retrieves the attribute value
|
protected void |
setMBeanAttribute(ObjectName objectName,
String attributeName,
Object attributeValue)
invokes the operation on mbean
|
protected AttributeList |
setMBeanAttributes(MBeanServerConnection mbeanServer,
ObjectName objectName,
AttributeList attrList)
set the specified attribute values on the mbean attributes
|
protected void |
setMBeanAttributes(ObjectName objectName,
AttributeList attrList)
set the specified attribute values on the mbean attributes
|
protected String |
setMBeanConfigAttributes(MBeanServerConnection mbeanServer,
ObjectName objectName,
AttributeList attrList)
set the specified attribute values on the mbean attributes
|
protected String |
setMBeanConfigAttributes(ObjectName objectName,
AttributeList attrList)
set the specified attribute values on the mbean attributes
|
static ComponentState |
toFrameworkComponentInfoState(String uiCompState)
framework states
|
static ComponentType |
toFrameworkComponentInfoType(String uiCompType)
converts type
|
static String |
toFrameworkServiceAssemblyState(String uiState)
converts to deployment service service assembly state.
|
JBIComponentInfo |
toUiComponentInfo(ComponentInfo frameworkCompInfo,
String targetName)
return component info object
|
List |
toUiComponentInfoList(List frameworkCompList,
String targetName)
convert to ui component info list
|
static String |
toUiComponentInfoState(ComponentState frameworkCompState)
converts state
|
static String |
toUiComponentInfoType(ComponentType frameworkCompType)
converts type
|
static String |
toUiServiceAssemblyState(String frameworkState)
converts to ui service assembly state
|
static String |
toUiServiceUnitState(String frameworkState)
converts to ui service unit state
|
protected void |
updateEachServiceUnitInfoStateInServiceAssemblyInfo(ServiceAssemblyInfo saInfo,
String targetName)
update the state in each service unit info in service assembly info
|
protected void |
updateServiceAssemblyInfoState(ServiceAssemblyInfo saInfo,
String targetName)
update state in service assembly info
|
protected void |
updateServiceUnitInfoState(ServiceUnitInfo suInfo,
ObjectName deploymentServiceMBean)
updates the state in the service unit info
|
void |
validateUiJBIComponentInfoState(String state)
validates the state value component info
|
void |
validateUiServiceAssemblyInfoState(String state)
validates the state value for service assembly
|
protected static final String STARTED_STATE
protected static final String RUNNING_STATE
protected static final String COMPONENT_CONFIG_INSTANCE_ERROR_KEY
protected static final int ANY_FRAMEWORK_COMPONENT_STATE
protected static final String FRAMEWORK_SA_STARTED_STATE
protected static final String FRAMEWORK_SA_STOPPED_STATE
protected static final String FRAMEWORK_SA_SHUTDOWN_STATE
protected static final String FRAMEWORK_SA_ANY_STATE
protected static final String FRAMEWORK_SU_STARTED_STATE
protected static final String FRAMEWORK_SU_STOPPED_STATE
protected static final String FRAMEWORK_SU_SHUTDOWN_STATE
protected static final String FRAMEWORK_SU_UNKNOWN_STATE
protected EnvironmentContext mEnvContext
protected ComponentConfigurationHelper mCfgHlpr
protected transient AdministrationService administrationService
protected transient ConfigurationService configurationService
protected transient DeploymentService deploymentService
protected transient InstallationService installationService
protected transient RuntimeManagementService runtimeManagementService
protected transient PerformanceMeasurementService performanceMeasurementService
protected static final String COMPONENT_VERSION_NS
protected static final String COMPONENT_VERSION_NS_NEW
protected static final String COMPONENT_VERSION_XPATH_QUERY
protected static final String SHARED_LIBRARY_VERSION_XPATH_QUERY
public AbstractUIMBeanImpl(EnvironmentContext anEnvContext)
anEnvContext - contextprotected AdministrationService getAdministrationService()
protected ConfigurationService getConfigurationService()
protected DeploymentService getDeploymentService()
protected InstallationService getInstallationService()
protected RuntimeManagementService getRuntimeManagementService()
protected PerformanceMeasurementService getPerformanceMeasurementService()
public static void log(String aMsg)
aMsg - message stringpublic static void logDebug(String aMsg)
aMsg - message stringpublic static void logDebug(Exception ex)
ex - exceptionpublic static void logError(Exception ex)
ex - exceptionpublic static void logWarning(Exception ex)
ex - exceptionprotected PlatformContext getPlatformContext()
protected static EnvironmentContext getEnvironmentContext()
protected static I18NBundle getI18NBundle()
protected Object getAttributeValue(MBeanServer mbeanServer, ObjectName objectName, String attributeName) throws JBIRemoteException
mbeanServer - connection to MBean ServerobjectName - object nameattributeName - attribute nameJBIRemoteException - on errorprotected Object getAttributeValue(ObjectName objectName, String attributeName) throws JBIRemoteException
objectName - object nameattributeName - attribute nameJBIRemoteException - on errorprotected void setAttributeValue(ObjectName objectName, String attributeName, Object attributeValue) throws JBIRemoteException
objectName - object nameattributeName - attribute nameJBIRemoteException - on errorprotected Object invokeMBeanOperation(ObjectName objectName, String operationName, Object[] params, String[] signature) throws JBIRemoteException
objectName - object nameoperationName - operation nameparams - parameterssignature - signature of the parametersJBIRemoteException - on user errorprotected Object invokeMBeanOperation(ObjectName objectName, String operationName, String param) throws JBIRemoteException
objectName - object nameoperationName - operation nameparam - operation param of type StringJBIRemoteException - on user errorprotected Object invokeMBeanOperation(ObjectName objectName, String operationName) throws JBIRemoteException
objectName - object nameoperationName - operation nameJBIRemoteException - on user errorprotected Object getMBeanAttribute(ObjectName objectName, String attributeName) throws JBIRemoteException
attributeName - attribute nameobjectName - object nameJBIRemoteException - on user errorprotected MBeanInfo getMBeanInfo(ObjectName mbeanName) throws JBIRemoteException
mbeanName - the objectname for the mbeanJBIRemoteExceptionprotected void setMBeanAttribute(ObjectName objectName, String attributeName, Object attributeValue) throws JBIRemoteException
attributeValue - attrbute nameattributeName - attribute valueobjectName - object nameJBIRemoteException - on user errorprotected void setMBeanAttributes(ObjectName objectName, AttributeList attrList) throws JBIRemoteException
attrList - list of attributesobjectName - object nameJBIRemoteException - on user errorprotected String setMBeanConfigAttributes(ObjectName objectName, AttributeList attrList) throws JBIRemoteException
attrList - list of attributesobjectName - object nameJBIRemoteException - on user errorprotected String setMBeanConfigAttributes(MBeanServerConnection mbeanServer, ObjectName objectName, AttributeList attrList) throws JBIRemoteException
MBeanServer - the MBean server to useattrList - list of attributesobjectName - object nameJBIRemoteException - on user errorprotected AttributeList setMBeanAttributes(MBeanServerConnection mbeanServer, ObjectName objectName, AttributeList attrList) throws JBIRemoteException
attrList - list of attributesobjectName - object nameJBIRemoteException - on user errorprotected Properties getConfigurationAttributeValues(ObjectName objectName) throws JBIRemoteException
objectName - JBIRemoteExceptionprotected Properties getMBeanAttributeValues(MBeanServer mbeanServer, ObjectName objectName) throws JBIRemoteException
mbeanServer - objectName - JBIRemoteExceptionprotected Map<String,Descriptor> getConfigurationDescriptors(ObjectName objectName) throws JBIRemoteException
mbeanServer - objectName - JBIRemoteExceptionprotected AttributeList constructMBeanAttributes(ObjectName objectName, Properties params) throws JBIRemoteException
objectName - mbean nameparams - a name value pair properties object contains the attribute
name and its value as string.JBIRemoteException - on user errorprotected AttributeList constructMBeanAttributes(MBeanServerConnection mbeanServer, ObjectName objectName, Properties params) throws JBIRemoteException
objectName - mbean nameparams - a name value pair properties object contains the attribute
name and its value as string.JBIRemoteException - on user errorpublic boolean isSharedLibraryArchive(String zipPath)
zipPath - file pathprotected String getComponentNameFromJmxObjectName(ObjectName jmxObjectName)
jmxObjectName - jmx obj namepublic ObjectName getAdminServiceMBeanObjectName() throws JBIRemoteException
JBIRemoteException - on error.public ObjectName getInstallationServiceMBeanObjectName()
public ObjectName getInstallationServiceMBeanObjectName(String targetName)
targetName - public ObjectName getDeploymentServiceMBeanObjectName(String targetName)
targetName - public ObjectName getLoggingServiceMBeanObjectName(String targetName)
targetName - public ObjectName[] getSystemLoggerMBeans(String instanceName)
public ObjectName getConfigurationMBeanObjectName(String targetName, String configurationType) throws JBIRemoteException
targetName - configurationType - JBIRemoteExceptionprotected Properties getMBeanAttributeValues(MBeanServerConnection connection, ObjectName objectName) throws JBIRemoteException
connection - objectName - JBIRemoteExceptionpublic ObjectName getExtensionMBeanObjectName(String componentName, String targetName) throws JBIRemoteException
componentName - targetName - JBIRemoteExceptionpublic ObjectName findDeployerMBean(String componentName) throws JBIRemoteException
componentName - of a binding or engine component.JBIRemoteException - on errorpublic ObjectName getComponentLifeCycleMBeanObjectName(String componentName, String targetName) throws JBIRemoteException
componentName - of a binding or engine component.targetName - JBIRemoteException - on errorprotected ComponentQuery getFrameworkComponentQuery(String targetName)
targetName - public boolean isExistingComponent(String componentName, String targetName)
componentName - name of the componenttargetName - public boolean isExistingSharedLibrary(String sharedLibraryName, String targetName)
sharedLibraryName - id StringtargetName - public Collection getComponentNamesDependentOnSharedLibrary(String slibName, String targetName)
slibName - shared library name.targetName - public Collection getComponentNamesDependentOnServiceAssembly(String saId, String targetName)
saId - service assembly name.targetName - public Set getComponentNamesWithStatus(ComponentType frameworkCompType, ComponentState frameworkCompStatus, String targetName)
frameworkCompType - component typeframeworkCompStatus - component statetargetName - public Collection getComponentNamesDependentOnServiceAssembly(ComponentType frameworkCompType, ComponentState frameworkCompStatus, String saName, String targetName)
frameworkCompType - component typeframeworkCompStatus - component statesaName - service assembly nametargetName - public Collection getComponentNamesDependentOnSharedLibrary(ComponentType frameworkCompType, ComponentState frameworkCompStatus, String slibName, String targetName)
frameworkCompType - component typeframeworkCompStatus - component stateslibName - shared library nametargetName - public Collection getComponentNamesDependentOnSharedLibraryAndServiceAssembly(ComponentType frameworkCompType, ComponentState frameworkCompStatus, String slibName, String saName, String targetName)
frameworkCompType - component typeframeworkCompStatus - component stateslibName - shared library namesaName - service assembly nametargetName - protected void updateServiceUnitInfoState(ServiceUnitInfo suInfo, ObjectName deploymentServiceMBean)
suInfo - service unit info objectObjectName - deploymentServiceMBeanprotected void updateEachServiceUnitInfoStateInServiceAssemblyInfo(ServiceAssemblyInfo saInfo, String targetName) throws JBIRemoteException
saInfo - service assembly info objecttargetName - JBIRemoteException - on errorprotected void updateServiceAssemblyInfoState(ServiceAssemblyInfo saInfo, String targetName) throws JBIRemoteException
saInfo - service assembly infotargetName - JBIRemoteException - on errorprotected List getServiceAssemblyInfoList(String frameworkState, String componentName, String targetName) throws JBIRemoteException
frameworkState - statecomponentName - nametargetName - JBIRemoteException - on errorpublic List getUiComponentInfoList(ComponentType frameworkCompType, String targetName) throws JBIRemoteException
frameworkCompType - type of the componenttargetName - JBIRemoteExceptionpublic List toUiComponentInfoList(List frameworkCompList, String targetName) throws JBIRemoteException
frameworkCompList - framework component info listJBIRemoteExceptionpublic JBIComponentInfo toUiComponentInfo(ComponentInfo frameworkCompInfo, String targetName) throws JBIRemoteException
frameworkCompInfo - framework component infotargetName - JBIRemoteExceptionpublic static String toFrameworkServiceAssemblyState(String uiState)
uiState - statepublic static String toUiServiceAssemblyState(String frameworkState)
frameworkState - statepublic static String toUiServiceUnitState(String frameworkState)
frameworkState - statepublic static String toUiComponentInfoState(ComponentState frameworkCompState)
frameworkCompState - statepublic static ComponentType toFrameworkComponentInfoType(String uiCompType)
uiCompType - typepublic static String toUiComponentInfoType(ComponentType frameworkCompType)
frameworkCompType - typepublic void validateUiJBIComponentInfoState(String state) throws JBIRemoteException
JBIRemoteException - on validation failurepublic void validateUiServiceAssemblyInfoState(String state) throws JBIRemoteException
JBIRemoteException - on validation failurepublic static ComponentState toFrameworkComponentInfoState(String uiCompState)
uiCompState - stateprotected List getFrameworkComponentInfoListForEnginesAndBindings(ComponentType frameworkCompType, ComponentState frameworkCompState, String sharedLibraryName, String serviceAssemblyName, String targetName) throws JBIRemoteException
frameworkCompType - component type.frameworkCompState - component statesharedLibraryName - shared library nameserviceAssemblyName - service assembly nametargetName - JBIRemoteException - on errorpublic List getFrameworkComponentInfoList(Collection compNameList, String targetName)
compNameList - list of component namestargetName - protected List getFrameworkComponentInfoListForSharedLibraries(String componentName, String targetName) throws JBIRemoteException
componentName - nametargetName - JBIRemoteException - on errorpublic List getFrameworkComponentInfoListForSharedLibraryNames(Collection slibNameList, String targetName)
targetName - slibNameList - shared library namespublic String getInstallationDescriptor(String componentName, String targetName)
Component - name as a stringtargetName - JBIRemoteException - on errorpublic String getSharedLibraryDescriptor(String libraryName, String targetName)
libraryName - name as a stringtargetName - JBIRemoteException - on errorCopyright © 2011-2016 OpenESB Community. All Rights Reserved.