public class FabricTimerFactory
extends com.streamscape.sef.dispatcher.AbstractFabricTimerFactory
Title: Service Event Fabric Core
Description: Defines a factory creating a special version of FabricTimer
objects.
FabricTimerTask
associated with such timer
raises event.Timer
events during execution.
The event.Timer
event is a MapEvent
containing the following properties:
timerState
property can have the following values:
Timer
event also contains a map of key-values pairs taken from the corresponding timer.
Copyright: Copyright (c) 2012
Company: StreamScape Technologies
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
TIMER_EVENT_ID |
DEFAULT_SERIAL_VERSION_ID
Constructor and Description |
---|
FabricTimerFactory() |
Modifier and Type | Method and Description |
---|---|
static FabricTimer |
createTimer(java.lang.String group,
java.lang.String name,
long interval,
int repeatCount,
DataspaceComponent component)
Creates a new timer with the specified parameters.
|
static FabricTimer |
createTimer(java.lang.String group,
java.lang.String name,
long interval,
int repeatCount,
FabricConnection connection)
Creates a new timer with the specified parameters.
|
static FabricTimer |
createTimer(java.lang.String group,
java.lang.String name,
long interval,
int repeatCount,
ServiceComponent component)
Creates a new timer with the specified parameters.
|
static void |
dropTimer(java.lang.String group,
java.lang.String name)
Drops the specified timer (this timer will be cancelled before).
|
getContext, getContextType, hasContext
clone, getSerialVersionUID
public static final java.lang.String TIMER_EVENT_ID
public static FabricTimer createTimer(java.lang.String group, java.lang.String name, long interval, int repeatCount, FabricConnection connection) throws FabricTimerException, FabricEventDispatcherException
group
- the name of the timer's group.name
- the name of the timer (it should be unique within the group).interval
- the time period (in milliseconds) after which the timer raises
the Timer
event with EXPIRED
state.repeatCount
- the count of periodical raisings of the Timer
event with EXPIRED
state.
If value <= 0 then the event will be raised infinitely until a canceling.connection
- the connection used by the timer for raising of the Timer
events.FabricTimerException
- if the specified timer already exists or any parameter is invalid.FabricEventDispatcherException
- if the connection cannot bind the Timer
event.public static FabricTimer createTimer(java.lang.String group, java.lang.String name, long interval, int repeatCount, DataspaceComponent component) throws FabricTimerException, FabricEventDispatcherException
group
- the name of the timer's group.name
- the name of the timer (it should be unique within the group).interval
- the time period (in milliseconds) after which the timer raises
the Timer
event with EXPIRED
state.repeatCount
- the count of periodical raisings of the Timer
event with EXPIRED
state.component
- the component used by the timer for raising of the Timer
events.FabricTimerException
- if the specified timer already exists or any parameter is invalid.FabricEventDispatcherException
- if the connection cannot bind the Timer
event.public static FabricTimer createTimer(java.lang.String group, java.lang.String name, long interval, int repeatCount, ServiceComponent component) throws FabricTimerException, FabricEventDispatcherException
group
- the name of the timer's group.name
- the name of the timer (it should be unique within the group).interval
- the time period (in milliseconds) after which the timer raises
the Timer
event with EXPIRED
state.repeatCount
- the count of periodical raisings of the Timer
event with EXPIRED
state.component
- the component used by the timer for raising of the Timer
events.FabricTimerException
- if the specified timer already exists or any parameter is invalid.FabricEventDispatcherException
- if the connection cannot bind the Timer
event.public static void dropTimer(java.lang.String group, java.lang.String name)
group
- the name of the timer's group.name
- the name of the timer.Copyright © 2015-2024 StreamScape Technologies. All rights reserved.