Package org.frankframework.threading
Class ThreadConnector<T>
java.lang.Object
org.frankframework.threading.ThreadConnector<T>
- Type Parameters:
T
- Type of thethreadInfo
maintained 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
-
Constructor Summary
ConstructorDescriptionThreadConnector
(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 TypeMethodDescriptionvoid
close()
<R> R
endThread
(R response) protected void
protected void
<R> R
startThread
(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:
close
in interfaceAutoCloseable
-