Package org.glassfish.tyrus.core
Annotation Interface MaxSessions
This annotation may be used to annotate server endpoints as a optional annotation
to
ServerEndpoint
. When number of maximal open
sessions is exceeded every new attempt to open session is closed with
CloseReason.CloseCodes.TRY_AGAIN_LATER
.
If value less then 1 is specified, no limit will be applied.
Annotation example:
@MaxSessions(100)
@ServerEndpoint("/limited-resources")
public class LimitedEndpoint {
}
Maximal number of open sessions can be also specified programmatically
using TyrusServerEndpointConfig.Builder.maxSessions(int)
.
- Author:
- Ondrej Kosatka
-
Required Element Summary
-
Element Details
-
value
int valueMaximal number of open sessions.- Returns:
- maximal number of open sessions.
-