editorconfig: max line length set
max line length warnings removed missing Copyright added useless publics removed unmaintainable Javadoc tags: @author removed helper class warnings removed field default value initialization removed Multiple warnings removed pref: checkstyle warnings removed Checkstyle will fail the build process if it detects violations switch default cases error logger added
This commit is contained in:
@@ -30,17 +30,11 @@ import org.eclipse.jetty.websocket.api.annotations.WebSocket;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author andrea
|
||||
*/
|
||||
@WebSocket
|
||||
public class MQTTWebSocket {
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(MQTTWebSocket.class);
|
||||
|
||||
private Session session;
|
||||
|
||||
private final CountDownLatch connectSentLatch;
|
||||
|
||||
public MQTTWebSocket() {
|
||||
@@ -50,14 +44,12 @@ public class MQTTWebSocket {
|
||||
@OnWebSocketClose
|
||||
public void onClose(int statusCode, String reason) {
|
||||
System.out.printf("Connection closed: %d - %s%n", statusCode, reason);
|
||||
this.session = null;
|
||||
}
|
||||
|
||||
@OnWebSocketConnect
|
||||
public void onConnect(Session session) throws IOException {
|
||||
System.out.printf("Got connect: %s%n", session);
|
||||
LOG.info("Got connect: %s%n", session);
|
||||
this.session = session;
|
||||
|
||||
// Trivial MQTT Connect message
|
||||
// assertEquals(12, out.readByte()); //remaining length
|
||||
|
||||
Reference in New Issue
Block a user