Class XmlServiceUtilities

java.lang.Object
org.glassfish.hk2.xml.api.XmlServiceUtilities

public class XmlServiceUtilities extends Object
Useful utilities for initializing the HK2 XmlService
Author:
jwells
  • Constructor Details

    • XmlServiceUtilities

      public XmlServiceUtilities()
  • Method Details

    • enableXmlService

      public static void enableXmlService(ServiceLocator locator)
      Enables Hk2 XmlServices in the given locator. Will also enable the HK2 Configuration Hub if the hub has not already been started. This operation is idempotent in that if the named XmlService is already available in the given locator then this method does nothing. Only the JAXB XML parser will be added
      Parameters:
      locator - The non-null locator to which to add the XmlService
    • enableDomXmlService

      public static void enableDomXmlService(ServiceLocator locator)
      This will enable all of the same xml parsers as enableXmlService(ServiceLocator) but will set the rank of the stream-based xml parser to be higher than that of the JAXB based one
      Parameters:
      locator - The non-null locator to which to add the XmlService