public class ScheduleForActorMethod extends java.lang.Object implements EntityMethod
ActionScheduler.scheduleForActor(Action, long, long, TimeUnit)
.ScheduleForActor
,
ScheduleForActorFunction
Constructor and Description |
---|
ScheduleForActorMethod(java.lang.reflect.Constructor<?> constructor,
long initialDelay,
long period,
java.util.concurrent.TimeUnit unit)
Creates a schedule actor method.
|
Modifier and Type | Method and Description |
---|---|
java.lang.reflect.Constructor<?> |
getConstructor()
Gets the action constructor
|
long |
getInitialDelay()
Gets the initial delay.
|
long |
getPeriod()
Gets the period.
|
java.util.concurrent.TimeUnit |
getUnit()
Gets the time unit.
|
java.lang.Object |
invoke(java.lang.Object proxy,
Entity entity,
java.lang.Object[] args)
This will invoke the desired functionality for this method using the proxy, entity and
supplied arguments.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDependencies
public ScheduleForActorMethod(java.lang.reflect.Constructor<?> constructor, long initialDelay, long period, java.util.concurrent.TimeUnit unit)
constructor
- Action constructor.initialDelay
- Initial delay before running action.period
- Period repeat.unit
- Time unit for action.public java.lang.reflect.Constructor<?> getConstructor()
public long getInitialDelay()
public long getPeriod()
public java.util.concurrent.TimeUnit getUnit()
public java.lang.Object invoke(java.lang.Object proxy, Entity entity, java.lang.Object[] args) throws java.lang.Throwable
EntityMethod
invoke
in interface EntityMethod
proxy
- Possible proxy of entity type.entity
- Entity this proxy is for.args
- Supplied arguments to the original method.java.lang.Throwable
- If the invocation caused an exception.