Class WsWriteTimeout
- java.lang.Object
-
- org.apache.tomcat.websocket.server.WsWriteTimeout
-
- All Implemented Interfaces:
BackgroundProcess
public class WsWriteTimeout extends java.lang.Object implements BackgroundProcess
Provides timeouts for asynchronous web socket writes. On the server side we only have access toServletOutputStreamandServletInputStreamso there is no way to set a timeout for writes to the client.
-
-
Constructor Summary
Constructors Constructor Description WsWriteTimeout()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbackgroundProcess()Performs background processing.intgetProcessPeriod()The default value is 1 which means asynchronous write timeouts are processed every 1 second.voidregister(WsRemoteEndpointImplServer endpoint)Registers an endpoint for timeout tracking.voidsetProcessPeriod(int period)Sets the period, in seconds, between invocations ofBackgroundProcess.backgroundProcess().voidunregister(WsRemoteEndpointImplServer endpoint)Unregisters an endpoint from timeout tracking.
-
-
-
Method Detail
-
backgroundProcess
public void backgroundProcess()
Description copied from interface:BackgroundProcessPerforms background processing.- Specified by:
backgroundProcessin interfaceBackgroundProcess
-
setProcessPeriod
public void setProcessPeriod(int period)
Description copied from interface:BackgroundProcessSets the period, in seconds, between invocations ofBackgroundProcess.backgroundProcess().- Specified by:
setProcessPeriodin interfaceBackgroundProcess- Parameters:
period- the period in seconds
-
getProcessPeriod
public int getProcessPeriod()
The default value is 1 which means asynchronous write timeouts are processed every 1 second.- Specified by:
getProcessPeriodin interfaceBackgroundProcess
-
register
public void register(WsRemoteEndpointImplServer endpoint)
Registers an endpoint for timeout tracking.- Parameters:
endpoint- the endpoint to register
-
unregister
public void unregister(WsRemoteEndpointImplServer endpoint)
Unregisters an endpoint from timeout tracking.- Parameters:
endpoint- the endpoint to unregister
-
-