com.wm.app.b2b.client
Class InvokeThread

java.lang.Object
  extended by java.lang.Thread
      extended by com.wm.app.b2b.client.InvokeThread
All Implemented Interfaces:
java.lang.Runnable

public class InvokeThread
extends java.lang.Thread

This class extends Thread. This class is created in response to invokeThreaded calls on Context objects and represents an asynchronous RPC.

See Also:
Context, Context.invokeThreaded(com.wm.lang.ns.NSName, com.wm.util.Values)

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
InvokeThread(Context context, java.lang.String ifc, java.lang.String svc, Values data)
          Constructs an InvokeThread for the specified Context and service.
 
Method Summary
 Values getData()
          Blocks until the invoked service completes and then returns the Values object from the invoked service.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InvokeThread

public InvokeThread(Context context,
                    java.lang.String ifc,
                    java.lang.String svc,
                    Values data)
Constructs an InvokeThread for the specified Context and service.

Parameters:
context - The Context object, which must already be connected to a webMethods Integration Server.
ifc - A String specifying the name of the folder on the Integration Server.
svc - A String specifying the name of the service on the Integration Server.
data - A Values object containing the input data for the service.
Method Detail

getData

public Values getData()
               throws ServiceException,
                      java.lang.InterruptedException
Blocks until the invoked service completes and then returns the Values object from the invoked service. (Behaves just like an invoke would from the Context object.)

Returns:
A Values object containing the output from the service invoked by invokeThreaded.
Throws:
ServiceException - If the invoked service throws an exception.
java.lang.InterruptedException - If this thread is interrupted before it completes.