Skip to content

Commit

Permalink
Further clarification of zero or negative timeout values
Browse files Browse the repository at this point in the history
  • Loading branch information
markt-asf committed Nov 11, 2021
1 parent 2a3c8fc commit ff815f4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2020 Oracle and/or its affiliates and others.
* Copyright (c) 2018, 2021 Oracle and/or its affiliates and others.
* All rights reserved.
*
* This program and the accompanying materials are made available under the
Expand Down Expand Up @@ -132,7 +132,7 @@ interface Async extends RemoteEndpoint {

/**
* Return the number of milliseconds the implementation will timeout attempting to send a websocket message. A
* non-positive number indicates the implementation will not timeout attempting to send a websocket message
* zero or negative value indicates the implementation will not timeout attempting to send a websocket message
* asynchronously. This value overrides the default value assigned in the WebSocketContainer.
*
* @return the timeout time in milliseconds.
Expand All @@ -141,7 +141,7 @@ interface Async extends RemoteEndpoint {

/**
* Sets the number of milliseconds the implementation will timeout attempting to send a websocket message. A
* non-positive number indicates the implementation will not timeout attempting to send a websocket message
* zero or negative value indicates the implementation will not timeout attempting to send a websocket message
* asynchronously. This value overrides the default value assigned in the WebSocketContainer.
*
* @param timeoutmillis The number of milliseconds this RemoteEndpoint will wait before timing out an incomplete
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2019 Oracle and/or its affiliates and others.
* Copyright (c) 2018, 2021 Oracle and/or its affiliates and others.
* All rights reserved.
*
* This program and the accompanying materials are made available under the
Expand Down Expand Up @@ -38,7 +38,7 @@ public interface WebSocketContainer {

/**
* Return the number of milliseconds the implementation will timeout attempting to send a websocket message for all
* RemoteEndpoints associated with this container. A non-positive number indicates the implementation will not
* RemoteEndpoints associated with this container. A zero or negative value indicates the implementation will not
* timeout attempting to send a websocket message asynchronously. Note this default may be overridden in each
* RemoteEndpoint.
*
Expand All @@ -48,11 +48,11 @@ public interface WebSocketContainer {

/**
* Sets the number of milliseconds the implementation will timeout attempting to send a websocket message for all
* RemoteEndpoints associated with this container. A non-positive number indicates the implementation will not
* RemoteEndpoints associated with this container. A zero or negative value indicates the implementation will not
* timeout attempting to send a websocket message asynchronously. Note this default may be overridden in each
* RemoteEndpoint.
*
* @param timeoutmillis the timeout in milliseconds or a non-positive number for no timeout
* @param timeoutmillis the timeout in milliseconds; use zero or negative value for no timeout
*/
void setAsyncSendTimeout(long timeoutmillis);

Expand Down Expand Up @@ -130,7 +130,7 @@ Session connectToServer(Class<? extends Endpoint> endpointClass, ClientEndpointC

/**
* Return the default time in milliseconds after which any web socket sessions in this container will be closed if
* it has been inactive. A value that is 0 or negative indicates the sessions will never timeout due to inactivity.
* it has been inactive. A value that is zero or negative indicates the sessions will never timeout due to inactivity.
* The value may be overridden on a per session basis using {@link Session#setMaxIdleTimeout(long) }
*
* @return the default number of milliseconds after which an idle session in this container will be closed
Expand All @@ -139,10 +139,10 @@ Session connectToServer(Class<? extends Endpoint> endpointClass, ClientEndpointC

/**
* Sets the default time in milliseconds after which any web socket sessions in this container will be closed if it
* has been inactive. A value that is 0 or negative indicates the sessions will never timeout due to inactivity. The
* has been inactive. A value that is zero or negative indicates the sessions will never timeout due to inactivity. The
* value may be overridden on a per session basis using {@link Session#setMaxIdleTimeout(long) }
*
* @param timeout the maximum time in milliseconds.
* @param timeout the maximum time in milliseconds; use zero or negative value for no timeout
*/
void setDefaultMaxSessionIdleTimeout(long timeout);

Expand Down

0 comments on commit ff815f4

Please sign in to comment.