org.objectweb.jonas_client.deployment.api
Class ClientContainerDeploymentDesc

java.lang.Object
  extended byorg.objectweb.jonas_lib.deployment.AbsDeploymentDesc
      extended byorg.objectweb.jonas_client.deployment.api.ClientContainerDeploymentDesc
All Implemented Interfaces:
DeploymentDesc

public class ClientContainerDeploymentDesc
extends AbsDeploymentDesc

This class do the parsing of the application-client.xml file and jonas-client.xml files and contruct a data structure associated to these two files.

Author:
Florent Benoit

Field Summary
static java.lang.String CLIENT_FILE_NAME
          The path to the application-client.xml file.
static java.lang.String JONAS_CLIENT_FILE_NAME
          The path to the jonas-client.xml file.
 
Fields inherited from class org.objectweb.jonas_lib.deployment.AbsDeploymentDesc
displayName
 
Method Summary
 java.lang.String getCallbackHandler()
          Get the callback handler of this client application.
 EjbRefDesc[] getEjbRefTags()
          Get an array of mapping between an ejb name and its JNDI name.
static org.xml.sax.EntityResolver getEntityResolver()
          Get the current EntityResolver.
 EnvEntryDesc[] getEnvEntryTags()
          Get an array of mapping between an entry name and its value.
static org.xml.sax.ErrorHandler getErrorHandler()
          Get the current ErrorHandler.
static ClientContainerDeploymentDesc getInstance(java.lang.String clientFileName, java.lang.ClassLoader classLoaderForCls)
          Get an instance of a Client deployment descriptor by parsing the application-client.xml and jonas-client.xml deployment descriptors.
static ClientContainerDeploymentDesc getInstance(java.lang.String clientFileName, java.lang.ClassLoader classLoaderForCls, java.lang.String altClientXmlFilename)
          Get an instance of a Client deployment descriptor by parsing the application-client.xml and jonas-client.xml deployment descriptors.
 java.lang.String getJaasEntry()
          Get the entry in the jaas configuration file
 java.lang.String getJaasFile()
          Get the name of the jaas configuration file
static boolean getParsingWithValidation()
          Controls whether the parser is reporting all validity errors.
 java.lang.String getPassword()
          Get the password used for a callback handler
 ResourceEnvRefDesc[] getResourceEnvRefTags()
          Get an array of mapping between a res-env-ref name and its JNDI name.
 ResourceRefDesc[] getResourceRefTags()
          Get an array of mapping between an res-ref name and its JNDI name.
 java.lang.String getUsername()
          Get the username used for a callback handler
static void setEntityResolver(org.xml.sax.EntityResolver entityResolver)
          Set the specified EntityResolver.
static void setErrorHandler(org.xml.sax.ErrorHandler errorHandler)
          Set the specified ErrorHandler.
static void setParsingWithValidation(boolean validation)
          Controls whether the parser is reporting all validity errors.
 java.lang.String toString()
          Return a String representation of the ClientContainerDeploymentDesc.
 
Methods inherited from class org.objectweb.jonas_lib.deployment.AbsDeploymentDesc
getDisplayName, getSAXMsg
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLIENT_FILE_NAME

public static final java.lang.String CLIENT_FILE_NAME
The path to the application-client.xml file.

See Also:
Constant Field Values

JONAS_CLIENT_FILE_NAME

public static final java.lang.String JONAS_CLIENT_FILE_NAME
The path to the jonas-client.xml file.

See Also:
Constant Field Values
Method Detail

getInstance

public static ClientContainerDeploymentDesc getInstance(java.lang.String clientFileName,
                                                        java.lang.ClassLoader classLoaderForCls)
                                                 throws ClientContainerDeploymentDescException
Get an instance of a Client deployment descriptor by parsing the application-client.xml and jonas-client.xml deployment descriptors.

