Package jadex.bridge
Class Cause
- java.lang.Object
-
- jadex.bridge.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.
-
-
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.
-
-
-
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 classjava.lang.Object
-
hashCode
public int hashCode()
Get the hash code.- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
Test for equality.- Overrides:
equals
in classjava.lang.Object
-
-