RuneHive-Game
Loading...
Searching...
No Matches
com.runehive.game.world.cronjobs.Job Class Referenceabstract
Inheritance diagram for com.runehive.game.world.cronjobs.Job:
Collaboration diagram for com.runehive.game.world.cronjobs.Job:

Public Member Functions

abstract void execute ()
void execute (JobExecutionContext jobExecutionContext)

Protected Member Functions

 Job (String name)

Private Attributes

final String name

Detailed Description

Definition at line 6 of file Job.java.

Constructor & Destructor Documentation

◆ Job()

com.runehive.game.world.cronjobs.Job.Job ( String name)
protected

Definition at line 10 of file Job.java.

10 {
11 this.name = name;
12 }

References name.

Referenced by execute().

Here is the caller graph for this function:

Member Function Documentation

◆ execute() [1/2]

abstract void com.runehive.game.world.cronjobs.Job.execute ( )
abstract

◆ execute() [2/2]

void com.runehive.game.world.cronjobs.Job.execute ( JobExecutionContext jobExecutionContext)

Definition at line 15 of file Job.java.

15 {
16 System.out.println("Firing " + name + " job");
17
18 final Job job = this;
19 World.schedule(1, () -> {
20 try {
21 job.execute();
22 } catch (Exception e) {
23 System.err.println("An error occurred in " + job.name + " job");
24 }
25 });
26 }

References execute(), Job(), name, and com.runehive.game.world.World.schedule().

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ name

final String com.runehive.game.world.cronjobs.Job.name
private

Definition at line 8 of file Job.java.

Referenced by execute(), and Job().


The documentation for this class was generated from the following file:
  • java/com/runehive/game/world/cronjobs/Job.java