ptolemy.util
Class RunnableExceptionCatcher

java.lang.Object
  extended by ptolemy.util.RunnableExceptionCatcher
All Implemented Interfaces:
java.lang.Runnable

public class RunnableExceptionCatcher
extends java.lang.Object
implements java.lang.Runnable

A class (that implements the proxy design pattern) that encapsulates a runnable, catches the exception and will report the exception to the Ptolemy Message Handler.

Since:
Ptolemy II 8.0
Version:
$Id: RunnableExceptionCatcher.java 57044 2010-01-27 22:41:05Z cxh $
Author:
Bert Rodiers
Accepted Rating:
Green (rodiers)
Proposed Rating:
Green (rodiers)

Field Summary
private  java.lang.Runnable _runnable
           
 
Constructor Summary
RunnableExceptionCatcher(java.lang.Runnable runnable)
          Construct an instance that will wrap a runnable, catch its exceptions and report it to the Ptolemy Message Handler.
 
Method Summary
 void run()
          Execute the runnable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_runnable

private java.lang.Runnable _runnable
Constructor Detail

RunnableExceptionCatcher

public RunnableExceptionCatcher(java.lang.Runnable runnable)
Construct an instance that will wrap a runnable, catch its exceptions and report it to the Ptolemy Message Handler.

Parameters:
runnable - The runnable.
Method Detail

run

public void run()
Execute the runnable.

Specified by:
run in interface java.lang.Runnable