@@ -2234,6 +2234,24 @@ private ScheduledExecutorService _getInternalScheduledExecutor() {
22342234 return stpe ;
22352235 }
22362236
2237+ /**
2238+ * the callback executor, see {@link Builder#callbackThreadFactory(ThreadFactory) callbackThreadFactory()} in the builder doc
2239+ * @return the executor
2240+ */
2241+ public ExecutorService getCallbackExecutor () {
2242+ return this .callbackThreadFactory == null ?
2243+ DEFAULT_SINGLE_THREAD_EXECUTOR .get () : Executors .newSingleThreadExecutor (this .callbackThreadFactory );
2244+ }
2245+
2246+ /**
2247+ * the connect executor, see {@link Builder#connectThreadFactory(ThreadFactory) connectThreadFactory()} in the builder doc
2248+ * @return the executor
2249+ */
2250+ public ExecutorService getConnectExecutor () {
2251+ return this .connectThreadFactory == null ?
2252+ DEFAULT_SINGLE_THREAD_EXECUTOR .get () : Executors .newSingleThreadExecutor (this .connectThreadFactory );
2253+ }
2254+
22372255 /**
22382256 * whether the general executor is the internal one versus a user supplied one
22392257 * @return true if the executor is internal
@@ -2251,21 +2269,19 @@ public boolean scheduledExecutorIsInternal() {
22512269 }
22522270
22532271 /**
2254- * the callback executor, see {@link Builder#callbackThreadFactory(ThreadFactory) callbackThreadFactory()} in the builder doc
2255- * @return the executor
2272+ * whether the callback executor is the internal one versus a user supplied one
2273+ * @return true if the executor is internal
22562274 */
2257- public ExecutorService getCallbackExecutor () {
2258- return this .callbackThreadFactory == null ?
2259- DEFAULT_SINGLE_THREAD_EXECUTOR .get () : Executors .newSingleThreadExecutor (this .callbackThreadFactory );
2275+ public boolean callbackExecutorIsInternal () {
2276+ return this .callbackThreadFactory == null ;
22602277 }
22612278
22622279 /**
2263- * the connect executor, see {@link Builder#connectThreadFactory(ThreadFactory) connectThreadFactory()} in the builder doc
2264- * @return the executor
2280+ * whether the connect executor is the internal one versus a user supplied one
2281+ * @return true if the executor is internal
22652282 */
2266- public ExecutorService getConnectExecutor () {
2267- return this .connectThreadFactory == null ?
2268- DEFAULT_SINGLE_THREAD_EXECUTOR .get () : Executors .newSingleThreadExecutor (this .connectThreadFactory );
2283+ public boolean connectExecutorIsInternal () {
2284+ return this .connectThreadFactory == null ;
22692285 }
22702286
22712287 /**
0 commit comments