com.jolbox.bonecp
Class CustomThreadFactory
java.lang.Object
com.jolbox.bonecp.CustomThreadFactory
- All Implemented Interfaces:
- Thread.UncaughtExceptionHandler, ThreadFactory
public class CustomThreadFactory
- extends Object
- implements ThreadFactory, Thread.UncaughtExceptionHandler
Helper class just for executor service to provide a fancier name for debugging + catch for thread exceptions.
- Author:
- wallacew
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CustomThreadFactory
public CustomThreadFactory(String threadName,
boolean daemon)
- Default constructor.
- Parameters:
threadName - name for thread.daemon - set/unset daemon thread
newThread
public Thread newThread(Runnable r)
-
- Specified by:
newThread in interface ThreadFactory
- See Also:
ThreadFactory.newThread(java.lang.Runnable)
uncaughtException
public void uncaughtException(Thread thread,
Throwable throwable)
-
- Specified by:
uncaughtException in interface Thread.UncaughtExceptionHandler
- See Also:
Thread.UncaughtExceptionHandler.uncaughtException(java.lang.Thread, java.lang.Throwable)
Copyright © 2009-2011 JolBox. All Rights Reserved.