cleanup the ws javax EchoSocket test class
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
parent
c94e82470d
commit
0818f54be8
|
@ -0,0 +1,43 @@
|
|||
//
|
||||
// ========================================================================
|
||||
// Copyright (c) 1995-2020 Mort Bay Consulting Pty Ltd and others.
|
||||
//
|
||||
// This program and the accompanying materials are made available under
|
||||
// the terms of the Eclipse Public License 2.0 which is available at
|
||||
// https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// This Source Code may also be made available under the following
|
||||
// Secondary Licenses when the conditions for such availability set
|
||||
// forth in the Eclipse Public License, v. 2.0 are satisfied:
|
||||
// the Apache License v2.0 which is available at
|
||||
// https://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
|
||||
// ========================================================================
|
||||
//
|
||||
|
||||
package org.eclipse.jetty.websocket.javax.tests;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.ByteBuffer;
|
||||
import javax.websocket.ClientEndpoint;
|
||||
import javax.websocket.server.ServerEndpoint;
|
||||
|
||||
@ServerEndpoint("/")
|
||||
@ClientEndpoint
|
||||
public class EchoSocket extends EventSocket
|
||||
{
|
||||
@Override
|
||||
public void onMessage(String message) throws IOException
|
||||
{
|
||||
super.onMessage(message);
|
||||
session.getBasicRemote().sendText(message);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMessage(ByteBuffer message) throws IOException
|
||||
{
|
||||
super.onMessage(message);
|
||||
session.getBasicRemote().sendBinary(message);
|
||||
}
|
||||
}
|
|
@ -98,23 +98,4 @@ public class EventSocket
|
|||
error = cause;
|
||||
errorLatch.countDown();
|
||||
}
|
||||
|
||||
@ServerEndpoint("/")
|
||||
@ClientEndpoint
|
||||
public static class EchoSocket extends EventSocket
|
||||
{
|
||||
@Override
|
||||
public void onMessage(String message) throws IOException
|
||||
{
|
||||
super.onMessage(message);
|
||||
session.getBasicRemote().sendText(message);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMessage(ByteBuffer message) throws IOException
|
||||
{
|
||||
super.onMessage(message);
|
||||
session.getBasicRemote().sendBinary(message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -75,7 +75,7 @@ public class GracefulCloseTest
|
|||
}
|
||||
|
||||
@ServerEndpoint("/")
|
||||
public static class ServerSocket extends EventSocket.EchoSocket
|
||||
public static class ServerSocket extends EchoSocket
|
||||
{
|
||||
@Override
|
||||
public void onOpen(Session session, EndpointConfig endpointConfig)
|
||||
|
|
|
@ -40,7 +40,7 @@ import org.eclipse.jetty.util.BlockingArrayQueue;
|
|||
import org.eclipse.jetty.websocket.javax.common.JavaxWebSocketSession;
|
||||
import org.eclipse.jetty.websocket.javax.common.encoders.AvailableEncoders;
|
||||
import org.eclipse.jetty.websocket.javax.server.config.JavaxWebSocketServletContainerInitializer;
|
||||
import org.eclipse.jetty.websocket.javax.tests.EventSocket.EchoSocket;
|
||||
import org.eclipse.jetty.websocket.javax.tests.EchoSocket;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
|
|
Loading…
Reference in New Issue