Package org.frankframework.threading
Class ThreadConnector<T>
java.lang.Object
org.frankframework.threading.ThreadConnector<T>
- Type Parameters:
T- Type of thethreadInfomaintained by theThreadLifeCycleEventListener.
- All Implemented Interfaces:
AutoCloseable
Connect a parent thread and a child thread to carry over important state from the parent
thread to the child thread, such as
ThreadContext, thread-local hide-regexes
for masking sensitive information from logs (See IbisMaskingLayout, and transaction state
via a TransactionConnector.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionThreadConnector(Object owner, String description, ThreadLifeCycleEventListener<T> threadLifeCycleEventListener, IThreadConnectableTransactionManager txManager, String correlationId) ThreadConnector(Object owner, String description, ThreadLifeCycleEventListener<T> threadLifeCycleEventListener, IThreadConnectableTransactionManager txManager, PipeLineSession session) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()<R> RendThread(R response) protected voidprotected void<R> RstartThread(R input)
-
Field Details
-
log
protected org.apache.logging.log4j.Logger log
-
-
Constructor Details
-
ThreadConnector
public ThreadConnector(Object owner, String description, ThreadLifeCycleEventListener<T> threadLifeCycleEventListener, IThreadConnectableTransactionManager txManager, String correlationId) -
ThreadConnector
public ThreadConnector(Object owner, String description, ThreadLifeCycleEventListener<T> threadLifeCycleEventListener, IThreadConnectableTransactionManager txManager, PipeLineSession session)
-
-
Method Details
-
saveThreadContext
protected void saveThreadContext() -
restoreThreadContext
protected void restoreThreadContext() -
startThread
public <R> R startThread(R input) -
endThread
public <R> R endThread(R response) -
abortThread
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-