src/share/classes/com/sun/java/browser/dom/DOMService.java

Print this page




  26 package com.sun.java.browser.dom;
  27 
  28 public abstract class DOMService
  29 {
  30     /**
  31      * Returns new instance of a DOMService. The implementation
  32      * of the DOMService returns depends on the setting of the
  33      * com.sun.java.browser.dom.DOMServiceProvider property or,
  34      * if the property is not set, a platform specific default.
  35      *
  36      * Throws DOMUnsupportedException if the DOMService is not
  37      * available to the obj.
  38      *
  39      * @param obj Object to leverage the DOMService
  40      */
  41     public static DOMService getService(Object obj)
  42                   throws DOMUnsupportedException
  43     {
  44         try
  45         {
  46             String provider = (String) java.security.AccessController.doPrivileged(
  47                    new sun.security.action.GetPropertyAction("com.sun.java.browser.dom.DOMServiceProvider"));
  48 
  49             Class clazz = Class.forName("sun.plugin.dom.DOMService");
  50 
  51             return (DOMService) clazz.newInstance();
  52         }
  53         catch (Throwable e)
  54         {
  55             throw new DOMUnsupportedException(e.toString());
  56         }
  57     }
  58 
  59     /**
  60      * An empty constructor is provided. Implementations of this
  61      * abstract class must provide a public no-argument constructor
  62      * in order for the static getService() method to work correctly.
  63      * Application programmers should not be able to directly
  64      * construct implementation subclasses of this abstract subclass.
  65      */
  66     public DOMService()




  26 package com.sun.java.browser.dom;
  27 
  28 public abstract class DOMService
  29 {
  30     /**
  31      * Returns new instance of a DOMService. The implementation
  32      * of the DOMService returns depends on the setting of the
  33      * com.sun.java.browser.dom.DOMServiceProvider property or,
  34      * if the property is not set, a platform specific default.
  35      *
  36      * Throws DOMUnsupportedException if the DOMService is not
  37      * available to the obj.
  38      *
  39      * @param obj Object to leverage the DOMService
  40      */
  41     public static DOMService getService(Object obj)
  42                   throws DOMUnsupportedException
  43     {
  44         try
  45         {
  46             String provider = java.security.AccessController.doPrivileged(
  47                    new sun.security.action.GetPropertyAction("com.sun.java.browser.dom.DOMServiceProvider"));
  48 
  49             Class clazz = Class.forName("sun.plugin.dom.DOMService");
  50 
  51             return (DOMService) clazz.newInstance();
  52         }
  53         catch (Throwable e)
  54         {
  55             throw new DOMUnsupportedException(e.toString());
  56         }
  57     }
  58 
  59     /**
  60      * An empty constructor is provided. Implementations of this
  61      * abstract class must provide a public no-argument constructor
  62      * in order for the static getService() method to work correctly.
  63      * Application programmers should not be able to directly
  64      * construct implementation subclasses of this abstract subclass.
  65      */
  66     public DOMService()