Class Utils

java.lang.Object
org.atmosphere.util.Utils

public final class Utils extends Object
Utils class.
Author:
Jeanfrancois Arcand
  • Constructor Details

    • Utils

      public Utils()
  • Method Details

    • webSocketEnabled

      public static boolean webSocketEnabled(javax.servlet.http.HttpServletRequest request)
    • rawWebSocket

      public static boolean rawWebSocket(javax.servlet.http.HttpServletRequest request)
    • firefoxWebSocketEnabled

      public static boolean firefoxWebSocketEnabled(javax.servlet.http.HttpServletRequest request)
    • twoConnectionsTransport

      public static boolean twoConnectionsTransport(AtmosphereResource.TRANSPORT t)
    • webSocketQueryStringPresentOrNull

      public static boolean webSocketQueryStringPresentOrNull(javax.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(javax.servlet.http.HttpServletRequest request)
    • websocketResource

      public static AtmosphereResource websocketResource(AtmosphereResource r)
    • closeMessage

      public static boolean closeMessage(javax.servlet.http.HttpServletRequest request)
    • invoke

      public static Object invoke(Object proxiedInstance, Method m, Object o)

      Manages the invocation of the given method on the specified 'proxied' instance. Logs any invocation failure.

      Parameters:
      proxiedInstance - the instance
      m - the method to invoke that belongs to the instance
      o - the optional parameter
      Returns:
      the result of the invocation
    • inject

      public static void inject(AtmosphereResource r) throws IllegalAccessException
      Throws:
      IllegalAccessException
    • inject

      public static void inject(Object object, Class<?> clazz, AtmosphereResource r) throws IllegalAccessException
      Throws:
      IllegalAccessException
    • inject

      public static void inject(Object object, Class<?> clazz, AtmosphereConfig config) throws IllegalAccessException
      Throws:
      IllegalAccessException
    • getInheritedPrivateFields

      public static Set<Field> getInheritedPrivateFields(Class<?> type)
    • getInheritedPrivateMethod

      public static Set<Method> getInheritedPrivateMethod(Class<?> type)
    • requestScopedInjection

      public static boolean requestScopedInjection(AtmosphereConfig config, AtmosphereHandler h)
    • requestScopedInjection

      public static boolean requestScopedInjection(AtmosphereConfig config, Object o)
      Inject custom object. This method is mostly for external framework.
    • destroyMeteor

      public static void destroyMeteor(AtmosphereRequest req)
    • pathInfo

      public static String pathInfo(AtmosphereRequest request)
    • isRunningTest

      public static boolean isRunningTest()
    • isUnderJDK11AndUp

      public static boolean isUnderJDK11AndUp()