Class DataSource

java.lang.Object
COM.TIBCO.hawk.config.rbengine.rulebase.DataSource

public class DataSource extends Object
This class is used to represent a rule's data source. It contains all the information required to create a microagent subscription.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static String
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    DataSource(COM.TIBCO.hawk.util.xml.XmlElementNode xmlNode)
    Constructs a DataSource
     
    DataSource(String microAgentName, COM.TIBCO.hawk.talon.MethodSubscription ms)
    Constructs a DataSource object.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a copy of this object
    boolean
    Compare two data sources.
    protected void
    fromXML(COM.TIBCO.hawk.util.xml.XmlElementNode node)
    Read XML representation of the data source from the XML node.
    protected String
    Returns the default name for this ClearAction element.
    Returns the display name for this data source
    COM.TIBCO.hawk.talon.MethodSubscription
    Returns string representation of this data source.
    Returns the microagent name
    boolean
     
    protected COM.TIBCO.hawk.talon.MethodSubscription
    readXMLtoMas(COM.TIBCO.hawk.util.xml.XmlElementNode node)
    Read the method subscription in text format to build a Java object.
    void
    Sets the display name for this data source
    void
    setMethodSubscription(COM.TIBCO.hawk.talon.MethodSubscription ms)
    Sets the methodSubscription
    void
    Sets the microagent name
    Returns string representation of this object.
    protected void
    toXML(COM.TIBCO.hawk.util.xml.XmlWriter out)
    Write XML representation of the data source to the XML writer.

    Methods inherited from class java.lang.Object

    finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • CNAME

      public static String CNAME
  • Constructor Details

    • DataSource

      public DataSource(String microAgentName, COM.TIBCO.hawk.talon.MethodSubscription ms)
      Constructs a DataSource object.
      Parameters:
      microAgentName - the name identifying the microagent providing the rule's data
      ms - the MethodSubcription which will be used to provide the rule's data
      Throws:
      IllegalArgumentException - if either argument is null
    • DataSource

      protected DataSource(COM.TIBCO.hawk.util.xml.XmlElementNode xmlNode) throws RulebaseException
      Constructs a DataSource
      Parameters:
      xmlNode - XML node that contain the DataSource
      Throws:
      RulebaseException
      See Also:
      • XmlElementNode
  • Method Details

    • setDisplayName

      public void setDisplayName(String name)
      Sets the display name for this data source
    • getDisplayName

      public String getDisplayName()
      Returns the display name for this data source
    • setMicroAgentName

      public void setMicroAgentName(String name)
      Sets the microagent name
      Parameters:
      name - the microagent name, may not be null
      Throws:
      IllegalArgumentException - if name is null
    • getMicroAgentName

      public String getMicroAgentName()
      Returns the microagent name
    • isConverted

      public boolean isConverted()
    • setMethodSubscription

      public void setMethodSubscription(COM.TIBCO.hawk.talon.MethodSubscription ms)
      Sets the methodSubscription
      Parameters:
      name - the methodSubscription for this data source, may not be null
      Throws:
      IllegalArgumentException - if name is null
    • getMethodSubscription

      public COM.TIBCO.hawk.talon.MethodSubscription getMethodSubscription()
      Returns string representation of this data source.
    • toString

      public String toString()
      Returns string representation of this object.
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object obj)
      Compare two data sources. The result is true if the argument is not null and is an DataSource object has the same microagent and method invocation.
      Overrides:
      equals in class Object
      Parameters:
      obj - the object to compare with
      Returns:
      true if the objects are the same; false otherwise
    • clone

      public Object clone()
      Returns a copy of this object
      Overrides:
      clone in class Object
    • getDefaultName

      protected String getDefaultName()
      Returns the default name for this ClearAction element. This is a generated name so that if the name of this ClearAction is not given, this method will provide one.
    • toXML

      protected void toXML(COM.TIBCO.hawk.util.xml.XmlWriter out) throws IOException, RulebaseException
      Write XML representation of the data source to the XML writer.
      Parameters:
      out - the XML writer where the output will be written.
      Throws:
      IOException
      RulebaseException
      See Also:
      • XmlWriter
    • fromXML

      protected void fromXML(COM.TIBCO.hawk.util.xml.XmlElementNode node) throws RulebaseException
      Read XML representation of the data source from the XML node.
      Parameters:
      node - the XML node containing the data source.
      Throws:
      RulebaseException
      See Also:
      • XmlElementNode
    • readXMLtoMas

      protected COM.TIBCO.hawk.talon.MethodSubscription readXMLtoMas(COM.TIBCO.hawk.util.xml.XmlElementNode node) throws COM.TIBCO.hawk.talon.MicroAgentException
      Read the method subscription in text format to build a Java object. For 3.0 compatibility.
      Throws:
      COM.TIBCO.hawk.talon.MicroAgentException