Package de.gmxhome.conrad.jpos.jpos_base
Class UnitStatusUpdateEvent
java.lang.Object
java.util.EventObject
jpos.events.JposEvent
jpos.events.StatusUpdateEvent
de.gmxhome.conrad.jpos.jpos_base.JposStatusUpdateEvent
de.gmxhome.conrad.jpos.jpos_base.UnitStatusUpdateEvent
- All Implemented Interfaces:
Serializable
Status update event implementation for subsystem unit devices.
- See Also:
- Serialized Form
-
Field Summary
FieldsFields inherited from class jpos.events.StatusUpdateEvent
status
Fields inherited from class jpos.events.JposEvent
sequenceNumber
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorsConstructorDescriptionUnitStatusUpdateEvent(JposBase source, int state, int units)
Constructor, Parameters passed to base class unchanged. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks if the device state corresponds to the event status.Creates copy of given event for a different property set.boolean
Sets status properties and checks whether status properties have been changed.void
Sets those properties that shall be set immediately before the event will be fired to the application.Methods inherited from class de.gmxhome.conrad.jpos.jpos_base.JposStatusUpdateEvent
block, getPropertySet, getPropertyValues, propertiesHaveBeenChanged, setStatus, setStatusProperties, toLogString
Methods inherited from class jpos.events.StatusUpdateEvent
getStatus
Methods inherited from class jpos.events.JposEvent
getSequenceNumber, getWhen, incrSequenceNumber, updateSequenceNumber
Methods inherited from class java.util.EventObject
getSource, toString
-
Field Details
-
Units
public final int UnitsTarget units of the corresponding status change.
-
-
Constructor Details
-
UnitStatusUpdateEvent
Constructor, Parameters passed to base class unchanged.- Parameters:
source
- Source, for services implemented with this framework, the (class.)ClassService object.state
- Status, see UPOS specification, chapter Class - Events - StatusUpdateEvent.units
- Units where status has been changed.
-
-
Method Details
-
copyEvent
Description copied from class:JposStatusUpdateEvent
Creates copy of given event for a different property set. Needed for shareable devices only.- Overrides:
copyEvent
in classJposStatusUpdateEvent
- Parameters:
o
- Source (JposDevice) of the event- Returns:
- Copy of the event to be handled by the given source.
-
setLateProperties
public void setLateProperties()Description copied from class:JposStatusUpdateEvent
Sets those properties that shall be set immediately before the event will be fired to the application. Should be used for properties with a relationship to the event. For pure status values, use method setStatusProperties instead.- Overrides:
setLateProperties
in classJposStatusUpdateEvent
-
checkStatusCorresponds
public boolean checkStatusCorresponds()Description copied from class:JposStatusUpdateEvent
Checks if the device state corresponds to the event status.- Overrides:
checkStatusCorresponds
in classJposStatusUpdateEvent
- Returns:
- true if device state corresponds to event state, false otherwise.
-
setAndCheckStatusProperties
public boolean setAndCheckStatusProperties()Description copied from class:JposStatusUpdateEvent
Sets status properties and checks whether status properties have been changed. If so, logs status change.- Overrides:
setAndCheckStatusProperties
in classJposStatusUpdateEvent
- Returns:
- true if state might have been really changed, false otherwise.
-