|
OSGi™ Service Platform Release 4 Version 4.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
It is allowed to schedule an application based on a specific event. ScheduledApplication service keeps the schedule information. When the specified event is fired a new instance must be launched. Note that launching operation may fail because e.g. the application is locked.
Each ScheduledApplication
instance has an identifier which is
unique within the scope of the application being scheduled.
ScheduledApplication
instances are registered as services.
The APPLICATION_PID
service property contains the PID of the
application being scheduled, the SCHEDULE_ID
service property
contains the schedule identifier.
Field Summary | |
static java.lang.String |
APPLICATION_PID
The property key for the identifier of the application being scheduled. |
static java.lang.String |
DAY_OF_MONTH
The name of the day of month attribute of a virtual timer event. |
static java.lang.String |
DAY_OF_WEEK
The name of the day of week attribute of a virtual timer event. |
static java.lang.String |
HOUR_OF_DAY
The name of the hour of day attribute of a virtual timer event. |
static java.lang.String |
MINUTE
The name of the minute attribute of a virtual timer event. |
static java.lang.String |
MONTH
The name of the month attribute of a virtual timer event. |
static java.lang.String |
SCHEDULE_ID
The property key for the schedule identifier. |
static java.lang.String |
TIMER_TOPIC
The topic name for the virtual timer topic. |
static java.lang.String |
TRIGGERING_EVENT
The key for the startup argument used to pass the event object that triggered the schedule to launch the application instance. |
static java.lang.String |
YEAR
The name of the year attribute of a virtual timer event. |
Method Summary | |
ApplicationDescriptor |
getApplicationDescriptor()
Retrieves the ApplicationDescriptor which represents the application and necessary for launching. |
java.util.Map |
getArguments()
Queries the startup arguments specified when the application was scheduled. |
java.lang.String |
getEventFilter()
Queries the event filter for the triggering event. |
java.lang.String |
getScheduleId()
Returns the identifier of this schedule. |
java.lang.String |
getTopic()
Queries the topic of the triggering event. |
boolean |
isRecurring()
Queries if the schedule is recurring. |
void |
remove()
Cancels this schedule of the application. |
Field Detail |
public static final java.lang.String APPLICATION_PID
public static final java.lang.String SCHEDULE_ID
public static final java.lang.String TRIGGERING_EVENT
GuardedObject
protected by the corresponding
TopicPermission
.
public static final java.lang.String TIMER_TOPIC
public static final java.lang.String YEAR
Calendar.YEAR
.
public static final java.lang.String MONTH
Calendar.MONTH
.
public static final java.lang.String DAY_OF_MONTH
Calendar.DAY_OF_MONTH
.
public static final java.lang.String DAY_OF_WEEK
Calendar.DAY_OF_WEEK
.
public static final java.lang.String HOUR_OF_DAY
Calendar.HOUR_OF_DAY
.
public static final java.lang.String MINUTE
Calendar.MINUTE
.
Method Detail |
public java.lang.String getScheduleId()
public java.lang.String getTopic()
java.lang.IllegalStateException
- if the scheduled application service is unregisteredpublic java.lang.String getEventFilter()
java.lang.IllegalStateException
- if the scheduled application service is unregisteredpublic boolean isRecurring()
java.lang.IllegalStateException
- if the scheduled application service is unregisteredpublic ApplicationDescriptor getApplicationDescriptor()
java.lang.IllegalStateException
- if the scheduled application service is unregisteredpublic java.util.Map getArguments()
java.lang.IllegalStateException
- if the scheduled application service is unregisteredpublic void remove()
java.lang.SecurityException
- if the caller doesn't have "schedule"
ApplicationAdminPermission for the scheduled application.
java.lang.IllegalStateException
- if the scheduled application service is unregistered
|
OSGi™ Service Platform Release 4 Version 4.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |