Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Common DOM API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.java.browser.dom
Class DOMService

    java.lang.Object
      com.sun.java.browser.dom.DOMService

public abstract class DOMService
extends Object

Constructor Summary
`DOMService()` An empty constructor is provided.

Method Summary
`static DOMService` | `getService(Object obj)` Returns new instance of a DOMService.
`abstract Object` | `invokeAndWait(DOMAction action)` Causes action.run() to be executed synchronously on the DOM action dispatching thread.
`abstract void` | `invokeLater(DOMAction action)` Causes action.run() to be executed asynchronously on the DOM action dispatching thread.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DOMService

    public DOMService()

  An empty constructor is provided. Implementations of this abstract class must provide a public no-argument constructor in order for the static getService() method to work correctly. Application programmers should not be able to directly construct implementation subclasses of this abstract subclass.

Method Detail

### getService

    public static DOMService getService(Object obj)
                                 throws DOMUnsupportedException

  Returns new instance of a DOMService. The implementation of the DOMService returns depends on the setting of the com.sun.java.browser.dom.DOMServiceProvider property or, if the property is not set, a platform specific default. Throws DOMUnsupportedException if the DOMService is not available to the obj.

  Parameters:
    `obj` - Object to leverage the DOMService
  Throws:
    `DOMUnsupportedException`

### invokeAndWait

    public abstract Object invokeAndWait(DOMAction action)
                                  throws DOMAccessException

  Causes action.run() to be executed synchronously on the DOM action dispatching thread. This call will block until all pending DOM actions have been processed and (then) action.run() returns. This method should be used when an application thread needs to access the browser's DOM. It should not be called from the DOMActionDispatchThread. Note that if the DOMAction.run() method throws an uncaught exception (on the DOM action dispatching thread), it's caught and re-thrown, as an DOMAccessException, on the caller's thread. If the DOMAction.run() method throws any DOM security related exception (on the DOM action dispatching thread), it's caught and re-thrown, as an DOMSecurityException, on the caller's thread.

  Parameters:
    `action` - DOMAction.
  Throws:
    `DOMAccessException`

### invokeLater

    public abstract void invokeLater(DOMAction action)

  Causes action.run() to be executed asynchronously on the DOM action dispatching thread. This method should be used when an application thread needs to access the browser's DOM. It should not be called from the DOMActionDispatchThread. Note that if the DOMAction.run() method throws an uncaught exception (on the DOM action dispatching thread), it will not be caught and re-thrown on the caller's thread.

  Parameters:
    `action` - DOMAction.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Common DOM API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 2003 Sun Microsystems, Inc. 4150 Network Circle
Santa Clara, California, 95054, U.S.A. All Rights Reserved.