Class WebSocketTransportAgent
- java.lang.Object
-
- jadex.platform.service.transport.AbstractTransportAgent<IWebSocketConnection>
-
- jadex.platform.service.message.websockettransport.WebSocketTransportAgent
-
- All Implemented Interfaces:
IInternalService
,IService
,IMemstatService
,ITransportInfoService
,ITransportService
,ITransportHandler<IWebSocketConnection>
public class WebSocketTransportAgent extends AbstractTransportAgent<IWebSocketConnection>
Agent implementing the web socket transport.
-
-
Field Summary
Fields Modifier and Type Field Description protected long
connecttimeout
Timeout on trying to connect.protected int
idletimeout
Idle connection timeout.protected int
maxpayload
Maximum size of websocket frame payloads.protected IDaemonThreadPoolService
threadpoolsrv
Daemon thread pool service.protected com.neovisionaries.ws.client.WebSocketFactory
websocketfactory
WebSocket factory.-
Fields inherited from class jadex.platform.service.transport.AbstractTransportAgent
agent, cleanupinterval, commandswaitingforcons, establishedconnections, execfeat, handshakingconnections, impl, infosubscribers, maxmsgsize, nextcleanup, platformid, port, restablishedconnections, secser, serser, tas
-
Fields inherited from interface jadex.bridge.service.IService
EMPTY_SERVICES
-
-
Constructor Summary
Constructors Constructor Description WebSocketTransportAgent()
Creates the agent.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ITransport<IWebSocketConnection>
createTransportImpl()
Get the transport implementationlong
getConnectTimeout()
Gets the connect timeout.int
getIdleTimeout()
Gets the idle timeout.int
getMaximumMessageSize()
Gets the maximum message size of websocket messages.int
getMaximumPayloadSize()
Gets the maximum size of websocket frame payloads.IDaemonThreadPoolService
getThreadPoolService()
Returns the thread pool service.com.neovisionaries.ws.client.WebSocketFactory
getWebSocketFactory()
Gets the WebSocket factory.void
setThreadPoolService(IDaemonThreadPoolService tps)
Sets the thread pool service.void
setWebsocketFactory(com.neovisionaries.ws.client.WebSocketFactory websocketfactory)
Sets the WebSocket factory.-
Methods inherited from class jadex.platform.service.transport.AbstractTransportAgent
canDecide, cleanup, collectConnectionStatus, connectionClosed, connectionEstablished, createNewConnections, deliverRemoteMessage, establishConnection, getAccess, getConnections, getMemInfo, getMethodInfos, getPropertyMap, getServiceId, invokeMethod, isValid, messageReceived, sendMessage, setComponentAccess, setServiceIdentifier, shutdown, shutdownService, start, startService, subscribeToConnections
-
-
-
-
Field Detail
-
maxpayload
protected int maxpayload
Maximum size of websocket frame payloads.
-
idletimeout
protected int idletimeout
Idle connection timeout.
-
connecttimeout
protected long connecttimeout
Timeout on trying to connect.
-
threadpoolsrv
protected IDaemonThreadPoolService threadpoolsrv
Daemon thread pool service.
-
websocketfactory
protected com.neovisionaries.ws.client.WebSocketFactory websocketfactory
WebSocket factory.
-
-
Method Detail
-
createTransportImpl
public ITransport<IWebSocketConnection> createTransportImpl()
Get the transport implementation- Overrides:
createTransportImpl
in classAbstractTransportAgent<IWebSocketConnection>
-
getMaximumPayloadSize
public int getMaximumPayloadSize()
Gets the maximum size of websocket frame payloads.- Returns:
- Maximum size of websocket frame payloads.
-
getMaximumMessageSize
public int getMaximumMessageSize()
Gets the maximum message size of websocket messages.- Returns:
- Maximum message size of websocket messages.
-
getIdleTimeout
public int getIdleTimeout()
Gets the idle timeout.- Returns:
- The idle timeout.
-
getConnectTimeout
public long getConnectTimeout()
Gets the connect timeout.- Returns:
- The connect timeout.
-
getThreadPoolService
public IDaemonThreadPoolService getThreadPoolService()
Returns the thread pool service.- Returns:
- The thread pool service.
-
setThreadPoolService
public void setThreadPoolService(IDaemonThreadPoolService tps)
Sets the thread pool service.- Parameters:
tps
- The thread pool service.
-
getWebSocketFactory
public com.neovisionaries.ws.client.WebSocketFactory getWebSocketFactory()
Gets the WebSocket factory.- Returns:
- The WebSocket factory.
-
setWebsocketFactory
public void setWebsocketFactory(com.neovisionaries.ws.client.WebSocketFactory websocketfactory)
Sets the WebSocket factory.- Parameters:
websocketfactory
- The WebSocket factory.
-
-