tests
This commit is contained in:
parent
0bd6c5acf7
commit
842f3aa8e8
|
@ -2,6 +2,7 @@ package de.ctdo.websocket;
|
|||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.sun.grizzly.tcp.Request;
|
||||
import com.sun.grizzly.websockets.ProtocolHandler;
|
||||
|
@ -11,6 +12,7 @@ import com.sun.grizzly.websockets.WebSocketListener;
|
|||
|
||||
import de.ctdo.control.BuntiController;
|
||||
|
||||
@Component
|
||||
public class BuntiControllerApplication extends WebSocketApplication {
|
||||
Logger logger = LoggerFactory.getLogger(BuntiControllerApplication.class);
|
||||
|
||||
|
|
|
@ -7,26 +7,41 @@ import javax.servlet.http.HttpServlet;
|
|||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.sun.grizzly.websockets.WebSocketEngine;
|
||||
|
||||
|
||||
public class BuntiControllerServlet extends HttpServlet {
|
||||
// das klappt so jedenfalls alles noch nicht :)
|
||||
@Component
|
||||
public class BuntiControllerServlet { // extends HttpServlet {
|
||||
private static final long serialVersionUID = 1L;
|
||||
Logger logger = LoggerFactory.getLogger(BuntiControllerServlet.class);
|
||||
|
||||
private final BuntiControllerApplication app = new BuntiControllerApplication();
|
||||
private BuntiControllerApplication app;
|
||||
|
||||
@Override
|
||||
public void init(ServletConfig config) throws ServletException {
|
||||
WebSocketEngine.getEngine().register(app);
|
||||
logger.debug("registered BuntiControllerApplication");
|
||||
@Autowired
|
||||
public void setApp(BuntiControllerApplication app) {
|
||||
this.app = app;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
WebSocketEngine.getEngine().unregister(app);
|
||||
logger.debug("unregistered BuntiControllerApplication");
|
||||
|
||||
|
||||
public void BuntiControllerApplication() {
|
||||
// WebSocketEngine.getEngine().register(app);
|
||||
// logger.debug("registered BuntiControllerApplication");
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public void init(ServletConfig config) throws ServletException {
|
||||
// WebSocketEngine.getEngine().register(app);
|
||||
// logger.debug("registered BuntiControllerApplication");
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void destroy() {
|
||||
// WebSocketEngine.getEngine().unregister(app);
|
||||
// logger.debug("unregistered BuntiControllerApplication");
|
||||
// }
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue