com.monad.homerun.action
Class EventBinding

java.lang.Object
  extended by com.monad.homerun.action.Binding
      extended by com.monad.homerun.action.EventBinding
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable

public class EventBinding
extends Binding
implements java.lang.Comparable

EventBinding represents an association between an action rule and an 'event', e.g. model transition or device emitter event.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.monad.homerun.action.Binding
RUN_MODE, RUN_MODE_STR, START_MODE, START_MODE_STR, STOP_MODE, STOP_MODE_STR
 
Constructor Summary
EventBinding()
           
EventBinding(EventBinding binding)
           
EventBinding(java.lang.String domain, java.lang.String objectName, java.lang.String sourceType, java.lang.String sourceName, java.lang.String event, short offset, int mode, java.lang.String actionName, java.lang.String actionCategory)
           
 
Method Summary
 int compareTo(java.lang.Object obj)
           
 java.lang.String getDomain()
          Returns the domain of the object whose event is bound
 java.lang.String getEvent()
          Returns the name of the event
 java.lang.String getObjectName()
          Returns the object whose event is bound
 short getOffset()
          Returns the time offset - i.e.
 java.lang.String getSourceName()
          Returns the name of the event's emitter
 java.lang.String getSourceType()
          Returns the type of the emitter
 boolean matches(Event evt)
           
 void setDomain(java.lang.String domain)
          Sets the domain of the bound object
 void setEvent(java.lang.String name)
           
 void setObjectName(java.lang.String objectName)
          Assigns the object whose event is bound
 void setSourceName(java.lang.String name)
           
 void setSourceType(java.lang.String type)
           
 
Methods inherited from class com.monad.homerun.action.Binding
getActionCategory, getActionMode, getActionName, getMode, getModeIconName, getModes, getNote, getProperties, getProperty, modeFor, setNote, setProperties, setProperty
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventBinding

public EventBinding()

EventBinding

public EventBinding(java.lang.String domain,
                    java.lang.String objectName,
                    java.lang.String sourceType,
                    java.lang.String sourceName,
                    java.lang.String event,
                    short offset,
                    int mode,
                    java.lang.String actionName,
                    java.lang.String actionCategory)

EventBinding

public EventBinding(EventBinding binding)
Method Detail

getDomain

public java.lang.String getDomain()
Returns the domain of the object whose event is bound

Returns:
domain - the bound object's domain

setDomain

public void setDomain(java.lang.String domain)
Sets the domain of the bound object

Parameters:
domain - - the bound object's domain

getObjectName

public java.lang.String getObjectName()
Returns the object whose event is bound

Returns:
objectName - the bound object name

setObjectName

public void setObjectName(java.lang.String objectName)
Assigns the object whose event is bound

Parameters:
objectName - - the bound object name

getSourceType

public java.lang.String getSourceType()
Returns the type of the emitter

Returns:
the type of the emitter

setSourceType

public void setSourceType(java.lang.String type)

getSourceName

public java.lang.String getSourceName()
Returns the name of the event's emitter

Returns:
sourceName the name of the emitter source

setSourceName

public void setSourceName(java.lang.String name)

getEvent

public java.lang.String getEvent()
Returns the name of the event

Returns:
event the event name

setEvent

public void setEvent(java.lang.String name)

getOffset

public short getOffset()
Returns the time offset - i.e. seconds to delay - before event is processed

Returns:
offset the event delay in seconds

compareTo

public int compareTo(java.lang.Object obj)
Specified by:
compareTo in interface java.lang.Comparable

matches

public boolean matches(Event evt)


Copyright © 2006-2009 Richard Rodgers. All Rights Reserved.