IBM Rational Functional Tester
Version 8.1.1000
IBM Rational Functional Tester Proxy SDK Reference

Project Version 2.3

com.rational.test.ft.domain
Class ChannelSwitchException

java.lang.Object   extended by java.lang.Throwable       extended by java.lang.Exception           extended by java.lang.RuntimeException               extended by com.rational.test.ft.RationalTestException                   extended by com.rational.test.ft.domain.ChannelSwitchException
All Implemented Interfaces:
com.rational.test.ft.IRationalThrowable, java.io.Serializable

public class ChannelSwitchException
extends com.rational.test.ft.RationalTestException

A ChannelSwitchException is thrown when code needs to be executed on the thread of the original channel request rather than the channel associated with the current thread. The desired code is packaged into a class that extends ChannelRunnable and implements send.

Since:
RFT1.0
See Also:
Serialized Form

Constructor Summary
ChannelSwitchException(ChannelRunnable request)
          Creates exception with the ChannelRunnable object.
ChannelSwitchException(ChannelRunnable request, IChannel channel)
          Creates a ChannelSwitchException that should be executed on a thread associated with a specific channel.
 
Method Summary
 IChannel getChannel()
          Gets the IChannel associated with this ChannelSwitchException.
 ChannelRunnable getRequest()
          Gets the ChannelRunnable object associated with this ChannelSwitchException.
 java.lang.Object run()
          Executes the ChannelRunnable object, called when the channel returns control to the originating thread.
 
Methods inherited from class com.rational.test.ft.RationalTestException
className, fillinCombinedStackTrace, getClassName, getContextDescription, getMessage, getReplacedExceptionMessage, getStackTraceString, printStackTrace, printStackTrace, printStackTrace, setContextDescription, setStackTraceString, stackTraceString, throwIt
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ChannelSwitchException

public ChannelSwitchException(ChannelRunnable request)
Creates exception with the ChannelRunnable object. The object is executed on the thread that invoked the original channel request.

Parameters:
request - The code to be executed on the original thread packaged into a ChannelRunnable object.
Since:
RFT1.0

ChannelSwitchException

public ChannelSwitchException(ChannelRunnable request,                               IChannel channel)
Creates a ChannelSwitchException that should be executed on a thread associated with a specific channel.

Parameters:
request - The code to be executed on the thread associated with channel packaged into a ChannelRunnable object.
channel - The thread where the ChannelRunnable object should be run. If null, then the code runs on the thread that originated the channel request.
Since:
RFT1.0
Method Detail

run

public java.lang.Object run()
Executes the ChannelRunnable object, called when the channel returns control to the originating thread.

Since:
RFT1.0

getRequest

public ChannelRunnable getRequest()
Gets the ChannelRunnable object associated with this ChannelSwitchException.

Since:
RFT1.0

getChannel

public IChannel getChannel()
Gets the IChannel associated with this ChannelSwitchException.

Since:
RFT1.0