com.e1.mxdublin.evlist
Class EvSender

java.lang.Object
  extended by com.e1.mxdublin.core.SeqEvent
      extended by com.e1.mxdublin.evlist.EvAbstractItem
          extended by com.e1.mxdublin.evlist.EvSender
All Implemented Interfaces:
Cloneable, Comparable<EvAbstractItem>, Runnable
Direct Known Subclasses:
EvNote, EvTrg, EvTrgNote

public class EvSender
extends EvAbstractItem

Event that will send atoms to the specified receiver.

Event arguments

<atom value>: event content

The ! sign can be used to specify a bang

Properties

  • sender : the sender name to use to send the event
  • Example usage:

     evlist.add(1, new EvSender("! @sender courge")); // sends a bang
     evlist.add("2:5", new EvSender("36 @sender note"));
     


    Field Summary
     Atom[] arg
               
    protected static Atom BANG
               
     Sender sender
               
     
    Fields inherited from class com.e1.mxdublin.evlist.EvAbstractItem
    gp, len_tm
     
    Fields inherited from class com.e1.mxdublin.core.SeqEvent
    mandatory
     
    Constructor Summary
    EvSender(String arg)
               
    EvSender(String arg, GroupProperties props)
               
     
    Method Summary
     void appendDefinedProperties(StringBuffer sb)
              Appends the string representation of the defined properties.
     Object clone()
              Clone the abstract event.
     String getValue()
              Returns event representation in string format.
     boolean isLike(EvAbstractItem comp)
              Returns true if the content of this event is the same than event item 'comp'.
     void play()
              Sends the atom to currently assigned sender.
     boolean setProperty(String name, String value)
              Set property.
     void setValue(String v)
              Sets event definition using a string.
     
    Methods inherited from class com.e1.mxdublin.evlist.EvAbstractItem
    bang, cancel, compareTo, equals, fromXML, getGroupProperties, getTm, isSameGroupProperties, loadElement, repr, run, setProperties, setTm, setTm, stop, toString, toXML
     
    Methods inherited from class com.e1.mxdublin.core.SeqEvent
    eventDebug
     
    Methods inherited from class java.lang.Object
    finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
     

    Field Detail

    arg

    public Atom[] arg

    sender

    public Sender sender

    BANG

    protected static Atom BANG
    Constructor Detail

    EvSender

    public EvSender(String arg)

    EvSender

    public EvSender(String arg,
                    GroupProperties props)
    Method Detail

    play

    public void play()
    Sends the atom to currently assigned sender.

    Specified by:
    play in class EvAbstractItem

    setValue

    public void setValue(String v)
    Description copied from class: EvAbstractItem
    Sets event definition using a string.

    Overrides:
    setValue in class EvAbstractItem
    Parameters:
    v - String value

    getValue

    public String getValue()
    Description copied from class: EvAbstractItem
    Returns event representation in string format.

    Overrides:
    getValue in class EvAbstractItem
    Returns:
    the event represnetation in string format

    appendDefinedProperties

    public void appendDefinedProperties(StringBuffer sb)
    Description copied from class: EvAbstractItem
    Appends the string representation of the defined properties. Properties thats are also in the group-properties and have the same values should not be appended.

    Overrides:
    appendDefinedProperties in class EvAbstractItem
    Parameters:
    sb - the StringBuffer to append the properties values

    setProperty

    public boolean setProperty(String name,
                               String value)
    Description copied from class: EvAbstractItem
    Set property. If the property is not supported by the event, the event must return false.

    Overrides:
    setProperty in class EvAbstractItem
    Parameters:
    name - property name
    value - property value
    Returns:
    true if the property is supported

    isLike

    public boolean isLike(EvAbstractItem comp)
    Description copied from class: EvAbstractItem
    Returns true if the content of this event is the same than event item 'comp'. Unlike equals(Object o), the event time is not compared.

    Specified by:
    isLike in class EvAbstractItem
    Parameters:
    comp - the event item to compare
    Returns:
    returns true is the content is the same

    clone

    public Object clone()
    Description copied from class: EvAbstractItem
    Clone the abstract event. Special care should be taken since if the event is in a list, the owner of the cloned object will be set to null.

    Overrides:
    clone in class EvAbstractItem
    See Also:
    Object.clone()