Skip to content

Commit 7a79d25

Browse files
committed
More cleanup:
- unused imports - removed legacy classes
1 parent d67e626 commit 7a79d25

File tree

6 files changed

+2
-57
lines changed

6 files changed

+2
-57
lines changed

providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/EventHandler.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ public void onHttpContentParsed(HttpContent content,
108108
try {
109109
context.setCurrentState(handler.onBodyPartReceived(
110110
new GrizzlyResponseBodyPart(content,
111-
context.getRequest().getURI(),
112111
ctx.getConnection())));
113112
} catch (Exception e) {
114113
handler.onThrowable(e);

providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseBodyPart.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
package org.asynchttpclient.providers.grizzly;
1515

16-
import org.asynchttpclient.AsyncHttpProvider;
1716
import org.asynchttpclient.HttpResponseBodyPart;
1817

1918
import org.glassfish.grizzly.Buffer;
@@ -24,7 +23,6 @@
2423
import java.io.IOException;
2524
import java.io.InputStream;
2625
import java.io.OutputStream;
27-
import java.net.URI;
2826
import java.nio.ByteBuffer;
2927
import java.util.concurrent.atomic.AtomicReference;
3028

@@ -47,7 +45,6 @@ class GrizzlyResponseBodyPart extends HttpResponseBodyPart {
4745

4846

4947
public GrizzlyResponseBodyPart(final HttpContent content,
50-
final URI uri,
5148
final Connection<?> connection) {
5249
this.content = content;
5350
this.connection = connection;

providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseStatus.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public Response prepareResponse(HttpResponseHeaders headers, List<HttpResponseBo
6666
headers,
6767
bodyParts,
6868
config.isRfc6265CookieEncoding());
69-
};
69+
}
7070

7171
/**
7272
* {@inheritDoc}

providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientEventFilter.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,9 @@
1515

1616
import org.asynchttpclient.providers.grizzly.EventHandler;
1717
import org.asynchttpclient.providers.grizzly.GrizzlyAsyncHttpProvider;
18-
import org.glassfish.grizzly.Connection;
1918
import org.glassfish.grizzly.filterchain.FilterChainContext;
20-
import org.glassfish.grizzly.filterchain.NextAction;
2119
import org.glassfish.grizzly.http.HttpClientFilter;
2220
import org.glassfish.grizzly.http.HttpContent;
23-
import org.glassfish.grizzly.http.HttpContext;
2421
import org.glassfish.grizzly.http.HttpHeader;
2522

2623
import java.io.IOException;

providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientFilter.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,6 @@ private boolean sendAsGrizzlyRequest(final RequestInfoHolder requestInfoHolder,
301301
sendingCtx = checkAndHandleFilterChainUpdate(ctx, sendingCtx);
302302
}
303303
final Connection c = ctx.getConnection();
304-
System.out.println("*** CONNECTION: " + c);
305304
if (!Utils.isSpdyConnection(c)) {
306305
HttpContext.newInstance(ctx, c, c, c);
307306
} else {

providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/SwitchingSSLFilter.java

Lines changed: 1 addition & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
import javax.net.ssl.SSLEngine;
3030
import javax.net.ssl.SSLHandshakeException;
3131
import java.io.IOException;
32-
import java.util.concurrent.ConcurrentHashMap;
3332

3433

3534
/**
@@ -53,7 +52,7 @@ public final class SwitchingSSLFilter extends SSLFilter {
5352
public SwitchingSSLFilter(final SSLEngineConfigurator clientConfig) {
5453

5554
super(null, clientConfig);
56-
addHandshakeListener(new ProtocolHandshakeListener());
55+
5756
}
5857

5958

@@ -178,50 +177,4 @@ private static void enableRead(final Connection c) throws IOException {
178177
c.enableIOEvent(IOEvent.READ);
179178
}
180179

181-
182-
// ---------------------------------------------------------- Nested Classes
183-
184-
185-
private static interface HandshakeCompleteListener {
186-
void complete();
187-
}
188-
189-
private static final class ProtocolHandshakeListener implements HandshakeListener {
190-
191-
192-
static final ConcurrentHashMap<Connection,HandshakeCompleteListener> listeners =
193-
new ConcurrentHashMap<Connection,HandshakeCompleteListener>();
194-
195-
196-
// --------------------------------------- Method from HandshakeListener
197-
198-
199-
@Override
200-
public void onStart(Connection connection) {
201-
// no-op
202-
}
203-
204-
@Override
205-
public void onComplete(Connection connection) {
206-
final HandshakeCompleteListener listener = listeners.get(connection);
207-
if (listener != null) {
208-
removeListener(connection);
209-
listener.complete();
210-
}
211-
}
212-
213-
214-
// --------------------------------------------- Package Private Methods
215-
216-
217-
public static void addListener(final Connection c,
218-
final HandshakeCompleteListener listener) {
219-
listeners.putIfAbsent(c, listener);
220-
}
221-
222-
static void removeListener(final Connection c) {
223-
listeners.remove(c);
224-
}
225-
}
226-
227180
}

0 commit comments

Comments
 (0)