@@ -117,8 +117,8 @@ public class JettyWebSocketClient extends AbstractWebSocketClient implements Lif
|
||||
}
|
||||
this.client.start();
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new IllegalStateException("Failed to start Jetty client", e);
|
||||
catch (Exception ex) {
|
||||
throw new IllegalStateException("Failed to start Jetty client", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -134,8 +134,8 @@ public class JettyWebSocketClient extends AbstractWebSocketClient implements Lif
|
||||
}
|
||||
this.client.stop();
|
||||
}
|
||||
catch (Exception e) {
|
||||
logger.error("Error stopping Jetty WebSocketClient", e);
|
||||
catch (Exception ex) {
|
||||
logger.error("Error stopping Jetty WebSocketClient", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -24,9 +24,11 @@ import org.springframework.web.socket.WebSocketHandler;
|
||||
import org.springframework.web.socket.WebSocketSession;
|
||||
|
||||
/**
|
||||
* A convenient base class for {@link WebSocketHandler} implementation that process binary
|
||||
* messages only. Text messages are rejected with {@link CloseStatus#NOT_ACCEPTABLE}. All
|
||||
* other methods have empty implementations.
|
||||
* A convenient base class for {@link WebSocketHandler} implementations
|
||||
* that process binary messages only.
|
||||
*
|
||||
* <p>Text messages are rejected with {@link CloseStatus#NOT_ACCEPTABLE}.
|
||||
* All other methods have empty implementations.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @author Phillip Webb
|
||||
@@ -39,7 +41,7 @@ public class BinaryWebSocketHandler extends AbstractWebSocketHandler {
|
||||
try {
|
||||
session.close(CloseStatus.NOT_ACCEPTABLE.withReason("Text messages not supported"));
|
||||
}
|
||||
catch (IOException e) {
|
||||
catch (IOException ex) {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -24,9 +24,11 @@ import org.springframework.web.socket.WebSocketHandler;
|
||||
import org.springframework.web.socket.WebSocketSession;
|
||||
|
||||
/**
|
||||
* A convenient base class for {@link WebSocketHandler} implementation that process text
|
||||
* messages only. Binary messages are rejected with {@link CloseStatus#NOT_ACCEPTABLE}. All
|
||||
* other methods have empty implementations.
|
||||
* A convenient base class for {@link WebSocketHandler} implementations
|
||||
* that process text messages only.
|
||||
*
|
||||
* <p>Binary messages are rejected with {@link CloseStatus#NOT_ACCEPTABLE}.
|
||||
* All other methods have empty implementations.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @author Phillip Webb
|
||||
|
||||
@@ -82,8 +82,8 @@ public class JettyXhrTransport extends AbstractXhrTransport implements Lifecycle
|
||||
this.httpClient.start();
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new SockJsException("Failed to start " + this, e);
|
||||
catch (Exception ex) {
|
||||
throw new SockJsException("Failed to start " + this, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,8 +94,8 @@ public class JettyXhrTransport extends AbstractXhrTransport implements Lifecycle
|
||||
this.httpClient.stop();
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new SockJsException("Failed to stop " + this, e);
|
||||
catch (Exception ex) {
|
||||
throw new SockJsException("Failed to stop " + this, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,6 +154,7 @@ public class JettyXhrTransport extends AbstractXhrTransport implements Lifecycle
|
||||
new ResponseEntity<String>(responseHeaders, status));
|
||||
}
|
||||
|
||||
|
||||
private static void addHttpHeaders(Request request, HttpHeaders headers) {
|
||||
for (String name : headers.keySet()) {
|
||||
for (String value : headers.get(name)) {
|
||||
@@ -194,7 +195,6 @@ public class JettyXhrTransport extends AbstractXhrTransport implements Lifecycle
|
||||
|
||||
private final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
|
||||
|
||||
|
||||
public SockJsResponseListener(URI url, HttpHeaders headers, XhrClientSockJsSession sockJsSession,
|
||||
SettableListenableFuture<WebSocketSession> connectFuture) {
|
||||
|
||||
@@ -204,7 +204,6 @@ public class JettyXhrTransport extends AbstractXhrTransport implements Lifecycle
|
||||
this.sockJsSession = sockJsSession;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onBegin(Response response) {
|
||||
if (response.getStatus() != 200) {
|
||||
|
||||
Reference in New Issue
Block a user