com.novell.nds.dirxml.driver
Class ThreadBridge

java.lang.Object
  extended by com.novell.nds.dirxml.driver.ThreadBridge

public class ThreadBridge
extends Object

ThreadBridge implements a method of calling methods on a different thread.


Constructor Summary
ThreadBridge()
          Constructs a ThreadBridge
 
Method Summary
 Object call(Object object, Method method, Object[] args)
          send a method call across the bridge
 void close()
          close the bridge
 boolean isOpen()
          Check if bridge is open
 void open()
          open the bridge and wait for stuff to be sent across
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadBridge

public ThreadBridge()
Constructs a ThreadBridge

Method Detail

close

public void close()
close the bridge


isOpen

public boolean isOpen()
Check if bridge is open

Returns:
true if bridge is open, false otherwise

open

public void open()
open the bridge and wait for stuff to be sent across


call

public Object call(Object object,
                   Method method,
                   Object[] args)
            throws InvocationTargetException,
                   InterruptedException
send a method call across the bridge

Parameters:
object - object to invoke method on (can be null for static methods)
method - method to invoke
args - arguments to the method
Returns:
the result of the method call (wrapped in the appropriate class if primitive)
Throws:
InvocationTargetException - which wraps any exception that may have been thrown by the invoked method
InterruptedException - if action was interrupted (can't ever happen in java 1.1)