67 volatile CompletableFuture<? extends ExchangeImpl<T>> exchangeCF; |
67 volatile CompletableFuture<? extends ExchangeImpl<T>> exchangeCF; |
68 // used to record possible cancellation raised before the exchImpl |
68 // used to record possible cancellation raised before the exchImpl |
69 // has been established. |
69 // has been established. |
70 private volatile IOException failed; |
70 private volatile IOException failed; |
71 final AccessControlContext acc; |
71 final AccessControlContext acc; |
72 final MultiExchange<?,T> multi; |
72 final MultiExchange<T> multi; |
73 final Executor parentExecutor; |
73 final Executor parentExecutor; |
74 boolean upgrading; // to HTTP/2 |
74 boolean upgrading; // to HTTP/2 |
75 final PushGroup<?,T> pushGroup; |
75 final PushGroup<T> pushGroup; |
76 final String dbgTag; |
76 final String dbgTag; |
77 |
77 |
78 Exchange(HttpRequestImpl request, MultiExchange<?,T> multi) { |
78 Exchange(HttpRequestImpl request, MultiExchange<T> multi) { |
79 this.request = request; |
79 this.request = request; |
80 this.upgrading = false; |
80 this.upgrading = false; |
81 this.client = multi.client(); |
81 this.client = multi.client(); |
82 this.multi = multi; |
82 this.multi = multi; |
83 this.acc = multi.acc; |
83 this.acc = multi.acc; |
86 this.dbgTag = "Exchange"; |
86 this.dbgTag = "Exchange"; |
87 } |
87 } |
88 |
88 |
89 /* If different AccessControlContext to be used */ |
89 /* If different AccessControlContext to be used */ |
90 Exchange(HttpRequestImpl request, |
90 Exchange(HttpRequestImpl request, |
91 MultiExchange<?,T> multi, |
91 MultiExchange<T> multi, |
92 AccessControlContext acc) |
92 AccessControlContext acc) |
93 { |
93 { |
94 this.request = request; |
94 this.request = request; |
95 this.acc = acc; |
95 this.acc = acc; |
96 this.upgrading = false; |
96 this.upgrading = false; |
99 this.parentExecutor = multi.executor; |
99 this.parentExecutor = multi.executor; |
100 this.pushGroup = multi.pushGroup; |
100 this.pushGroup = multi.pushGroup; |
101 this.dbgTag = "Exchange"; |
101 this.dbgTag = "Exchange"; |
102 } |
102 } |
103 |
103 |
104 PushGroup<?,T> getPushGroup() { |
104 PushGroup<T> getPushGroup() { |
105 return pushGroup; |
105 return pushGroup; |
106 } |
106 } |
107 |
107 |
108 Executor executor() { |
108 Executor executor() { |
109 return parentExecutor; |
109 return parentExecutor; |