Package org.littleshoot.proxy.impl
Class CategorizedThreadFactory
java.lang.Object
org.littleshoot.proxy.impl.CategorizedThreadFactory
- All Implemented Interfaces:
ThreadFactory
A ThreadFactory that adds LittleProxy-specific information to the threads' names.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Stringprivate static final org.slf4j.Loggerprivate final Stringprivate final AtomicIntegerprivate static final Thread.UncaughtExceptionHandlerException handler for proxy threads.private final int -
Constructor Summary
ConstructorsConstructorDescriptionCategorizedThreadFactory(String name, String category, int uniqueServerGroupId) -
Method Summary
-
Field Details
-
log
private static final org.slf4j.Logger log -
name
-
category
-
uniqueServerGroupId
private final int uniqueServerGroupId -
threadCount
-
UNCAUGHT_EXCEPTION_HANDLER
Exception handler for proxy threads. Logs the name of the thread and the exception that was caught.
-
-
Constructor Details
-
CategorizedThreadFactory
- Parameters:
name- the user-supplied name of this proxycategory- the type of threads this factory is creating (acceptor, client-to-proxy worker, proxy-to-server worker)uniqueServerGroupId- a unique number for the server group creating this thread factory, to differentiate multiple proxy instances with the same name
-
-
Method Details
-
newThread
- Specified by:
newThreadin interfaceThreadFactory
-