Package csw.params.events
Class SystemEvent
- java.lang.Object
-
- csw.params.core.generics.ParameterSetType<SystemEvent>
-
- csw.params.events.SystemEvent
-
- All Implemented Interfaces:
Event
,java.io.Serializable
,scala.Equals
,scala.Product
public class SystemEvent extends ParameterSetType<SystemEvent> implements Event, scala.Product, java.io.Serializable
Defines a system event. Constructor is private to ensure eventId is created internally to guarantee unique value.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SystemEvent(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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SystemEvent
apply(Prefix source, EventName eventName)
The apply method is used to create SystemEvent command by end-user.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.protected SystemEvent
create(scala.collection.immutable.Set<Parameter<?>> data)
Create a new SystemEvent instance when a parameter is added or removedId
eventId()
unique Id for eventEventName
eventName()
The name of eventUTCTime
eventTime()
The time of event creationscala.collection.immutable.Set<Parameter<?>>
paramSet()
Holds the parameters for this parameter setPrefix
source()
Prefix representing source of the event-
Methods 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
-
-
-
-
Method Detail
-
apply
public static SystemEvent apply(Prefix source, EventName eventName)
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
-
source
public Prefix source()
Description copied from interface:Event
Prefix representing source of the event
-
eventTime
public UTCTime eventTime()
Description copied from interface:Event
The time of event creation
-
paramSet
public scala.collection.immutable.Set<Parameter<?>> 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
protected SystemEvent create(scala.collection.immutable.Set<Parameter<?>> data)
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
-
-