Package jadex.bdiv3.examples.alarmclock
Class AlarmclockAgent
- java.lang.Object
-
- jadex.bdiv3.examples.alarmclock.AlarmclockAgent
-
public class AlarmclockAgent extends java.lang.ObjectAlarm clock that notifies on alarm.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAlarmclockAgent.AlarmGoalCheck alarm time and trigger notification if necessary.static classAlarmclockAgent.NotifyGoalNotify about an alarmstatic classAlarmclockAgent.PlaySongGoalPlay a song
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Set<Alarm>alarmsThe alarms that have been set.protected ClockFrameguiThe gui.protected SettingssettingsThe loaded settings.protected java.lang.StringsettingsfileThe filename of the alarm clock settings.
-
Constructor Summary
Constructors Constructor Description AlarmclockAgent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAlarm(Alarm alarm)Add an alarm.IFuture<java.lang.Void>body(IInternalAccess agent)Start the agentAlarm[]getAlarms()Get the alarmsClockFramegetGui()Get the gui.SettingsgetSettings()Get the settings.voidremoveAlarm(Alarm alarm)Remove an alarm.voidsetSettings(Settings settings)Set the settings and update the alarms.
-
-
-
Field Detail
-
settingsfile
protected java.lang.String settingsfile
The filename of the alarm clock settings.
-
settings
protected Settings settings
The loaded settings.
-
gui
protected ClockFrame gui
The gui.
-
alarms
protected java.util.Set<Alarm> alarms
The alarms that have been set.
-
-
Method Detail
-
body
public IFuture<java.lang.Void> body(IInternalAccess agent)
Start the agent
-
getSettings
public Settings getSettings()
Get the settings.
-
setSettings
public void setSettings(Settings settings)
Set the settings and update the alarms.
-
getGui
public ClockFrame getGui()
Get the gui.
-
addAlarm
public void addAlarm(Alarm alarm)
Add an alarm.
-
removeAlarm
public void removeAlarm(Alarm alarm)
Remove an alarm.
-
getAlarms
public Alarm[] getAlarms()
Get the alarms
-
-