public abstract class BaseContainer extends ExecutorServiceProvider implements WebSocketContainer
Client and Server containers extend this to provide additional functionality.
| Modifier and Type | Class and Description |
|---|---|
protected static interface |
BaseContainer.ShutDownCondition |
| Constructor and Description |
|---|
BaseContainer() |
| Modifier and Type | Method and Description |
|---|---|
java.util.concurrent.ExecutorService |
getExecutorService()
Returns a container-managed
ExecutorService registered under
java:comp/DefaultManagedExecutorService or if the lookup has failed, it returns a
ExecutorService created and managed by this instance of
BaseContainer. |
java.util.concurrent.ScheduledExecutorService |
getScheduledExecutorService()
Returns a container-managed
ScheduledExecutorService registered under
java:comp/DefaultManagedScheduledExecutorService or if the lookup has failed it returns a
ScheduledExecutorService created and managed by this instance of
BaseContainer. |
void |
shutdown()
Release executor services managed by this instance.
|
protected void |
shutdown(BaseContainer.ShutDownCondition shutDownCondition)
Release executor services managed by this instance if the condition passed in the parameter is fulfilled.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconnectToServer, connectToServer, connectToServer, connectToServer, getDefaultAsyncSendTimeout, getDefaultMaxBinaryMessageBufferSize, getDefaultMaxSessionIdleTimeout, getDefaultMaxTextMessageBufferSize, getInstalledExtensions, setAsyncSendTimeout, setDefaultMaxBinaryMessageBufferSize, setDefaultMaxSessionIdleTimeout, setDefaultMaxTextMessageBufferSizepublic java.util.concurrent.ExecutorService getExecutorService()
ExecutorService registered under
java:comp/DefaultManagedExecutorService or if the lookup has failed, it returns a
ExecutorService created and managed by this instance of
BaseContainer.getExecutorService in class ExecutorServiceProviderpublic java.util.concurrent.ScheduledExecutorService getScheduledExecutorService()
ScheduledExecutorService registered under
java:comp/DefaultManagedScheduledExecutorService or if the lookup has failed it returns a
ScheduledExecutorService created and managed by this instance of
BaseContainer.getScheduledExecutorService in class ExecutorServiceProviderpublic void shutdown()
protected void shutdown(BaseContainer.ShutDownCondition shutDownCondition)
shutDownCondition - condition that will be evaluated before executor services are released and they will be
released only if the condition is evaluated to true. The condition will be
evaluated in a synchronized block in order to make the process of its evaluation
and executor services release an atomic operation.Copyright © 2012–2025 Oracle Corporation. All rights reserved.