|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectplay.Invoker.Invocation
play.jobs.Job<V>
V - The job result type (if any)public class Job<V>
A job is an asynchronously executed unit of work
| Field Summary | |
|---|---|
static java.lang.String |
applicationBaseUrl_configPropertyName
|
protected java.util.concurrent.ExecutorService |
executor
|
static java.lang.String |
invocationType
|
protected java.lang.Throwable |
lastException
|
protected long |
lastRun
|
protected boolean |
wasError
|
| Constructor Summary | |
|---|---|
Job()
|
|
| Method Summary | |
|---|---|
void |
_finally()
Things to do in all cases after the invocation. |
V |
call()
|
void |
doJob()
Here you do the job |
V |
doJobWithResult()
Here you do the job and return a result |
void |
every(int seconds)
Run this job every n seconds |
void |
every(java.lang.String delay)
Run this job every n seconds |
void |
execute()
Override this method |
Invoker.InvocationContext |
getInvocationContext()
|
F.Promise<V> |
in(int seconds)
Start this job in several seconds |
F.Promise<V> |
in(java.lang.String delay)
Start this job in several seconds |
F.Promise<V> |
now()
Start this job now (well ASAP) |
void |
onException(java.lang.Throwable e)
Things to do if the Invocation code thrown an exception |
void |
run()
It's time to execute. |
java.lang.String |
toString()
|
| Methods inherited from class play.Invoker.Invocation |
|---|
after, before, init, onSuccess, suspend |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String invocationType
public static final java.lang.String applicationBaseUrl_configPropertyName
protected java.util.concurrent.ExecutorService executor
protected long lastRun
protected boolean wasError
protected java.lang.Throwable lastException
| Constructor Detail |
|---|
public Job()
| Method Detail |
|---|
public Invoker.InvocationContext getInvocationContext()
getInvocationContext in class Invoker.Invocation
public void doJob()
throws java.lang.Exception
java.lang.Exception
public V doJobWithResult()
throws java.lang.Exception
java.lang.Exception
public void execute()
throws java.lang.Exception
Invoker.Invocation
execute in class Invoker.Invocationjava.lang.Exceptionpublic F.Promise<V> now()
public F.Promise<V> in(java.lang.String delay)
public F.Promise<V> in(int seconds)
public void every(java.lang.String delay)
public void every(int seconds)
public void onException(java.lang.Throwable e)
Invoker.Invocation
onException in class Invoker.Invocationpublic void run()
Invoker.Invocation
run in interface java.lang.Runnablerun in class Invoker.Invocationpublic V call()
call in interface java.util.concurrent.Callable<V>public void _finally()
Invoker.Invocation
_finally in class Invoker.Invocationpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||