public static void addExtensionFactory(Class clazz) throws MessageException {
  try {
    MessageExtensionFactory extensionFactory=(MessageExtensionFactory)clazz.newInstance();
    if (DEBUG)     _log.debug("Adding extension factory for " + extensionFactory.getTypeUri());
    _extensionFactories.put(extensionFactory.getTypeUri(),clazz);
  }
 catch (  Exception e) {
    throw new MessageException("Cannot instantiante message extension factory class: " + clazz.getName());
  }
}

public static void addExtensionFactory ( Class clazz ) throws MessageException { try { MessageExtensionFactory extensionFactory = ( MessageExtensionFactory ) clazz . newInstance ( ) ; if ( DEBUG ) _log . debug ( "Adding extension factory for " + extensionFactory . getTypeUri ( ) ) ; _extensionFactories . put ( extensionFactory . getTypeUri ( ) , clazz ) ; } catch ( Exception e ) { throw new MessageException ( "Cannot instantiante message extension factory class: " + clazz . getName ( ) ) ; } }
adds a new extension factory .
