org.progeeks.util.swing
Class SwingThreadInvoker

java.lang.Object
  extended by org.progeeks.util.swing.SwingThreadInvoker
All Implemented Interfaces:
java.lang.reflect.InvocationHandler

public class SwingThreadInvoker
extends java.lang.Object
implements java.lang.reflect.InvocationHandler

A dynamic proxy handler that will synchronize a set of methods with the AWT event thread.

Version:
$Revision: 1.1 $
Author:
Paul Speed

Constructor Summary
SwingThreadInvoker(java.lang.Object delegate)
           
 
Method Summary
 java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
           
static java.lang.Object synchronizeObject(java.lang.Object delegate, java.lang.Class proxyInterface)
          Wraps the specified class in a proxy that will execute its methods on the Swing/AWT thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwingThreadInvoker

public SwingThreadInvoker(java.lang.Object delegate)
Method Detail

synchronizeObject

public static java.lang.Object synchronizeObject(java.lang.Object delegate,
                                                 java.lang.Class proxyInterface)
Wraps the specified class in a proxy that will execute its methods on the Swing/AWT thread. Note that methods that require return values may cause a dead-lock if they block event processing in some other way.


invoke

public java.lang.Object invoke(java.lang.Object proxy,
                               java.lang.reflect.Method method,
                               java.lang.Object[] args)
                        throws java.lang.Throwable
Specified by:
invoke in interface java.lang.reflect.InvocationHandler
Throws:
java.lang.Throwable


Copyright © 2002-2003 Paul Speed. All Rights Reserved.