# Class ZooKeeperThread

java.lang.Object
java.lang.Thread
org.apache.zookeeper.server.ZooKeeperThread

All Implemented Interfaces:
  `Runnable`

Direct Known Subclasses:
  `LearnerHandler, NIOServerCnxnFactory.SelectorThread, QuorumCnxManager.Listener, QuorumPeer, ZooKeeperCriticalThread`

public class ZooKeeperThread extends Thread
This is the main class for catching all the uncaught exceptions thrown by the threads.

## Nested Class Summary

### Nested classes/interfaces inherited from class Thread

`Thread.State, Thread.UncaughtExceptionHandler`

## Field Summary

### Fields inherited from class Thread

`MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY`

## Constructor Summary

Constructors
Constructor
Description
`ZooKeeperThread(String threadName)`

## Method Summary

Modifier and Type
Method
Description
`protected void`
`handleException(String thName, Throwable e)`
This will be used by the uncaught exception handler and just log a warning message and return.

### Methods inherited from class Thread

`activeCount, checkAccess, clone, 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 Object

`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### ZooKeeperThread

public ZooKeeperThread(String threadName)

## Method Details

### handleException

protected void handleException(String thName, Throwable e)
This will be used by the uncaught exception handler and just log a warning message and return.

Parameters:
  `thName` - - thread name
  `e` - - exception object