Class AWebsocketConnection
- java.lang.Object
-
- jadex.platform.service.message.websockettransport.AWebsocketConnection
-
- All Implemented Interfaces:
IWebSocketConnection
- Direct Known Subclasses:
WebSocketConnectionClient
,WebsocketConnectionClient2
,WebSocketConnectionServer
public abstract class AWebsocketConnection extends java.lang.Object implements IWebSocketConnection
Abstract websocket connection implements shared functionality between client and server.
-
-
Field Summary
Fields Modifier and Type Field Description protected int
bytesreceived
Current bytes received.protected ITransportHandler<IWebSocketConnection>
handler
The handler.protected boolean
hasheader
Flag if the header was receiver: Needed because header can be null!protected byte[]
header
Header saved for handling once body arrives.protected int
maxmsgsize
Current maximum message size.protected static java.lang.String
NULL_MSG_COMMAND
Command to generate a null message (send as Text frame).protected WebSocketTransportAgent
pojoagent
The agent.
-
Constructor Summary
Constructors Constructor Description AWebsocketConnection(ITransportHandler<IWebSocketConnection> handler)
Creates the connection.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
handleMessagePayload(byte[] payload)
Handles a websocket message payload.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jadex.platform.service.message.websockettransport.IWebSocketConnection
close, forceClose, sendMessage
-
-
-
-
Field Detail
-
NULL_MSG_COMMAND
protected static final java.lang.String NULL_MSG_COMMAND
Command to generate a null message (send as Text frame).- See Also:
- Constant Field Values
-
handler
protected ITransportHandler<IWebSocketConnection> handler
The handler.
-
hasheader
protected boolean hasheader
Flag if the header was receiver: Needed because header can be null!
-
header
protected byte[] header
Header saved for handling once body arrives.
-
maxmsgsize
protected int maxmsgsize
Current maximum message size.
-
pojoagent
protected WebSocketTransportAgent pojoagent
The agent.
-
bytesreceived
protected int bytesreceived
Current bytes received.
-
-
Constructor Detail
-
AWebsocketConnection
public AWebsocketConnection(ITransportHandler<IWebSocketConnection> handler)
Creates the connection.
-
-