Skip to content

Commit 92811af

Browse files
author
Arun Gupta
committed
Renaming the package
1 parent 24f10b8 commit 92811af

File tree

1 file changed

+5
-4
lines changed
  • websocket/endpoint-async/src/main/java/org/javaee7/websocket/endpoint/async

1 file changed

+5
-4
lines changed

websocket/endpoint-async/src/main/java/org/javaee7/websocket/endpoint/MyEndpoint.java renamed to websocket/endpoint-async/src/main/java/org/javaee7/websocket/endpoint/async/MyEndpoint.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,20 @@
3737
* only if the new code is made subject to such option by the copyright
3838
* holder.
3939
*/
40-
package org.javaee7.websocket.endpoint;
40+
package org.javaee7.websocket.endpoint.async;
4141

4242
import javax.websocket.OnMessage;
43+
import javax.websocket.Session;
4344
import javax.websocket.server.ServerEndpoint;
4445

4546
/**
4647
* @author Arun Gupta
4748
*/
48-
@ServerEndpoint(value="/websocket")
49+
@ServerEndpoint("/websocket")
4950
public class MyEndpoint {
5051

5152
@OnMessage
52-
public String echoText(String name) {
53-
return name;
53+
public void echoText(String test, Session session) {
54+
session.getAsyncRemote().sendText(test);
5455
}
5556
}

0 commit comments

Comments
 (0)