Package play
Class Invoker.InvocationContext
- java.lang.Object
-
- play.Invoker.InvocationContext
-
- Enclosing class:
- Invoker
public static class Invoker.InvocationContext extends java.lang.ObjectThe class/method that will be invoked by the current operation
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.ThreadLocal<Invoker.InvocationContext>current
-
Constructor Summary
Constructors Constructor Description InvocationContext(java.lang.String invocationType)InvocationContext(java.lang.String invocationType, java.lang.annotation.Annotation[] annotations)InvocationContext(java.lang.String invocationType, java.lang.annotation.Annotation[]... annotations)InvocationContext(java.lang.String invocationType, java.util.List<java.lang.annotation.Annotation> annotations)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Invoker.InvocationContextcurrent()<T extends java.lang.annotation.Annotation>
TgetAnnotation(java.lang.Class<T> clazz)java.util.List<java.lang.annotation.Annotation>getAnnotations()java.lang.StringgetInvocationType()Returns the InvocationType for this invocation - Ie: A plugin can use this to find out if it runs in the context of a background Job<T extends java.lang.annotation.Annotation>
booleanisAnnotationPresent(java.lang.Class<T> clazz)java.lang.StringtoString()
-
-
-
Field Detail
-
current
public static final java.lang.ThreadLocal<Invoker.InvocationContext> current
-
-
Constructor Detail
-
InvocationContext
public InvocationContext(java.lang.String invocationType)
-
InvocationContext
public InvocationContext(java.lang.String invocationType, java.util.List<java.lang.annotation.Annotation> annotations)
-
InvocationContext
public InvocationContext(java.lang.String invocationType, java.lang.annotation.Annotation[] annotations)
-
InvocationContext
public InvocationContext(java.lang.String invocationType, java.lang.annotation.Annotation[]... annotations)
-
-
Method Detail
-
current
public static Invoker.InvocationContext current()
-
getAnnotations
public java.util.List<java.lang.annotation.Annotation> getAnnotations()
-
getAnnotation
public <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> clazz)
-
isAnnotationPresent
public <T extends java.lang.annotation.Annotation> boolean isAnnotationPresent(java.lang.Class<T> clazz)
-
getInvocationType
public java.lang.String getInvocationType()
Returns the InvocationType for this invocation - Ie: A plugin can use this to find out if it runs in the context of a background Job- Returns:
- the InvocationType for this invocation
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-