Package csw.params.events
Class SystemEvent
- All Implemented Interfaces:
Event
,Serializable
,scala.Equals
,scala.Product
public class SystemEvent
extends ParameterSetType<SystemEvent>
implements Event, scala.Product, Serializable
Defines a system event. Constructor is private to ensure eventId is created internally to guarantee unique value.
- See Also:
-
Constructor Summary
ConstructorDescriptionSystemEvent
(Id eventId, Prefix source, EventName eventName, UTCTime eventTime, scala.collection.immutable.Set<Parameter<?>> paramSet) SystemEvent
(Prefix source, EventName eventName) A java helper to construct SystemEvent -
Method Summary
Modifier and TypeMethodDescriptionstatic SystemEvent
The apply method is used to create SystemEvent command by end-user.static SystemEvent
The apply method is used to create SystemEvent command by end-user.protected SystemEvent
Create a new SystemEvent instance when a parameter is added or removedeventId()
unique Id for eventThe name of eventThe time of event creationscala.collection.immutable.Set<Parameter<?>>
paramSet()
Holds the parameters for this parameter setsource()
Prefix representing source of the eventMethods inherited from class csw.params.core.generics.ParameterSetType
add, apply, contains, dataToString, exists, find, get, get, getStringMap, jFind, jGet, jGet, jGetStringMap, jMadd, jMissingKeys, jMissingKeys, jParamSet, madd, madd, madd, missingKeys, parameter, remove, remove, size, toString, typeName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface scala.Equals
canEqual, equals
Methods inherited from interface csw.params.events.Event
eventKey, isInvalid, paramType, toString, typeName
Methods inherited from interface scala.Product
productArity, productElement, productElementName, productElementNames, productIterator, productPrefix
-
Constructor Details
-
SystemEvent
-
SystemEvent
A java helper to construct SystemEvent- Parameters:
source
- (undocumented)eventName
- (undocumented)
-
-
Method Details
-
apply
The apply method is used to create SystemEvent command by end-user. eventId is not accepted and will be created internally to guarantee unique value.- Parameters:
source
- prefix representing source of the eventeventName
- the name of event- Returns:
- a new instance of SystemEvent with auto-generated eventId, eventTime and empty paramSet
-
apply
public static SystemEvent apply(Prefix source, EventName eventName, scala.collection.immutable.Set<Parameter<?>> paramSet) The apply method is used to create SystemEvent command by end-user. eventId is not accepted and will be created internally to guarantee unique value.- Parameters:
source
- prefix representing source of the eventeventName
- the name of eventparamSet
- an initial set of parameters (keys with values)- Returns:
- a new instance of SystemEvent with auto-generated eventId and eventTime
-
eventId
Description copied from interface:Event
unique Id for event -
source
Description copied from interface:Event
Prefix representing source of the event -
eventName
Description copied from interface:Event
The name of event -
eventTime
Description copied from interface:Event
The time of event creation -
paramSet
Description copied from class:ParameterSetType
Holds the parameters for this parameter set- Specified by:
paramSet
in interfaceEvent
- Specified by:
paramSet
in classParameterSetType<SystemEvent>
- Returns:
- (undocumented)
-
create
Create a new SystemEvent instance when a parameter is added or removed- Specified by:
create
in classParameterSetType<SystemEvent>
- Parameters:
data
- set of parameters- Returns:
- a new instance of SystemEvent with new eventId, eventTime and provided data
-