cleanups in Jetty WS API
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
parent
8bbea55ed9
commit
7082e2086a
|
@ -23,7 +23,6 @@ module org.eclipse.jetty.websocket.jetty.api
|
|||
exports org.eclipse.jetty.websocket.api;
|
||||
exports org.eclipse.jetty.websocket.api.annotations;
|
||||
exports org.eclipse.jetty.websocket.api.exceptions;
|
||||
exports org.eclipse.jetty.websocket.api.extensions;
|
||||
exports org.eclipse.jetty.websocket.api.util;
|
||||
|
||||
uses ExtensionConfig.Parser;
|
||||
|
|
|
@ -23,8 +23,8 @@ public class CloseStatus
|
|||
private static final int MAX_CONTROL_PAYLOAD = 125;
|
||||
public static final int MAX_REASON_PHRASE = MAX_CONTROL_PAYLOAD - 2;
|
||||
|
||||
private int code;
|
||||
private String phrase;
|
||||
private final int code;
|
||||
private final String phrase;
|
||||
|
||||
/**
|
||||
* Creates a reason for closing a web socket connection with the given code and reason phrase.
|
||||
|
|
|
@ -46,7 +46,7 @@ public interface Frame
|
|||
throw new IllegalArgumentException("OpCode " + op + " is not a valid Frame.Type");
|
||||
}
|
||||
|
||||
private byte opcode;
|
||||
private final byte opcode;
|
||||
|
||||
Type(byte code)
|
||||
{
|
||||
|
|
|
@ -39,14 +39,12 @@ public class WebSocketAdapter implements WebSocketListener
|
|||
|
||||
public boolean isConnected()
|
||||
{
|
||||
Session sess = this.session;
|
||||
return (sess != null) && (sess.isOpen());
|
||||
return session.isOpen();
|
||||
}
|
||||
|
||||
public boolean isNotConnected()
|
||||
{
|
||||
Session sess = this.session;
|
||||
return (sess == null) || (!sess.isOpen());
|
||||
return !isConnected();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -21,7 +21,7 @@ package org.eclipse.jetty.websocket.api.exceptions;
|
|||
@SuppressWarnings("serial")
|
||||
public class CloseException extends WebSocketException
|
||||
{
|
||||
private int statusCode;
|
||||
private final int statusCode;
|
||||
|
||||
public CloseException(int closeCode, String message)
|
||||
{
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
// ========================================================================
|
||||
//
|
||||
|
||||
package org.eclipse.jetty.websocket.api;
|
||||
package org.eclipse.jetty.websocket.api.util;
|
||||
|
||||
public final class WebSocketConstants
|
||||
{
|
Loading…
Reference in New Issue