Class WebSocket
- java.lang.Object
-
- io.socket.engineio.server.Emitter
-
- io.socket.engineio.server.Transport
-
- io.socket.engineio.server.transport.WebSocket
-
public final class WebSocket extends Transport
WebSocket transport.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.socket.engineio.server.Emitter
Emitter.Listener
-
-
Field Summary
Fields Modifier and Type Field Description private EngineIoWebSocketmConnectionstatic java.lang.StringNAME-
Fields inherited from class io.socket.engineio.server.Transport
mParser, mReadyState
-
-
Constructor Summary
Constructors Constructor Description WebSocket(EngineIoWebSocket webSocket, Parser parser)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoClose()Transport specific logic for closing transport.java.util.Map<java.lang.String,java.util.List<java.lang.String>>getInitialHeaders()Get the headers of the initial HTTP request.java.util.Map<java.lang.String,java.lang.String>getInitialQuery()Get the query parameters of the initial HTTP request.java.lang.StringgetName()Get the name of this transport.booleanisWritable()Checks whether the transport is currently writable.voidonRequest(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)Handle a client HTTP request.voidsend(java.util.List<Packet<?>> packets)Send a list of packets over the transport.-
Methods inherited from class io.socket.engineio.server.Transport
close, onClose, onData, onError, onPacket
-
-
-
-
Field Detail
-
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
-
mConnection
private final EngineIoWebSocket mConnection
-
-
Constructor Detail
-
WebSocket
public WebSocket(EngineIoWebSocket webSocket, Parser parser)
-
-
Method Detail
-
getInitialQuery
public java.util.Map<java.lang.String,java.lang.String> getInitialQuery()
Description copied from class:TransportGet the query parameters of the initial HTTP request.- Specified by:
getInitialQueryin classTransport- Returns:
- Query parameters of the initial HTTP request.
-
getInitialHeaders
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getInitialHeaders()
Description copied from class:TransportGet the headers of the initial HTTP request.- Specified by:
getInitialHeadersin classTransport- Returns:
- Headers of the initial HTTP request.
-
onRequest
public void onRequest(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)Description copied from class:TransportHandle a client HTTP request.
-
send
public void send(java.util.List<Packet<?>> packets)
Description copied from class:TransportSend a list of packets over the transport.
-
isWritable
public boolean isWritable()
Description copied from class:TransportChecks whether the transport is currently writable.- Specified by:
isWritablein classTransport- Returns:
- Boolean value indicating if transport can be written to.
-
getName
public java.lang.String getName()
Description copied from class:TransportGet the name of this transport.
-
-