public class ComponentChangeEvent extends Object implements IComponentChangeEvent
EVENT_TYPE_BULK, EVENT_TYPE_CREATION, EVENT_TYPE_DISPOSAL, EVENT_TYPE_MODIFICATION, EVENT_TYPE_OCCURRENCE, SOURCE_CATEGORY_ACTIVITY, SOURCE_CATEGORY_COMPONENT, SOURCE_CATEGORY_EXECUTION, SOURCE_CATEGORY_FACT, SOURCE_CATEGORY_GOAL, SOURCE_CATEGORY_IEVENT, SOURCE_CATEGORY_MESSAGE, SOURCE_CATEGORY_PLAN| Constructor and Description |
|---|
ComponentChangeEvent()
Create a new event.
|
ComponentChangeEvent(String eventtype,
String sourcecategory,
String sourcetype,
String sourcename,
IComponentIdentifier cid,
long componentcreationtime,
Object details)
Create a new event.
|
ComponentChangeEvent(String eventtype,
String sourcecategory,
String sourcetype,
String sourcename,
IComponentIdentifier cid,
long componentcreationtime,
String reason,
Object details,
long time)
Create a new event.
|
| Modifier and Type | Method and Description |
|---|---|
static IFuture<Void> |
dispatchComponentChangeEvent(IComponentChangeEvent event,
Collection<IComponentListener> componentlisteners)
Dispatches a component change event.
|
static IFuture<Void> |
dispatchTerminatedEvent(IComponentIdentifier cid,
long creationtime,
IModelInfo model,
Collection<IComponentListener> componentlisteners,
IClockService clock)
Dispatch a "component terminated" event.
|
static IFuture<Void> |
dispatchTerminatingEvent(IComponentAdapter adapter,
long creationtime,
IModelInfo model,
IServiceProvider provider,
Collection<IComponentListener> componentlisteners)
Dispatch a "component terminating" event.
|
IComponentChangeEvent[] |
getBulkEvents()
Get the bulk events.
|
IComponentIdentifier |
getComponent()
Returns the component that generated the event.
|
long |
getComponentCreationTime()
Returns creation time of the component that generated the event.
|
Object |
getDetails()
Get the details.
|
String |
getEventType()
Returns the type of the event.
|
String |
getParent()
Returns the parent of the source that generated the event, if any.
|
String |
getReason()
Returns a reason why the event occured.
|
String |
getSourceCategory()
Returns the category of the source that caused the event.
|
String |
getSourceName()
Returns the name of the source that caused the event.
|
String |
getSourceType()
Returns the type of the source that caused the event.
|
long |
getTime()
Returns the time when the event occured.
|
static IFuture<Long> |
getTimeStamp(IServiceProvider provider)
Retrieves a timestamp from the clock service which can be used in events.
|
void |
setComponent(IComponentIdentifier id)
Sets the component that generated the event.
|
void |
setComponentCreationTime(long creationtime)
Sets the creation time of the component that generated the event.
|
void |
setDetails(Object details)
Set the details.
|
void |
setEventType(String type)
Sets the type of the event.
|
void |
setParent(String id)
Sets the parent of the source that generated the event, if any.
|
void |
setReason(String reason)
Sets a reason why the event occured.
|
void |
setSourceCategory(String category)
Sets the category of the source that caused the event.
|
void |
setSourceName(String name)
Sets the name of the source that caused the event.
|
void |
setSourceType(String type)
Sets the type of the source that caused the event.
|
void |
setTime(long time)
Sets the time when the event occured.
|
String |
toString()
Get the string representation.
|
public ComponentChangeEvent()
public ComponentChangeEvent(String eventtype, String sourcecategory, String sourcetype, String sourcename, IComponentIdentifier cid, long componentcreationtime, Object details)
public String getEventType()
getEventType in interface IComponentChangeEventpublic long getTime()
getTime in interface IComponentChangeEventpublic String getSourceName()
getSourceName in interface IComponentChangeEventpublic String getSourceType()
getSourceType in interface IComponentChangeEventpublic String getSourceCategory()
getSourceCategory in interface IComponentChangeEventpublic IComponentIdentifier getComponent()
getComponent in interface IComponentChangeEventpublic long getComponentCreationTime()
getComponentCreationTime in interface IComponentChangeEventpublic String getParent()
getParent in interface IComponentChangeEventpublic String getReason()
getReason in interface IComponentChangeEventpublic Object getDetails()
getDetails in interface IComponentChangeEventpublic void setEventType(String type)
type - The type of the event.public void setTime(long time)
time - Time of event.public void setSourceName(String name)
name - Name of the source.public void setSourceType(String type)
type - Type of the source.public void setSourceCategory(String category)
category - Category of the source.public void setComponent(IComponentIdentifier id)
id - Component ID.public void setComponentCreationTime(long creationtime)
creationtime - The creation time.public void setParent(String id)
id - Parent ID.public void setReason(String reason)
reason - Reason why the event occured, may be null.public void setDetails(Object details)
details - The details to set.public IComponentChangeEvent[] getBulkEvents()
getBulkEvents in interface IComponentChangeEventpublic String toString()
public static final IFuture<Long> getTimeStamp(IServiceProvider provider)
provider - Service provider of the component.public static final IFuture<Void> dispatchComponentChangeEvent(IComponentChangeEvent event, Collection<IComponentListener> componentlisteners)
event - The event.componentlisteners - Event listeners.finished - Future, called when the event has been dispatched.public static final IFuture<Void> dispatchTerminatedEvent(IComponentIdentifier cid, long creationtime, IModelInfo model, Collection<IComponentListener> componentlisteners, IClockService clock)
adapter - Component adapter.creationtime - Creation time of the component.model - Component model.provider - Component service provider.componentlisteners - Listeners of the component.finished - Future, called when the event has been dispatched.public static final IFuture<Void> dispatchTerminatingEvent(IComponentAdapter adapter, long creationtime, IModelInfo model, IServiceProvider provider, Collection<IComponentListener> componentlisteners)
adapter - Component adapter.creationtime - Creation time of the component.model - Component model.provider - Component service provider.componentlisteners - Listeners of the component.finished - Future, called when the event has been dispatched.Copyright © 2012. All Rights Reserved.