11package com .rabbitmq .client .impl ;
22
33import com .rabbitmq .client .SaslConfig ;
4+ import com .rabbitmq .client .ThreadFactory ;
45
56import java .util .Map ;
67import java .util .concurrent .ExecutorService ;
@@ -19,8 +20,9 @@ public class ConnectionParams {
1920 private final boolean topologyRecovery ;
2021
2122 private ExceptionHandler exceptionHandler ;
23+ private ThreadFactory threadFactory ;
2224
23- /**
25+ /**
2426 * @param username name used to establish connection
2527 * @param password for <code><b>username</b></code>
2628 * @param executor thread pool service for consumer threads for channels on this connection
@@ -32,12 +34,13 @@ public class ConnectionParams {
3234 * @param saslConfig sasl configuration hook
3335 * @param networkRecoveryInterval interval used when recovering from network failure
3436 * @param topologyRecovery should topology (queues, exchanges, bindings, consumers) recovery be performed?
37+ * @param threadFactory
3538 */
3639 public ConnectionParams (String username , String password , ExecutorService executor ,
3740 String virtualHost , Map <String , Object > clientProperties ,
3841 int requestedFrameMax , int requestedChannelMax , int requestedHeartbeat ,
3942 SaslConfig saslConfig , int networkRecoveryInterval ,
40- boolean topologyRecovery ) {
43+ boolean topologyRecovery , ThreadFactory threadFactory ) {
4144 this .username = username ;
4245 this .password = password ;
4346 this .executor = executor ;
@@ -51,6 +54,7 @@ public ConnectionParams(String username, String password, ExecutorService execut
5154 this .topologyRecovery = topologyRecovery ;
5255
5356 this .exceptionHandler = new DefaultExceptionHandler ();
57+ this .threadFactory = threadFactory ;
5458 }
5559
5660 public String getUsername () {
@@ -109,4 +113,8 @@ public int getNetworkRecoveryInterval() {
109113 public boolean isTopologyRecoveryEnabled () {
110114 return topologyRecovery ;
111115 }
116+
117+ public ThreadFactory getThreadFactory () {
118+ return threadFactory ;
119+ }
112120}
0 commit comments