Top Description Fields Constructors Methods
org.apache.tomcat.websocket.server

public Class WsWriteTimeout

extends Object
implements BackgroundProcess
Class Inheritance
All Implemented Interfaces
org.apache.tomcat.websocket.BackgroundProcess
Imports
java.util.Comparator, .Set, java.util.concurrent.ConcurrentSkipListSet, java.util.concurrent.atomic.AtomicInteger, org.apache.tomcat.websocket.BackgroundProcess, .BackgroundProcessManager

Provides timeouts for asynchronous web socket writes. On the server side we only have access to jakarta.servlet.ServletOutputStream and jakarta.servlet.ServletInputStream so there is no way to set a timeout for writes to the client.

Field Summary

Modifier and TypeField and Description
private int
private final AtomicInteger
private final Set<WsRemoteEndpointImplServer>
endpoints

Note

The comparator imposes orderings that are inconsistent with equals

private volatile int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public int
getProcessPeriod()

Implements org.apache.tomcat.websocket.BackgroundProcess.getProcessPeriod.

The default value is 1 which means asynchronous write timeouts are processed every 1 second.

public void
public void
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

backgroundProcessCountback to summary
private int backgroundProcessCount
countback to summary
private final AtomicInteger count
endpointsback to summary
private final Set<WsRemoteEndpointImplServer> endpoints

Note

The comparator imposes orderings that are inconsistent with equals

processPeriodback to summary
private volatile int processPeriod

Constructor Detail

WsWriteTimeoutback to summary
public WsWriteTimeout()

Method Detail

backgroundProcessback to summary
public void backgroundProcess()

Implements org.apache.tomcat.websocket.BackgroundProcess.backgroundProcess.

Annotations
@Override
getProcessPeriodback to summary
public int getProcessPeriod()

Implements org.apache.tomcat.websocket.BackgroundProcess.getProcessPeriod.

The default value is 1 which means asynchronous write timeouts are processed every 1 second.

Annotations
@Override
registerback to summary
public void register(WsRemoteEndpointImplServer endpoint)
setProcessPeriodback to summary
public void setProcessPeriod(int period)

Implements org.apache.tomcat.websocket.BackgroundProcess.setProcessPeriod.

Annotations
@Override
unregisterback to summary
public void unregister(WsRemoteEndpointImplServer endpoint)