}
catch ( ClassNotFoundException e )
{
String message = "Cannot find the class " + mechClassName;
LOG.error( message );
throw new ConfigurationException( message );
}
MechanismHandler handler = null;
try
{
handler = ( MechanismHandler ) mechClass.newInstance();
}
catch ( InstantiationException e )
{
String message = "Cannot instantiate the class : " + mechClassName;
LOG.error( message );
throw new ConfigurationException( message );
}
catch ( IllegalAccessException e )
{
String message = "Cnnot invoke the class' constructor for " + mechClassName;
LOG.error( message );
throw new ConfigurationException( message );
}
if ( mechClass == NtlmMechanismHandler.class )
{
NtlmMechanismHandler ntlmHandler = ( NtlmMechanismHandler ) handler;