You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.1 KiB
40 lines
1.1 KiB
package com.fr.plugin.api; |
|
|
|
import com.fr.decision.fun.impl.BaseHttpHandler; |
|
import com.fr.log.FineLoggerFactory; |
|
import com.fr.plugin.utils.SocketIOUitls; |
|
import com.fr.third.socketio.SocketIOClient; |
|
import com.fr.third.socketio.SocketIOServer; |
|
import com.fr.third.springframework.web.bind.annotation.RequestMethod; |
|
import com.fr.web.socketio.SocketIOServerFactory; |
|
import com.fr.web.utils.WebUtils; |
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
import javax.servlet.http.HttpServletResponse; |
|
import java.util.Collection; |
|
|
|
public class AddApi extends BaseHttpHandler { |
|
@Override |
|
public RequestMethod getMethod() { |
|
return null; |
|
} |
|
|
|
@Override |
|
public String getPath() { |
|
return "/addWs"; |
|
} |
|
|
|
@Override |
|
public boolean isPublic() { |
|
return true; |
|
} |
|
|
|
@Override |
|
public void handle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception { |
|
SocketIOServerFactory.getBroadcastOperations().sendEvent("clickMessage", "hahahaha"); |
|
// DecisionStatusService.webSocketService().getAlias(username); |
|
|
|
WebUtils.printAsString(httpServletResponse, "success"); |
|
} |
|
|
|
}
|
|
|