Class Beacon
- java.lang.Object
-
- edu.ubo.satellitebeacons.main.movable.Movable
-
- edu.ubo.satellitebeacons.main.movable.Beacon
-
- All Implemented Interfaces:
Emitter,PositionChangedEmitter
public class Beacon extends Movable
Simulate the beacon behavior.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classBeacon.MemoryMemory of the beacon.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfullCapacity()Method if the memory is full.Listener<DestinationReachEvent>getReachOldPositionListener()Return the old position listener.Listener<DestinationReachEvent>getReachSeaLevelListener()Return the reach sea level listener.voidmove()Move the movable according to its movement.voidonReachSeaLevel(DestinationReachEvent event)Reach sea level listener.-
Methods inherited from class edu.ubo.satellitebeacons.main.movable.Movable
addEventListener, emitPositionChanged, getMovement, getPosition, removeEventListener, setMovement, setPosition
-
-
-
-
Method Detail
-
move
public void move()
Description copied from class:MovableMove the movable according to its movement.
-
fullCapacity
public void fullCapacity()
Method if the memory is full. Stop to read sensors. Emit a FullCapacityEvent.
-
onReachSeaLevel
public void onReachSeaLevel(DestinationReachEvent event)
Reach sea level listener.- Parameters:
event-
-
getReachOldPositionListener
public Listener<DestinationReachEvent> getReachOldPositionListener()
Return the old position listener.- Returns:
- Reach old position listener.
-
getReachSeaLevelListener
public Listener<DestinationReachEvent> getReachSeaLevelListener()
Return the reach sea level listener.- Returns:
- Reach sea level listener.
-
-