Package org.atmosphere.util
Class Utils
- java.lang.Object
-
- org.atmosphere.util.Utils
-
public final class Utils extends java.lang.ObjectUtils class.- Author:
- Jeanfrancois Arcand
-
-
Constructor Summary
Constructors Constructor Description Utils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanatmosphereProtocol(AtmosphereRequest r)static booleancloseMessage(jakarta.servlet.http.HttpServletRequest request)static voiddestroyMeteor(AtmosphereRequest req)static booleanfirefoxWebSocketEnabled(jakarta.servlet.http.HttpServletRequest request)static java.util.Set<java.lang.reflect.Field>getInheritedPrivateFields(java.lang.Class<?> type)static java.util.Set<java.lang.reflect.Method>getInheritedPrivateMethod(java.lang.Class<?> type)static voidinject(java.lang.Object object, java.lang.Class<?> clazz, AtmosphereConfig config)static voidinject(java.lang.Object object, java.lang.Class<?> clazz, AtmosphereResource r)static voidinject(AtmosphereResource r)static java.lang.Objectinvoke(java.lang.Object proxiedInstance, java.lang.reflect.Method m, java.lang.Object o)Manages the invocation of the given method on the specified 'proxied' instance.static booleanisRunningTest()static java.lang.StringpathInfo(AtmosphereRequest request)static booleanpollableTransport(AtmosphereResource.TRANSPORT t)static booleanproperProtocol(jakarta.servlet.http.HttpServletRequest request)static booleanpushMessage(AtmosphereResource.TRANSPORT t)static booleanrawWebSocket(jakarta.servlet.http.HttpServletRequest request)static booleanrequestScopedInjection(AtmosphereConfig config, java.lang.Object o)Inject custom object.static booleanrequestScopedInjection(AtmosphereConfig config, AtmosphereHandler h)static booleanresumableTransport(AtmosphereResource.TRANSPORT t)static booleantwoConnectionsTransport(AtmosphereResource.TRANSPORT t)static booleanwebSocketEnabled(jakarta.servlet.http.HttpServletRequest request)static booleanwebSocketMessage(AtmosphereResource r)static booleanwebSocketQueryStringPresentOrNull(jakarta.servlet.http.HttpServletRequest request)static AtmosphereResourcewebsocketResource(AtmosphereResource r)
-
-
-
Method Detail
-
webSocketEnabled
public static boolean webSocketEnabled(jakarta.servlet.http.HttpServletRequest request)
-
rawWebSocket
public static boolean rawWebSocket(jakarta.servlet.http.HttpServletRequest request)
-
firefoxWebSocketEnabled
public static boolean firefoxWebSocketEnabled(jakarta.servlet.http.HttpServletRequest request)
-
twoConnectionsTransport
public static boolean twoConnectionsTransport(AtmosphereResource.TRANSPORT t)
-
webSocketQueryStringPresentOrNull
public static boolean webSocketQueryStringPresentOrNull(jakarta.servlet.http.HttpServletRequest request)
-
resumableTransport
public static boolean resumableTransport(AtmosphereResource.TRANSPORT t)
-
pollableTransport
public static boolean pollableTransport(AtmosphereResource.TRANSPORT t)
-
pushMessage
public static boolean pushMessage(AtmosphereResource.TRANSPORT t)
-
atmosphereProtocol
public static boolean atmosphereProtocol(AtmosphereRequest r)
-
webSocketMessage
public static boolean webSocketMessage(AtmosphereResource r)
-
properProtocol
public static boolean properProtocol(jakarta.servlet.http.HttpServletRequest request)
-
websocketResource
public static AtmosphereResource websocketResource(AtmosphereResource r)
-
closeMessage
public static boolean closeMessage(jakarta.servlet.http.HttpServletRequest request)
-
invoke
public static java.lang.Object invoke(java.lang.Object proxiedInstance, java.lang.reflect.Method m, java.lang.Object o)Manages the invocation of the given method on the specified 'proxied' instance. Logs any invocation failure.
- Parameters:
proxiedInstance- the instancem- the method to invoke that belongs to the instanceo- the optional parameter- Returns:
- the result of the invocation
-
inject
public static void inject(AtmosphereResource r) throws java.lang.IllegalAccessException
- Throws:
java.lang.IllegalAccessException
-
inject
public static void inject(java.lang.Object object, java.lang.Class<?> clazz, AtmosphereResource r) throws java.lang.IllegalAccessException- Throws:
java.lang.IllegalAccessException
-
inject
public static void inject(java.lang.Object object, java.lang.Class<?> clazz, AtmosphereConfig config) throws java.lang.IllegalAccessException- Throws:
java.lang.IllegalAccessException
-
getInheritedPrivateFields
public static java.util.Set<java.lang.reflect.Field> getInheritedPrivateFields(java.lang.Class<?> type)
-
getInheritedPrivateMethod
public static java.util.Set<java.lang.reflect.Method> getInheritedPrivateMethod(java.lang.Class<?> type)
-
requestScopedInjection
public static boolean requestScopedInjection(AtmosphereConfig config, AtmosphereHandler h)
-
requestScopedInjection
public static boolean requestScopedInjection(AtmosphereConfig config, java.lang.Object o)
Inject custom object. This method is mostly for external framework.
-
destroyMeteor
public static void destroyMeteor(AtmosphereRequest req)
-
pathInfo
public static java.lang.String pathInfo(AtmosphereRequest request)
-
isRunningTest
public static boolean isRunningTest()
-
-