Class MessageListenerConfigParserImpl
- java.lang.Object
-
- com.sun.enterprise.connectors.util.MessageListenerConfigParserImpl
-
- All Implemented Interfaces:
ConnectorConfigParser
,MessageListenerConfigParser
public class MessageListenerConfigParserImpl extends Object implements MessageListenerConfigParser
This is message listener configuration parser. It parses the ra.xml file for the message listener specific configurations like activationSpec javabean properties, message listener types .- Author:
- Srikanth P
-
-
Field Summary
-
Fields inherited from interface com.sun.enterprise.connectors.util.ConnectorConfigParser
AOR, configParserUtil, ddTransformUtil, MCF, MSL, RA
-
-
Constructor Summary
Constructors Constructor Description MessageListenerConfigParserImpl()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getActivationSpecClass(ConnectorDescriptor desc, String messageListenerType)
Return the ActivationSpecClass name for given rar and messageListenerTypeList<String>
getConfidentialProperties(ConnectorDescriptor desc, String rarName, String... keyFields)
GiProperties
getJavaBeanProps(ConnectorDescriptor desc, String messageListenerType, String rarName)
Parses the ra.xml for the ActivationSpec javabean properties.Properties
getJavaBeanReturnTypes(ConnectorDescriptor desc, String messageListenerType, String rarName)
Returns the Properties object consisting of propertyname as the key and datatype as the value.String[]
getMessageListenerTypes(ConnectorDescriptor desc)
Obtains the Message Listener types of a given rar.
-
-
-
Method Detail
-
getActivationSpecClass
public String getActivationSpecClass(ConnectorDescriptor desc, String messageListenerType) throws ConnectorRuntimeException
Return the ActivationSpecClass name for given rar and messageListenerType- Specified by:
getActivationSpecClass
in interfaceMessageListenerConfigParser
- Parameters:
desc
- ConnectorDescriptor pertaining to rar.messageListenerType
- MessageListener type- Throws:
ConnectorRuntimeException
- If moduleDir is null. If corresponding rar is not deployed.
-
getMessageListenerTypes
public String[] getMessageListenerTypes(ConnectorDescriptor desc) throws ConnectorRuntimeException
Description copied from interface:MessageListenerConfigParser
Obtains the Message Listener types of a given rar.- Specified by:
getMessageListenerTypes
in interfaceMessageListenerConfigParser
- Parameters:
desc
- ConnectorDescriptor pertaining to rar.- Returns:
- Array of MessageListener types as strings
- Throws:
ConnectorRuntimeException
- If rar is not exploded or incorrect ra.xml
-
getJavaBeanProps
public Properties getJavaBeanProps(ConnectorDescriptor desc, String messageListenerType, String rarName) throws ConnectorRuntimeException
Parses the ra.xml for the ActivationSpec javabean properties. The ActivationSpec to be parsed is identified by the moduleDir where ra.xml is present and the message listener type. message listener type will be unique in a given ra.xml. It throws ConnectorRuntimeException if either or both the parameters are null, if corresponding rar is not deployed, if message listener type mentioned as parameter is not found in ra.xml. If rar is deployed and message listener (type mentioned) is present but no properties are present for the corresponding message listener, null is returned.- Specified by:
getJavaBeanProps
in interfaceConnectorConfigParser
- Parameters:
desc
- ConnectorDescriptor pertaining to rar.messageListenerType
- message listener type.It is uniqie across allsub-elements in element in a given rar. - Returns:
- Javabean properties with the property names and values of properties. The property values will be the values mentioned in ra.xml if present. Otherwise it will be the default values obtained by introspecting the javabean. In both the case if no value is present, empty String is returned as the value.
- Throws:
ConnectorRuntimeException
- if either of the parameters are null. If corresponding rar is not deployed i.e moduleDir is invalid. If messagelistener type is not found in ra.xml
-
getConfidentialProperties
public List<String> getConfidentialProperties(ConnectorDescriptor desc, String rarName, String... keyFields) throws ConnectorRuntimeException
Description copied from interface:ConnectorConfigParser
Gi- Specified by:
getConfidentialProperties
in interfaceConnectorConfigParser
- Returns:
- Throws:
ConnectorRuntimeException
-
getJavaBeanReturnTypes
public Properties getJavaBeanReturnTypes(ConnectorDescriptor desc, String messageListenerType, String rarName) throws ConnectorRuntimeException
Returns the Properties object consisting of propertyname as the key and datatype as the value.- Specified by:
getJavaBeanReturnTypes
in interfaceMessageListenerConfigParser
- Parameters:
messageListenerType
- message listener type.It is uniqie across allsub-elements in element in a given rar. desc
- ConnectorDescriptor pertaining to rar.- Returns:
- Properties object with the property names(key) and datatype of property(as value).
- Throws:
ConnectorRuntimeException
- if either of the parameters are null. If corresponding rar is not deployed i.e moduleDir is invalid. If messagelistener type is not found in ra.xml
-
-