public abstract class AbstractServiceMBeansImpl extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
protected static String |
COLON |
protected static String |
COMMA |
protected static String |
COMPONENT_CONFIG_INSTANCE_ERROR_KEY |
protected ComponentConfigurationHelper |
componentConfigurationHelper
Component Configuration helper
|
protected static String |
CUSTOM_ADMINISTRATION_NAME_KEY |
protected static String |
CUSTOM_CONFIGURATION_NAME_KEY |
protected static String |
CUSTOM_LOGGER_NAME_KEY |
protected static String |
CUSTOM_MANAGEMENT_ACTIONS_NAME_KEY |
protected static String |
CUSTOM_STATISTICS_NAME_KEY |
protected static String |
DOMAIN_TARGET_KEY |
protected static String |
EBIJMXDOMAIN
Enterprise Business Integration JMX domain
|
protected EnvironmentContext |
environmentContext
Jbi Environment context.
|
protected static String |
EQUAL |
protected static String |
IDENTIFICATION_NAME_KEY |
protected static String |
JMX_EBI_DOMAIN
JMX Domain name for the Enterprise Business Integration JMX MBeans
|
protected static char |
PASSWORD_MASK_CHARACTER |
protected static String |
RUNNING_STATE |
protected static String |
SERVER_TARGET_KEY |
protected static String |
SERVICE_TYPE_KEY |
protected static String |
STARTED_STATE |
| Constructor and Description |
|---|
AbstractServiceMBeansImpl(EnvironmentContext anEnvContext) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkForValidTarget(ObjectName objectName,
String targetName)
Check if a target is valid or not
|
protected void |
checkForValidTarget(ObjectName objectName,
String targetName,
boolean useTargetNameFlag)
Check if a target is valid or not
|
protected TargetType |
checkTargetType(String target)
Check the type of the specified target
|
protected AttributeList |
constructMBeanAttributes(MBeanServerConnection mbeanServer,
ObjectName objectName,
Properties params)
invokes the operation on mbean
|
protected AttributeList |
constructMBeanAttributes(ObjectName objectName,
Map<String,Object> params)
invokes the operation on mbean
|
protected AttributeList |
constructMBeanAttributes(ObjectName objectName,
Properties params)
invokes the operation on mbean
|
protected Exception |
createManagementException(String bundleKey,
String[] args,
Exception sourceException)
Creates a management message string and populates the exception
|
protected String |
createManagementMessage(String taskId,
boolean successResult,
String msgType,
String msgCode,
Object[] args)
Creates a management message.
|
protected void |
domainTargetCheck(String target)
Check to ensure that the target is a domain target
|
protected Map<String,ObjectName[]> |
findLiveExtensionMBeanObjectNames(String componentName,
String extensionName,
String targetName)
Find Extension MBeans for targets that are up
|
protected ObjectName |
getAdminServiceMBeanObjectName()
returns the ObjectName for the AdminService Mbean of this component.
|
protected ObjectName |
getAdminServiceMBeanObjectName(String targetName)
returns the ObjectName for the AdminService facade Mbean for a target
|
protected Object |
getAttributeValue(MBeanServerConnection mbeanServer,
ObjectName objectName,
String attributeName)
Invokes the mbean and retrieves the attribute value
|
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
|
protected Object |
getAttributeValue(String targetName,
ObjectName objectName,
String attributeName)
Invokes the mbean and retrieves the attribute value
|
protected Map<String,ObjectName[]> |
getComponentExtensionMBeanObjectNames(String componentName,
String extensionName,
String targetName)
Gets the extension MBean object names
|
protected ObjectName[] |
getComponentExtensionMBeanObjectNames(String componentName,
String extensionName,
String targetName,
String targetInstanceName)
Gets the extension MBean object names
|
protected ObjectName |
getDeploymentServiceMBeanObjectName(String targetName)
returns the ObjectName for the DeploymentService Mbean of this component.
|
protected static String |
getEbiJmxDomain()
gets the ebi jmx domain name
|
protected ObjectName |
getEbiStatusMBeanObjectName(String componentName,
String targetName)
Get the EBI Status MBean ObjectName
|
protected static EnvironmentContext |
getEnvironmentContext() |
protected ObjectName |
getExtensionMBeanObjectName(String componentName,
String targetName)
returns the ObjectName for the Extension Mbean of this component.
|
protected static I18NBundle |
getI18NBundle()
gives the I18N bundle
|
protected static I18NBundle |
getI18NBundle(String packageName)
gives the I18N bundle
|
protected ObjectName |
getInstallationServiceMBeanObjectName(String targetName)
returns the ObjectName for the InstallationService Mbean of this
component.
|
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 Map<String,Object> |
getMBeanAttributeValuesAsMap(MBeanServerConnection connection,
ObjectName objectName)
Get the attributes on the MBean
|
protected MBeanServerConnection |
getMBeanServerConnection(String targetName)
Retrieve MBeanServerConnection for targets other than server
|
protected PlatformContext |
getPlatformContext() |
protected String |
getPlatformContextAdminServerName()
Get the instance name of the platform's administration server.
|
protected Set<String> |
getPlatformContextClusteredServerNames()
Get a set of the names of all the clustered servers in the domain.
|
protected Set<String> |
getPlatformContextClusterNames()
Get a set of the names of all the clusters in the domain.
|
protected String |
getPlatformContextInstallRoot()
Get the full path to the platform's instaall root directory.
|
protected String |
getPlatformContextInstanceName()
Get the name of this instance.
|
protected String |
getPlatformContextInstanceRoot()
Get the full path to the platform's instance root directory.
|
protected String |
getPlatformContextJmxRmiPort()
Get a string representation of the DAS JMX RMI connector port.
|
protected MBeanServer |
getPlatformContextMBeanServer()
Provides access to the platform's MBean server.
|
protected Set<String> |
getPlatformContextServersInCluster(String clusterName)
Get a set of the names of all the servers in the specified cluster.
|
protected Set<String> |
getPlatformContextStandaloneServerNames()
Get a set of the names of all the standalone servers in the domain.
|
protected String |
getPlatformContextTargetName()
Get the Target Name.
|
protected String |
getPlatformContextTargetName(String instanceName)
Get the Target Name for a specified instance.
|
protected String |
getStackTrace(JBIRemoteException exception)
Returns the stack-trace of the exception
|
protected Object |
invokeMBeanOperation(MBeanServerConnection connection,
ObjectName objectName,
String operationName,
Object[] params,
String[] signature)
invokes the operation on mbean
|
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
|
protected Object |
invokeMBeanOperation(String targetName,
ObjectName objectName,
String operationName,
Object[] params,
String[] signature)
invokes the operation on mbean on appropriate target
|
protected boolean |
isMBeanRegistered(ObjectName objectName)
Test whether an mbean is registered.
|
protected boolean |
isPlatformContextAdminServer()
Determine whether this instance is the administration server instance.
|
protected boolean |
isPlatformContextCluster(String targetName)
Determine whether a target is a cluster.
|
protected boolean |
isPlatformContextClusteredServer(String targetName)
Determine whether the target is a clustered server.
|
protected boolean |
isPlatformContextInstanceClustered(String instanceName)
Determine whether or not an instance is clustered.
|
protected boolean |
isPlatformContextInstanceUp(String instanceName)
Determine if the specified instance is up.
|
protected boolean |
isPlatformContextStandaloneServer(String targetName)
Determine whether a target is a standalone server.
|
protected boolean |
isPlatformContextValidTarget(String targetName)
Determine whether a target is a valid server or cluster name.
|
protected boolean |
isTargetUp(String targetName)
Checks to see if the Target (server, cluster) is up or down.
|
protected boolean |
isValidTarget(ObjectName objectName)
Test whether it is a valid target.
|
protected boolean |
isValidTarget(ObjectName objectName,
String targetName)
Test whether it is a valid target.
|
protected Map<String,String[]> |
listTargetNames()
Returns a map of target names to an array of target instance names.
|
protected static void |
log(String aMsg)
logs the message
|
protected static void |
logDebug(Exception ex)
logs the message
|
protected static void |
logDebug(String aMsg)
logs the message
|
protected static void |
logError(Exception ex)
logs errors
|
static void |
logWarning(Exception ex)
logs warnings
|
protected boolean |
platformContextSupportsMultipleServers()
Determine whether multiple servers are permitted within this AS
installation.
|
protected void |
setAttributeValue(MBeanServerConnection connection,
ObjectName objectName,
String attributeName,
Object attributeValue)
Invokes the mbean and retrieves the attribute value
|
protected void |
setAttributeValue(ObjectName objectName,
String attributeName,
Object attributeValue)
Invokes the mbean and retrieves the attribute value
|
protected void |
setAttributeValue(String targetName,
ObjectName objectName,
String attributeName,
Object attributeValue)
Invokes the mbean and retrieves the attribute value
|
protected String |
setLevel(Level logLevel)
Return the "verb" (the setXXX MBean operation) for the given log level
|
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
|
protected EnvironmentContext environmentContext
protected ComponentConfigurationHelper componentConfigurationHelper
protected static final String DOMAIN_TARGET_KEY
protected static final String SERVER_TARGET_KEY
protected static final String CUSTOM_CONFIGURATION_NAME_KEY
protected static final String CUSTOM_STATISTICS_NAME_KEY
protected static final String CUSTOM_ADMINISTRATION_NAME_KEY
protected static final String CUSTOM_MANAGEMENT_ACTIONS_NAME_KEY
protected static final String CUSTOM_LOGGER_NAME_KEY
protected static final String STARTED_STATE
protected static final String RUNNING_STATE
protected static final String EQUAL
protected static final String COLON
protected static final String COMMA
protected static final char PASSWORD_MASK_CHARACTER
protected static final String COMPONENT_CONFIG_INSTANCE_ERROR_KEY
protected static final String JMX_EBI_DOMAIN
protected static String EBIJMXDOMAIN
protected static final String SERVICE_TYPE_KEY
protected static final String IDENTIFICATION_NAME_KEY
public AbstractServiceMBeansImpl(EnvironmentContext anEnvContext)
protected static void log(String aMsg)
aMsg - message stringprotected static void logDebug(String aMsg)
aMsg - message stringprotected static void logDebug(Exception ex)
ex - exceptionprotected 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 static I18NBundle getI18NBundle(String packageName)
packageName - protected Object getAttributeValue(String targetName, ObjectName objectName, String attributeName) throws ManagementRemoteException
targetName - objectName - object nameattributeName - attribute nameManagementRemoteException - on errorprotected Object getAttributeValue(MBeanServer mbeanServer, ObjectName objectName, String attributeName) throws ManagementRemoteException
mbeanServer - connection to MBean ServerobjectName - object nameattributeName - attribute nameManagementRemoteException - on errorprotected Object getAttributeValue(MBeanServerConnection mbeanServer, ObjectName objectName, String attributeName) throws ManagementRemoteException
mbeanServer - connection to MBean ServerobjectName - object nameattributeName - attribute nameManagementRemoteException - on errorprotected Object getAttributeValue(ObjectName objectName, String attributeName) throws ManagementRemoteException
objectName - object nameattributeName - attribute nameManagementRemoteException - on errorprotected void setAttributeValue(String targetName, ObjectName objectName, String attributeName, Object attributeValue) throws ManagementRemoteException
targetName - objectName - object nameattributeName - attribute nameManagementRemoteException - on errorprotected void setAttributeValue(ObjectName objectName, String attributeName, Object attributeValue) throws ManagementRemoteException
objectName - object nameattributeName - attribute nameManagementRemoteException - on errorprotected void setAttributeValue(MBeanServerConnection connection, ObjectName objectName, String attributeName, Object attributeValue) throws ManagementRemoteException
connection - objectName - object nameattributeName - attribute nameManagementRemoteException - on errorprotected Object invokeMBeanOperation(ObjectName objectName, String operationName, Object[] params, String[] signature) throws ManagementRemoteException
objectName - object nameoperationName - operation nameparams - parameterssignature - signature of the parametersManagementRemoteException - on user errorprotected Object invokeMBeanOperation(MBeanServerConnection connection, ObjectName objectName, String operationName, Object[] params, String[] signature) throws ManagementRemoteException
connection - objectName - object nameoperationName - operation nameparams - parameterssignature - signature of the parametersManagementRemoteException - on user errorprotected Object invokeMBeanOperation(String targetName, ObjectName objectName, String operationName, Object[] params, String[] signature) throws ManagementRemoteException
targetName - objectName - object nameoperationName - operation nameparams - parameterssignature - signature of the parametersManagementRemoteException - on user errorprotected Object invokeMBeanOperation(ObjectName objectName, String operationName, String param) throws ManagementRemoteException
objectName - object nameoperationName - operation nameparam - operation param of type StringManagementRemoteException - on user errorprotected Object invokeMBeanOperation(ObjectName objectName, String operationName) throws ManagementRemoteException
objectName - object nameoperationName - operation nameManagementRemoteException - on user errorprotected Object getMBeanAttribute(ObjectName objectName, String attributeName) throws ManagementRemoteException
attributeName - attribute nameobjectName - object nameManagementRemoteException - on user errorprotected boolean isMBeanRegistered(ObjectName objectName) throws ManagementRemoteException
objectName - ManagementRemoteExceptionprotected String setLevel(Level logLevel)
logLevel - log level to set logger toprotected boolean isValidTarget(ObjectName objectName) throws ManagementRemoteException
objectName - ManagementRemoteExceptionprotected boolean isValidTarget(ObjectName objectName, String targetName) throws ManagementRemoteException
objectName - targetName - ManagementRemoteExceptionprotected void setMBeanAttribute(ObjectName objectName, String attributeName, Object attributeValue) throws ManagementRemoteException
attributeValue - attrbute nameattributeName - attribute valueobjectName - object nameManagementRemoteException - on user errorprotected void setMBeanAttributes(ObjectName objectName, AttributeList attrList) throws ManagementRemoteException
attrList - list of attributesobjectName - object nameManagementRemoteException - on user errorprotected AttributeList setMBeanAttributes(MBeanServerConnection mbeanServer, ObjectName objectName, AttributeList attrList) throws ManagementRemoteException
attrList - list of attributesobjectName - object nameManagementRemoteException - on user errorprotected AttributeList constructMBeanAttributes(ObjectName objectName, Properties params) throws ManagementRemoteException
objectName - mbean nameparams - a name value pair properties object contains the attribute
name and its value as string.ManagementRemoteException - on user errorprotected AttributeList constructMBeanAttributes(ObjectName objectName, Map<String,Object> params) throws ManagementRemoteException
objectName - mbean nameparams - a name value pair Map object contains the attribute
name and its value.ManagementRemoteException - on user errorprotected AttributeList constructMBeanAttributes(MBeanServerConnection mbeanServer, ObjectName objectName, Properties params) throws ManagementRemoteException
objectName - mbean nameparams - a name value pair properties object contains the attribute
name and its value as string.ManagementRemoteException - on user errorprotected Exception createManagementException(String bundleKey, String[] args, Exception sourceException)
bundleKey - args - of StringssourceException - -
the source exception to propagateprotected String createManagementMessage(String taskId, boolean successResult, String msgType, String msgCode, Object[] args)
taskId - successResult - msgType - msgCode - args - protected ObjectName getDeploymentServiceMBeanObjectName(String targetName)
targetName - protected ObjectName getAdminServiceMBeanObjectName() throws ManagementRemoteException
JBIRemoteException - on error.ManagementRemoteExceptionprotected ObjectName getAdminServiceMBeanObjectName(String targetName)
targetName - protected ObjectName getInstallationServiceMBeanObjectName(String targetName)
targetName - protected void checkForValidTarget(ObjectName objectName, String targetName) throws ManagementRemoteException
objectName - targetName - ManagementRemoteExceptionprotected void checkForValidTarget(ObjectName objectName, String targetName, boolean useTargetNameFlag) throws ManagementRemoteException
objectName - targetName - useTargetNameFlag - ManagementRemoteExceptionprotected TargetType checkTargetType(String target)
targetName - protected MBeanServerConnection getMBeanServerConnection(String targetName) throws ManagementRemoteException
targetName - ManagementRemoteExceptionprotected static String getEbiJmxDomain()
protected ObjectName getEbiStatusMBeanObjectName(String componentName, String targetName) throws ManagementRemoteException
componentName - targetName - ManagementRemoteExceptionprotected Properties getMBeanAttributeValues(MBeanServerConnection connection, ObjectName objectName) throws ManagementRemoteException
connection - objectName - ManagementRemoteExceptionprotected Map<String,Object> getMBeanAttributeValuesAsMap(MBeanServerConnection connection, ObjectName objectName) throws ManagementRemoteException
connection - objectName - ManagementRemoteExceptionprotected String setMBeanConfigAttributes(ObjectName objectName, AttributeList attrList) throws ManagementRemoteException
attrList - list of attributesobjectName - object nameManagementRemoteException - on user errorprotected String setMBeanConfigAttributes(MBeanServerConnection mbeanServer, ObjectName objectName, AttributeList attrList) throws ManagementRemoteException
MBeanServer - the MBean server to useattrList - list of attributesobjectName - object nameManagementRemoteException - on user errorprotected String getStackTrace(JBIRemoteException exception)
exception - protected void domainTargetCheck(String target) throws ManagementRemoteException
ManagementRemoteException - if target is domainprotected Map<String,String[]> listTargetNames() throws ManagementRemoteException
ManagementRemoteExceptionprotected boolean isTargetUp(String targetName) throws ManagementRemoteException
targetName - name of the target (e.g., cluster1, server, etc.)ManagementRemoteException - if error or exception occurs.protected Map<String,ObjectName[]> findLiveExtensionMBeanObjectNames(String componentName, String extensionName, String targetName) throws ManagementRemoteException
componentName - extensionName - targetName - ManagementRemoteExceptionprotected Map<String,ObjectName[]> getComponentExtensionMBeanObjectNames(String componentName, String extensionName, String targetName) throws ManagementRemoteException
componentName - name of the componentextensionName - the name of the extension (e.g., Configuration, Logger, etc.)targetName - name of the target (e.g., cluster1, server, etc.)ManagementRemoteException - on errorprotected ObjectName[] getComponentExtensionMBeanObjectNames(String componentName, String extensionName, String targetName, String targetInstanceName) throws ManagementRemoteException
componentName - name of the componentextensionName - the name of the extension (e.g., Configuration, Logger, etc.)targetName - name of the target (e.g., cluster1, server, etc.)targetInstanceName - name of the target instance (e.g., cluster1-instance1, etc.)ManagementRemoteException - on errorprotected ObjectName getExtensionMBeanObjectName(String componentName, String targetName) throws ManagementRemoteException
componentName - targetName - ManagementRemoteExceptionprotected String getPlatformContextAdminServerName()
protected boolean isPlatformContextAdminServer()
true if this instance is the administration server,
false if not.protected String getPlatformContextInstanceName()
protected boolean isPlatformContextInstanceUp(String instanceName)
protected boolean platformContextSupportsMultipleServers()
protected String getPlatformContextTargetName()
protected String getPlatformContextTargetName(String instanceName)
protected Set<String> getPlatformContextStandaloneServerNames()
protected Set<String> getPlatformContextClusteredServerNames()
protected Set<String> getPlatformContextClusterNames()
protected Set<String> getPlatformContextServersInCluster(String clusterName)
protected boolean isPlatformContextValidTarget(String targetName)
true if targetName is a valid
standalone server name or cluster name, false if not.protected boolean isPlatformContextCluster(String targetName)
true if targetName is a cluster,
false if not.protected boolean isPlatformContextStandaloneServer(String targetName)
true if targetName is a standalone
server, false if not.protected boolean isPlatformContextClusteredServer(String targetName)
true if targetName is a clustered
server, false if not.protected boolean isPlatformContextInstanceClustered(String instanceName)
true if the instance is clustered,
false if not.protected String getPlatformContextJmxRmiPort()
protected MBeanServer getPlatformContextMBeanServer()
protected String getPlatformContextInstanceRoot()
protected String getPlatformContextInstallRoot()
Copyright © 2011-2016 OpenESB Community. All Rights Reserved.