Issue #3835 - add default methods to WebSocketSessionListener
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
parent
196833d15e
commit
1554b3dbb1
|
@ -524,11 +524,6 @@ public class ClientContainer extends ContainerLifeCycle implements WebSocketCont
|
||||||
this.listener = listener;
|
this.listener = listener;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSessionCreated(WebSocketSession session)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSessionOpened(WebSocketSession session)
|
public void onSessionOpened(WebSocketSession session)
|
||||||
{
|
{
|
||||||
|
|
|
@ -96,11 +96,6 @@ public class SessionTrackingTest
|
||||||
CountDownLatch closedLatch = new CountDownLatch(2);
|
CountDownLatch closedLatch = new CountDownLatch(2);
|
||||||
wsServerFactory.addSessionListener(new WebSocketSessionListener()
|
wsServerFactory.addSessionListener(new WebSocketSessionListener()
|
||||||
{
|
{
|
||||||
@Override
|
|
||||||
public void onSessionCreated(WebSocketSession session)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSessionOpened(WebSocketSession session)
|
public void onSessionOpened(WebSocketSession session)
|
||||||
{
|
{
|
||||||
|
|
|
@ -147,16 +147,6 @@ public class ConcurrentConnectTest
|
||||||
{
|
{
|
||||||
public CountDownLatch closeLatch = new CountDownLatch(MAX_CONNECTIONS);
|
public CountDownLatch closeLatch = new CountDownLatch(MAX_CONNECTIONS);
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSessionCreated(WebSocketSession session)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSessionOpened(WebSocketSession session)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSessionClosed(WebSocketSession session)
|
public void onSessionClosed(WebSocketSession session)
|
||||||
{
|
{
|
||||||
|
|
|
@ -139,11 +139,6 @@ public class BadNetworkTest
|
||||||
WebSocketServerFactory wssf = (WebSocketServerFactory)context.getServletContext().getAttribute(WebSocketServletFactory.class.getName());
|
WebSocketServerFactory wssf = (WebSocketServerFactory)context.getServletContext().getAttribute(WebSocketServletFactory.class.getName());
|
||||||
wssf.addSessionListener(new WebSocketSessionListener()
|
wssf.addSessionListener(new WebSocketSessionListener()
|
||||||
{
|
{
|
||||||
@Override
|
|
||||||
public void onSessionCreated(WebSocketSession session)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSessionOpened(WebSocketSession session)
|
public void onSessionOpened(WebSocketSession session)
|
||||||
{
|
{
|
||||||
|
|
|
@ -63,16 +63,6 @@ public class ClientOpenSessionTracker implements Connection.Listener, WebSocketS
|
||||||
this.closeConnectionLatch.countDown();
|
this.closeConnectionLatch.countDown();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSessionCreated(WebSocketSession session)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSessionOpened(WebSocketSession session)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSessionClosed(WebSocketSession session)
|
public void onSessionClosed(WebSocketSession session)
|
||||||
{
|
{
|
||||||
|
|
|
@ -102,16 +102,6 @@ public class ClientSessionsTest
|
||||||
|
|
||||||
client.addSessionListener(new WebSocketSessionListener()
|
client.addSessionListener(new WebSocketSessionListener()
|
||||||
{
|
{
|
||||||
@Override
|
|
||||||
public void onSessionCreated(WebSocketSession session)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSessionOpened(WebSocketSession session)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSessionClosed(WebSocketSession session)
|
public void onSessionClosed(WebSocketSession session)
|
||||||
{
|
{
|
||||||
|
|
|
@ -43,12 +43,6 @@ public class SessionTracker extends AbstractLifeCycle implements WebSocketSessio
|
||||||
sessions.add(session);
|
sessions.add(session);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSessionOpened(WebSocketSession session)
|
|
||||||
{
|
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSessionClosed(WebSocketSession session)
|
public void onSessionClosed(WebSocketSession session)
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,9 +20,15 @@ package org.eclipse.jetty.websocket.common;
|
||||||
|
|
||||||
public interface WebSocketSessionListener
|
public interface WebSocketSessionListener
|
||||||
{
|
{
|
||||||
void onSessionCreated(WebSocketSession session);
|
default void onSessionCreated(WebSocketSession session)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void onSessionOpened(WebSocketSession session);
|
default void onSessionOpened(WebSocketSession session)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void onSessionClosed(WebSocketSession session);
|
default void onSessionClosed(WebSocketSession session)
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue