Class BitcoinClientThreadFactory

java.lang.Object
org.consensusj.bitcoin.jsonrpc.internal.BitcoinClientThreadFactory
All Implemented Interfaces:
ThreadFactory

public class BitcoinClientThreadFactory extends Object implements ThreadFactory
A ThreadFactory for the BitcoinClient. It is based upon bitcoinj's ContextPropagatingThreadFactory but differs in a few ways:
  • It takes a Context in the constructor rather than propagating the Context from the caller. We want all threads in the pool to have the same context as the associated BitcoinClient and (more importantly) the connected server.
  • Does not use bitcoinj's Threading.uncaughtExceptionHandler mechanism. (For now, it just logs the uncaught exceptions.)
  • Has no direct dependencies on Guava, though it does depend on bitcoinj.