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(javax.servlet.http.HttpServletRequest request)static voiddestroyMeteor(AtmosphereRequest req)static booleanfirefoxWebSocketEnabled(javax.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 java.lang.StringpathInfo(AtmosphereRequest request)static booleanpollableTransport(AtmosphereResource.TRANSPORT t)static booleanproperProtocol(javax.servlet.http.HttpServletRequest request)static booleanpushMessage(AtmosphereResource.TRANSPORT t)static booleanrawWebSocket(javax.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(javax.servlet.http.HttpServletRequest request)static booleanwebSocketMessage(AtmosphereResource r)static booleanwebSocketQueryStringPresentOrNull(javax.servlet.http.HttpServletRequest request)static AtmosphereResourcewebsocketResource(AtmosphereResource r)
-
-
-
Method Detail
-
webSocketEnabled
public static final boolean webSocketEnabled(javax.servlet.http.HttpServletRequest request)
-
rawWebSocket
public static final boolean rawWebSocket(javax.servlet.http.HttpServletRequest request)
-
firefoxWebSocketEnabled
public static final boolean firefoxWebSocketEnabled(javax.servlet.http.HttpServletRequest request)
-
twoConnectionsTransport
public static final boolean twoConnectionsTransport(AtmosphereResource.TRANSPORT t)
-
webSocketQueryStringPresentOrNull
public static final boolean webSocketQueryStringPresentOrNull(javax.servlet.http.HttpServletRequest request)
-
resumableTransport
public static final boolean resumableTransport(AtmosphereResource.TRANSPORT t)
-
pollableTransport
public static final boolean pollableTransport(AtmosphereResource.TRANSPORT t)
-
pushMessage
public static final boolean pushMessage(AtmosphereResource.TRANSPORT t)
-
atmosphereProtocol
public static final boolean atmosphereProtocol(AtmosphereRequest r)
-
webSocketMessage
public static final boolean webSocketMessage(AtmosphereResource r)
-
properProtocol
public static boolean properProtocol(javax.servlet.http.HttpServletRequest request)
-
websocketResource
public static final AtmosphereResource websocketResource(AtmosphereResource r)
-
closeMessage
public static final boolean closeMessage(javax.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 final void inject(AtmosphereResource r) throws java.lang.IllegalAccessException
- Throws:
java.lang.IllegalAccessException
-
inject
public static final void inject(java.lang.Object object, java.lang.Class clazz, AtmosphereResource r) throws java.lang.IllegalAccessException- Throws:
java.lang.IllegalAccessException
-
inject
public static final void inject(java.lang.Object object, java.lang.Class clazz, AtmosphereConfig config) throws java.lang.IllegalAccessException- Throws:
java.lang.IllegalAccessException
-
getInheritedPrivateFields
public static final java.util.Set<java.lang.reflect.Field> getInheritedPrivateFields(java.lang.Class<?> type)
-
getInheritedPrivateMethod
public static final java.util.Set<java.lang.reflect.Method> getInheritedPrivateMethod(java.lang.Class<?> type)
-
requestScopedInjection
public static final boolean requestScopedInjection(AtmosphereConfig config, AtmosphereHandler h)
-
requestScopedInjection
public static final boolean requestScopedInjection(AtmosphereConfig config, java.lang.Object o)
Inject custom object. This method is mostly for external framework.- Parameters:
config-o-- Returns:
-
destroyMeteor
public static final void destroyMeteor(AtmosphereRequest req)
-
pathInfo
public static java.lang.String pathInfo(AtmosphereRequest request)
-
-