public interface InitTabManager extends InstanceStateListener
InitType.BOOT - the process is executed immediately after the
init tab manager service has been started. The processes are executed
in the order of their level. If an entry is set to "fork", the
init tab manager will not wait for its completion but immediately
proceed to the next entry.
InitType.RESPAWN - the re-spawn processes will be started
after the boot entries have been completed. Whenever a process of
type InitType.RESPAWN is terminated - successful or
failing - a new instance will be started again immediately. When
the init tab manager is being shut down, all of the re-spawn processes
will be stopped, propagating the stop request to all running
activities.
InitType.SHUTDOWN - the processes are executed during shutdown
of the system in the order of their level. No fork will be allowed
here, the service awaits the termination of all
InitType.SHUTDOWN processes.
InitType.SHUTDOWN. | Modifier and Type | Method and Description |
|---|---|
java.util.Map<InitType,java.util.TreeMap<java.lang.Integer,InitTabEntry>> |
getInitTab(SessionToken session)
Returns the complete init tab.
|
DataContainer |
getInitTabInputData(SessionToken session,
InitType type,
int level)
Returns the input data for the given init tab entry, or null if not
applicable.
|
java.util.UUID |
getInstanceIDForEntry(SessionToken session,
InitType type,
int level)
Returns the ID of the currently or last running instance of the given
init tab entry, returns null if no instance has run yet.
|
void |
registerNewEntry(SessionToken session,
InitTabEntry entry,
DataContainer inputData)
This method changes the ID of the designated entry, so provide just any ID.
|
void |
removeInitTabEntry(SessionToken session,
InitType type,
int level,
boolean abortInstance)
Removes an init tab entry and optionally aborts a possibly running
instance.
|
getInstanceStateNotificationgetLocalUris, getRelease, getRuntimeRequiredServices, getServiceInstanceName, getStartupRequiredServices, getURIs, init, ping, preShutdown, shutdown, startvoid registerNewEntry(SessionToken session, InitTabEntry entry, DataContainer inputData)
session - Session token for authorisation.entry - The new init tab entry.inputData - The input data container, or null if not applicable.java.lang.IllegalArgumentException - If an entry for given type and level
exists already.void removeInitTabEntry(SessionToken session, InitType type, int level, boolean abortInstance)
session - Session token for authorisation.type - The init type.level - The init level.abortInstance - If set to true, and there is currently an instance
running, it will be aborted (propagating to running activities,
too).java.lang.IllegalArgumentException - If no entry for given type and level
exists.java.util.UUID getInstanceIDForEntry(SessionToken session, InitType type, int level)
session - Session token for authorisation.type - The init type.level - The init level.java.lang.IllegalArgumentException - If no entry for given type and level
exists.java.util.Map<InitType,java.util.TreeMap<java.lang.Integer,InitTabEntry>> getInitTab(SessionToken session)
session - Session token for authorisation.DataContainer getInitTabInputData(SessionToken session, InitType type, int level)
session - Session token for authorisation.type - The init type.level - The init level.java.lang.IllegalArgumentException - If no entry for given type and level
exists.