Provides a layer of indirection to abstract invocations to Resteasy internal APIs. Making also possible to use different versions of Resteasy (e.g.: v3 and v4) depending on the stack that the server is running.
The methods herein provided are basically related with accessing context data from Resteasy, which changed in latest versions of Resteasy.
It is important to use this class when access to context data is necessary in order to avoid incompatibilities with future versions of Resteasy.
| Modifier and Type | Field and Description |
|---|---|
| private static ResteasyProvider |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static void | |
| public static <R> R | Returns: the instance associated with the giventype or null if non-existent.the type/key to lookup type)Lookup the instance associated with the given type/key |
| public static ResteasyProvider | |
| public static void | pushContext(Class<T>
the type/key to associate the type, Object instance withthe instance instance)Push the given |
| public static void | pushDefaultContextObject(Class<T>
the type/key to associate the type, Object instance withthe instance instance)Push the given |
| provider | back to summary |
|---|---|
| private static ResteasyProvider provider | |
| Resteasy | back to summary |
|---|---|
| public Resteasy() | |
| clearContextData | back to summary |
|---|---|
| public static void clearContextData() Clear the Resteasy context associated with the current thread. | |
| getContextData | back to summary |
|---|---|
| public static <R> R getContextData(Class<R> type) Lookup the instance associated with the given type/key
| |
| getProvider | back to summary |
|---|---|
| public static ResteasyProvider getProvider() | |
| pushContext | back to summary |
|---|---|
| public static void pushContext(Class<T> type, Object instance) Push the given | |
| pushDefaultContextObject | back to summary |
|---|---|
| public static void pushDefaultContextObject(Class<T> type, Object instance) Push the given | |