public abstract class AbstractEvent
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
AbstractEvent(IId s,
AbstractTupleCentreOperation op,
TupleCentreId tc,
long t) |
AbstractEvent(IId s,
AbstractTupleCentreOperation op,
TupleCentreId tc,
long t,
java.util.Map<java.lang.String,java.lang.String> prop) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getEventProp(java.lang.String key) |
TupleCentreId |
getReactingTC() |
AbstractTupleCentreOperation |
getSimpleTCEvent() |
IId |
getSource()
Gets the executor of the operation which caused directly or indirectly
this event.
|
IId |
getTarget() |
long |
getTime() |
Tuple |
getTuple() |
abstract boolean |
isInput()
Tests if it is an input event
|
abstract boolean |
isInternal()
Tests if it is an internal event
|
abstract boolean |
isOutput()
Tests if it is an output event
|
void |
setReactingTC(TupleCentreId tc) |
void |
setSimpleTCEvent(AbstractTupleCentreOperation op) |
void |
setSource(IId s) |
void |
setTarget(IId t) |
java.lang.String |
toString() |
public AbstractEvent(IId s, AbstractTupleCentreOperation op, TupleCentreId tc, long t)
s
- the identifier of the source of the eventop
- the operation which caused the eventtc
- the identifier of the tuple centre target of the eventt
- the time at which the event was generatedpublic AbstractEvent(IId s, AbstractTupleCentreOperation op, TupleCentreId tc, long t, java.util.Map<java.lang.String,java.lang.String> prop)
s
- the identifier of the source of the eventop
- the operation which caused the eventtc
- the identifier of the tuple centre target of the eventt
- the time at which the event was generatedprop
- some properties relatde to the eventpublic java.lang.String getEventProp(java.lang.String key)
key
- the String representation of the key of the property to
retrievepublic TupleCentreId getReactingTC()
public AbstractTupleCentreOperation getSimpleTCEvent()
public IId getSource()
public IId getTarget()
public long getTime()
public Tuple getTuple()
public abstract boolean isInput()
public abstract boolean isInternal()
public abstract boolean isOutput()
public void setReactingTC(TupleCentreId tc)
tc
- the identifier of the tuple centre currently reacting to the
eventpublic void setSimpleTCEvent(AbstractTupleCentreOperation op)
op
- the operation which caused the eventpublic void setSource(IId s)
s
- the identifier of the source of the eventpublic void setTarget(IId t)
t
- the identifier of the target of the eventpublic java.lang.String toString()
toString
in class java.lang.Object