Parameters:
clientFileName - the fileName of the client file for the deployment descriptors.
classLoaderForCls - the classloader for the classes.
Returns:
a Client deployment descriptor by parsing the application-client.xml and jonas-client.xml deployment descriptors.
Throws:
ClientContainerDeploymentDescException - if the deployment descriptors are corrupted.

getInstance

public static ClientContainerDeploymentDesc getInstance(java.lang.String clientFileName,
                                                        java.lang.ClassLoader classLoaderForCls,
                                                        java.lang.String altClientXmlFilename)
                                                 throws ClientContainerDeploymentDescException
Get an instance of a Client deployment descriptor by parsing the application-client.xml and jonas-client.xml deployment descriptors.

Parameters:
clientFileName - the fileName of the client file for the deployment descriptors.
classLoaderForCls - the classloader for the classes.
altClientXmlFilename - the fileName to the application-client.xml for the alt-dd tag in the Ear Case. This is used for specify an alternate DDesc file.
Returns:
a Client deployment descriptor by parsing the application-client.xml and jonas-client.xml deployment descriptors.
Throws:
ClientContainerDeploymentDescException - if the deployment descriptors are corrupted.

getResourceEnvRefTags

public ResourceEnvRefDesc[] getResourceEnvRefTags()
Get an array of mapping between a res-env-ref name and its JNDI name.

Returns:
an array of mapping between a res-env-ref name and its JNDI name.

getResourceRefTags

public ResourceRefDesc[] getResourceRefTags()
Get an array of mapping between an res-ref name and its JNDI name.

Returns:
an array of mapping between an res-ref name and its JNDI name.

getEnvEntryTags

public EnvEntryDesc[] getEnvEntryTags()
Get an array of mapping between an entry name and its value.

Returns:
an array of mapping between an entry name and its value.

getEjbRefTags

public EjbRefDesc[] getEjbRefTags()
Get an array of mapping between an ejb name and its JNDI name.

Returns:
an array of mapping between an ejb name and its JNDI name.

getJaasFile

public java.lang.String getJaasFile()
Get the name of the jaas configuration file

Returns:
the name of the jaas configuration file

getJaasEntry

public java.lang.String getJaasEntry()
Get the entry in the jaas configuration file

Returns:
the entry in the jaas configuration file

getUsername

public java.lang.String getUsername()
Get the username used for a callback handler

Returns:
the username used for a callback handler

getPassword

public java.lang.String getPassword()
Get the password used for a callback handler

Returns:
the password used for a callback handler

getCallbackHandler

public java.lang.String getCallbackHandler()
Get the callback handler of this client application.

Returns:
the callback handler of this client application.

toString

public java.lang.String toString()
Return a String representation of the ClientContainerDeploymentDesc.

Specified by:
toString in interface DeploymentDesc
Specified by:
toString in class AbsDeploymentDesc
Returns:
a String representation of the ClientContainerDeploymentDesc.

getErrorHandler

public static org.xml.sax.ErrorHandler getErrorHandler()
Get the current ErrorHandler.

Returns:
the current ErrorHandler.

getEntityResolver

public static org.xml.sax.EntityResolver getEntityResolver()
Get the current EntityResolver.

Returns:
the current EntityResolver.

getParsingWithValidation

public static boolean getParsingWithValidation()
Controls whether the parser is reporting all validity errors.

Returns:
if true, all external entities will be read.

setErrorHandler

public static void setErrorHandler(org.xml.sax.ErrorHandler errorHandler)
Set the specified ErrorHandler. If the application does not register an ErrorHandler, all error events reported by the reader are ignored.

Parameters:
errorHandler - the Error Handler to set.

setEntityResolver

public static void setEntityResolver(org.xml.sax.EntityResolver entityResolver)
Set the specified EntityResolver.

Parameters:
entityResolver - the Entity Resolver to set.

setParsingWithValidation

public static void setParsingWithValidation(boolean validation)
Controls whether the parser is reporting all validity errors.

Parameters:
validation - if true, all external entities will be read.