More WebSocket logging updates

Update WebSocketSession toString methods to include the handshake URI
and add id and URI fields to ensure they're available after close().

Log WebSocket session open and close events at INFO.

Remove trace messages for destinations that do not match.

Issue: SPR-11884
This commit is contained in:
Rossen Stoyanchev
2014-06-28 14:01:13 -04:00
parent fac2d80054
commit 86de416908
14 changed files with 109 additions and 102 deletions

View File

@@ -101,7 +101,6 @@ public class JettyWebSocketSessionTests {
reset(nativeSession);
assertNull(session.getPrincipal());
verify(nativeSession).isOpen();
verifyNoMoreInteractions(nativeSession);
}

View File

@@ -55,6 +55,7 @@ public class StandardWebSocketHandlerAdapterTests {
@Test
public void onOpen() throws Throwable {
when(this.session.getId()).thenReturn("123");
this.adapter.onOpen(this.session, null);
verify(this.webSocketHandler).afterConnectionEstablished(this.webSocketSession);

View File

@@ -86,7 +86,6 @@ public class StandardWebSocketSessionTests {
reset(nativeSession);
assertNull(session.getPrincipal());
verify(nativeSession).isOpen();
verifyNoMoreInteractions(nativeSession);
}