|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jason.core.AbstractService | +--jason.core.SchedulableService
Created Wed May 8 15:50:51 2002
This service type has a part of a task scheduler. This kind of service uses a clock system that awakes the service when needed. This is very like the crontab unix/linux system.
Note that the start
and stop
methods will be
call several time during the life cycle of this objet.
When the clock awake this service, the
start
is
called. This is of the service responsability to call the
stop
method.
By default, if you don't reset a starting period, this service is awakened every minute.
Field Summary |
Fields inherited from class jason.core.AbstractService |
INITIALIZED, name, NOSTATE, serviceContext, STARTED, STOPPED |
Fields inherited from interface jason.core.Service |
ERROR_MESSAGE, INFORMATION_MESSAGE, VERBOSE_MESSAGE, WARNING_MESSAGE |
Constructor Summary | |
SchedulableService()
This service is not by default starting as a thread. |
Method Summary | |
int |
getStartingDay()
|
int |
getStartingHour()
|
int |
getStartingMinute()
|
int |
getStartingMonth()
|
double |
getStartingPeriod()
|
void |
init(ServiceContext sc)
Overrided for avoiding an override of the notifyInitReady method |
protected void |
notifyInitSchedulableReady()
This method is called at the end of the notifyInitReady method |
void |
run()
Overrided method for avoiding any thread support or management |
void |
setStartingDay(int day)
Set the starting day number. |
void |
setStartingHour(int hour)
Set the starting hour. |
void |
setStartingMinute(int minute)
Set the starting minute. |
void |
setStartingMonth(int month)
Set the starting month number. |
void |
setStartingPeriod(double period)
This method will awake the service every period in minute. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SchedulableService()
Method Detail |
public void init(ServiceContext sc)
notifyInitReady
method
init
in interface Service
init
in class AbstractService
protected void notifyInitSchedulableReady()
public void setStartingPeriod(double period)
0
value is set, this is
a value for cancelling thie period too. This value can
be used with a starting value too
period
- a period value in minutespublic void setStartingMinute(int minute)
minute
- starting minute starting from 0public void setStartingHour(int hour)
hour
- starting hour starting from 0public void setStartingDay(int day)
public void setStartingMonth(int month)
month
- a month numerb starting from 0public int getStartingMinute()
public int getStartingHour()
public int getStartingDay()
public int getStartingMonth()
public double getStartingPeriod()
public void run()
run
in class AbstractService
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |