public class DefaultAsyncSupportResolver extends java.lang.Object implements AsyncSupportResolver
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
JSR356_WEBSOCKET |
static java.lang.String |
NETTY |
static java.lang.String |
SERVLET_30 |
| Constructor and Description |
|---|
DefaultAsyncSupportResolver(AtmosphereConfig config) |
| Modifier and Type | Method and Description |
|---|---|
AsyncSupport |
defaultCometSupport(boolean preferBlocking)
This method is used to determine the default AsyncSupport if all else fails.
|
java.util.List<java.lang.Class<? extends AsyncSupport>> |
detectContainersPresent()
Returns a list of comet support by containers available on the classpath.
|
java.util.List<java.lang.Class<? extends AsyncSupport>> |
detectWebSocketPresent(boolean useNativeIfPossible,
boolean useServlet30Async) |
AsyncSupport |
newCometSupport(java.lang.Class<? extends AsyncSupport> targetClass)
Given a Class of something that extends AsyncSupport, it tries to return an instance of that class.
|
AsyncSupport |
newCometSupport(java.lang.String targetClassFQN) |
AsyncSupport |
resolve(boolean useNativeIfPossible,
boolean defaultToBlocking)
This method is the general interface to the outside world.
|
AsyncSupport |
resolve(boolean useNativeIfPossible,
boolean defaultToBlocking,
boolean useServlet30Async) |
protected AsyncSupport |
resolveMultipleNativeSupportConflict(java.util.List<java.lang.Class<? extends AsyncSupport>> available)
This method is called if there are more than one potential native container in scope.
|
protected AsyncSupport |
resolveNativeCometSupport(java.util.List<java.lang.Class<? extends AsyncSupport>> available)
This method is called to determine which native comet support to the used.
|
AsyncSupport |
resolveWebSocket(java.util.List<java.lang.Class<? extends AsyncSupport>> available) |
protected boolean |
testClassExists(java.lang.String testClass)
Convenience method that tests if a class with the given FQN is present on the classpath.
|
public static final java.lang.String SERVLET_30
public static final java.lang.String NETTY
public static final java.lang.String JSR356_WEBSOCKET
public DefaultAsyncSupportResolver(AtmosphereConfig config)
protected boolean testClassExists(java.lang.String testClass)
testClass - public java.util.List<java.lang.Class<? extends AsyncSupport>> detectContainersPresent()
public java.util.List<java.lang.Class<? extends AsyncSupport>> detectWebSocketPresent(boolean useNativeIfPossible, boolean useServlet30Async)
public AsyncSupport defaultCometSupport(boolean preferBlocking)
preferBlocking - public AsyncSupport newCometSupport(java.lang.Class<? extends AsyncSupport> targetClass)
targetClass - public AsyncSupport newCometSupport(java.lang.String targetClassFQN)
public AsyncSupport resolve(boolean useNativeIfPossible, boolean defaultToBlocking)
useNativeIfPossible - - should the resolver try to use a native container comet support if present?defaultToBlocking - - should the resolver default to blocking IO comet support?public AsyncSupport resolve(boolean useNativeIfPossible, boolean defaultToBlocking, boolean useServlet30Async)
resolve in interface AsyncSupportResolverpublic AsyncSupport resolveWebSocket(java.util.List<java.lang.Class<? extends AsyncSupport>> available)
protected AsyncSupport resolveNativeCometSupport(java.util.List<java.lang.Class<? extends AsyncSupport>> available)
available - protected AsyncSupport resolveMultipleNativeSupportConflict(java.util.List<java.lang.Class<? extends AsyncSupport>> available)
Copyright © 2022. All Rights Reserved.