org.wcb.autohome.implementations
Class X10MonitorEvent

java.lang.Object
  extended byorg.wcb.autohome.implementations.X10MonitorEvent
All Implemented Interfaces:
IX10MonitorEvent, java.io.Serializable

public class X10MonitorEvent
extends java.lang.Object
implements IX10MonitorEvent, java.io.Serializable

Copyright (C) 1999 Walter Bogaardt This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 Project: Alice X10 Home Automation Filename: $Id: X10MonitorEvent.java,v 1.6 2004/02/28 00:21:49 wbogaardt Exp $
Abstract: Used to display monitoring information on the monitor panel and run the displays the events table. $Log: X10MonitorEvent.java,v $ Revision 1.6 2004/02/28 00:21:49 wbogaardt fixed formating to be compliant with sun coding convention Revision 1.5 2004/01/19 22:35:37 wbogaardt added fixes to runing events and emails so they work and added a testing of a monitored event through the table popup on a right mouse click. Revision 1.4 2004/01/18 00:48:33 wbogaardt refactored out unnecessary code and now have a functional initial design of monitoring panel Revision 1.3 2004/01/17 07:21:17 wbogaardt added serialization to run events and allow monitoring of these events to the file system to reload later Revision 1.2 2004/01/17 06:21:55 wbogaardt added new Run event interfaces Revision 1.1 2004/01/16 22:59:05 wbogaardt new classes for the monitor panel

See Also:
Serialized Form

Constructor Summary
X10MonitorEvent()
          Default constructor that builds a default monitor on X10 device code of A1
X10MonitorEvent(IX10Module iMod, java.lang.String sDesc)
          Create a basic montitor event object passing in the X10 module being monitored and the description of the monitoring.
X10MonitorEvent(IX10MonitorEvent iNewO)
          Create the X10 monitor event using the interface
 
Method Summary
 java.lang.String getDescription()
          The description of the monitoring event
 java.lang.String getLocation()
          Returns the location name of the monitoring module
 IX10Module getMonitoringModule()
          Return the module that is being monitored by this this monitoring event.
 IRunEvent[] getRunEvent()
          The interface of a IRunEvent object.
 java.lang.String getStatus()
          The last status of a monitored event.
 java.util.Calendar getTimeDetected()
          The time that a monitored event last took place.
 void setDescription(java.lang.String sDesc)
          Allows the user to set a good description of the event they are monitoring.
 void setLocation(java.lang.String sLoc)
          Location information of the monitoring module
 void setMonitoringModule(IX10Module iModule)
          Set the module to be monitored to this monitoring object
 void setRunEvent(IRunEvent[] iRunEvent)
          THe monitored event might have an action such as run another program or do some other event.
 void setStatus(java.lang.String sStat)
          Sets the string information or status of an event to let the user know if a monitored light or appliance had been turned on the reflect a turn on message.
 void setTimeDetected(java.util.Calendar cal)
          This is usually set by a monitoring listener to set a time/date stamp of when a particular monitored event occured.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

X10MonitorEvent

public X10MonitorEvent()
Default constructor that builds a default monitor on X10 device code of A1


X10MonitorEvent

public X10MonitorEvent(IX10Module iMod,
                       java.lang.String sDesc)
Create a basic montitor event object passing in the X10 module being monitored and the description of the monitoring.

Parameters:
iMod - X10Module object to monitor
sDesc - brief description of why monitoring.

X10MonitorEvent

public X10MonitorEvent(IX10MonitorEvent iNewO)
Create the X10 monitor event using the interface

Parameters:
iNewO - The interface to create an object from.
Method Detail

setMonitoringModule

public void setMonitoringModule(IX10Module iModule)
Set the module to be monitored to this monitoring object

Specified by:
setMonitoringModule in interface IX10MonitorEvent
Parameters:
iModule - the x10 device to monitor events.

setDescription

public void setDescription(java.lang.String sDesc)
Allows the user to set a good description of the event they are monitoring.

Specified by:
setDescription in interface IX10MonitorEvent
Parameters:
sDesc - Description information.

setLocation

public void setLocation(java.lang.String sLoc)
Location information of the monitoring module

Specified by:
setLocation in interface IX10MonitorEvent
Parameters:
sLoc - User defined location name

setTimeDetected

public void setTimeDetected(java.util.Calendar cal)
This is usually set by a monitoring listener to set a time/date stamp of when a particular monitored event occured.

Specified by:
setTimeDetected in interface IX10MonitorEvent
Parameters:
cal - Stamp of date and time.

setStatus

public void setStatus(java.lang.String sStat)
Sets the string information or status of an event to let the user know if a monitored light or appliance had been turned on the reflect a turn on message.

Specified by:
setStatus in interface IX10MonitorEvent
Parameters:
sStat - message of event

setRunEvent

public void setRunEvent(IRunEvent[] iRunEvent)
THe monitored event might have an action such as run another program or do some other event. So this will use a IRunEvent interface.

Specified by:
setRunEvent in interface IX10MonitorEvent
Parameters:
iRunEvent - an array of events

getMonitoringModule

public IX10Module getMonitoringModule()
Return the module that is being monitored by this this monitoring event.

Specified by:
getMonitoringModule in interface IX10MonitorEvent
Returns:
the monitored IX10Module object

getDescription

public java.lang.String getDescription()
The description of the monitoring event

Specified by:
getDescription in interface IX10MonitorEvent
Returns:
user defined descripition of the event

getLocation

public java.lang.String getLocation()
Returns the location name of the monitoring module

Specified by:
getLocation in interface IX10MonitorEvent
Returns:
Location name.

getTimeDetected

public java.util.Calendar getTimeDetected()
The time that a monitored event last took place.

Specified by:
getTimeDetected in interface IX10MonitorEvent
Returns:
the date and time of last event.

getStatus

public java.lang.String getStatus()
The last status of a monitored event.

Specified by:
getStatus in interface IX10MonitorEvent
Returns:
Status string

getRunEvent

public IRunEvent[] getRunEvent()
The interface of a IRunEvent object.

Specified by:
getRunEvent in interface IX10MonitorEvent
Returns:
IRunEvent object


Copyright © 1999-2004 Walter Bogaardt. All Rights Reserved.