Package jadex.bridge

Class Cause


  • public class Cause
    extends java.lang.Object
    A cause is used to link events. It has a source and a target id that can be used to chain the events. Events roll the causes by using the target as source and creating a new target etc.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String origin
      The id.
      protected java.lang.String sourceid
      The source id.
      protected java.lang.String targetid
      The target id.
    • Constructor Summary

      Constructors 
      Constructor Description
      Cause()
      Create a new cause.
      Cause​(Cause other)
      Create a new cause as clone of the other.
      Cause​(Cause old, java.lang.String targetname)
      Create a new cause rolling old one.
      Cause​(java.lang.String sourcename, java.lang.String targetname)
      Create a new cause.
      Cause​(java.lang.String sourceid, java.lang.String targetid, java.lang.String sourcename, java.lang.String targetname)
      Create a new cause.
      Cause​(java.lang.String chainid, java.lang.String sourceid, java.lang.String targetid, java.lang.String sourcename, java.lang.String targetname)
      Create a new cause.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Cause createNext()
      Create the next cause.
      java.lang.String createUniqueId()
      Create a unique id.
      protected java.lang.String createUniqueId​(int len)
      Create a unique id.
      boolean equals​(java.lang.Object obj)
      Test for equality.
      java.lang.String getOrigin()
      Get the chain id.
      java.lang.String getSourceId()
      Get the sourceId.
      java.lang.String getTargetId()
      Get the targetId.
      int hashCode()
      Get the hash code.
      void setOrigin​(java.lang.String callid)
      Set the chain id.
      void setSourceId​(java.lang.String sourceid)
      Set the sourceId.
      void setTargetId​(java.lang.String targetid)
      Set the targetId.
      java.lang.String toString()
      Get the string representation.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • origin

        protected java.lang.String origin
        The id. Identical for all events of the same origin.
      • sourceid

        protected java.lang.String sourceid
        The source id.
      • targetid

        protected java.lang.String targetid
        The target id.
    • Constructor Detail

      • Cause

        public Cause()
        Create a new cause.
      • Cause

        public Cause​(java.lang.String sourcename,
                     java.lang.String targetname)
        Create a new cause.
      • Cause

        public Cause​(java.lang.String sourceid,
                     java.lang.String targetid,
                     java.lang.String sourcename,
                     java.lang.String targetname)
        Create a new cause.
      • Cause

        public Cause​(java.lang.String chainid,
                     java.lang.String sourceid,
                     java.lang.String targetid,
                     java.lang.String sourcename,
                     java.lang.String targetname)
        Create a new cause.
      • Cause

        public Cause​(Cause old,
                     java.lang.String targetname)
        Create a new cause rolling old one.
      • Cause

        public Cause​(Cause other)
        Create a new cause as clone of the other.
    • Method Detail

      • createNext

        public Cause createNext()
        Create the next cause.
        Parameters:
        targetname - The new target name.
      • createUniqueId

        public java.lang.String createUniqueId()
        Create a unique id.
      • createUniqueId

        protected java.lang.String createUniqueId​(int len)
        Create a unique id.
      • getOrigin

        public java.lang.String getOrigin()
        Get the chain id.
        Returns:
        The chain id.
      • setOrigin

        public void setOrigin​(java.lang.String callid)
        Set the chain id.
        Parameters:
        origin - The chainid to set.
      • getSourceId

        public java.lang.String getSourceId()
        Get the sourceId.
        Returns:
        The sourceId.
      • setSourceId

        public void setSourceId​(java.lang.String sourceid)
        Set the sourceId.
        Parameters:
        sourceid - The sourceId to set.
      • getTargetId

        public java.lang.String getTargetId()
        Get the targetId.
        Returns:
        The targetId.
      • setTargetId

        public void setTargetId​(java.lang.String targetid)
        Set the targetId.
        Parameters:
        targetid - The targetId to set.
      • toString

        public java.lang.String toString()
        Get the string representation.
        Overrides:
        toString in class java.lang.Object
      • hashCode

        public int hashCode()
        Get the hash code.
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Test for equality.
        Overrides:
        equals in class java.lang.Object