package jp.dip.fission.SampleRestApplication.websocket;

import javax.websocket.OnMessage;
import javax.websocket.server.ServerEndpoint;

@ServerEndpoint(value="/websocket")
public class HelloWebsocket {
    @OnMessage
    public String echo(String message) {
        System.out.println(message);
        return message;
    }
}

@@ -79,135 +79,471 @@
 ket.
-OnMessage;%0D%0Aimport javax.websocket.server.ServerEndpoint;%0D%0A%0D%0A@ServerEndpoint(value=%22/websocket%22)%0D%0Apublic class HelloWebsocket %7B
+CloseReason;%0D%0Aimport javax.websocket.EndpointConfig;%0D%0Aimport javax.websocket.OnClose;%0D%0Aimport javax.websocket.OnError;%0D%0Aimport javax.websocket.OnMessage;%0D%0Aimport javax.websocket.OnOpen;%0D%0Aimport javax.websocket.Session;%0D%0Aimport javax.websocket.server.ServerEndpoint;%0D%0A%0D%0A@ServerEndpoint(value=%22/websocket%22)%0D%0Apublic class HelloWebsocket %7B%0D%0A%0D%0A%0D%0A    @OnOpen%0D%0A    public void onOpen(Session session, EndpointConfig config) %7B%0D%0A    %09System.out.println(%22onOpen%22);%0D%0A    %7D%0D%0A
 %0D%0A  
@@ -593,16 +593,56 @@
  message
+, Session session, EndpointConfig config
 ) %7B%0D%0A   
@@ -708,11 +708,300 @@
 %0A    %7D%0D%0A
+%0D%0A%0D%0A    @OnClose%0D%0A    public void onClose(Session session, CloseReason reason) %7B%0D%0A    %09System.out.println(%22onClose%22);%0D%0A    %7D%0D%0A%0D%0A    @OnError%0D%0A    public void onError(Session session, Throwable throwable) %7B%0D%0A    %09System.out.println(%22onError%22);%0D%0A        throwable.printStackTrace();%0D%0A    %7D%0D%0A
 %7D%0D%0A

add websocket