Class MonitoringEvent
- java.lang.Object
-
- jadex.bridge.service.types.monitoring.MonitoringEvent
-
- All Implemented Interfaces:
IMonitoringEvent
public class MonitoringEvent extends java.lang.Object implements IMonitoringEvent
Default implementation for events.
-
-
Field Summary
Fields Modifier and Type Field Description protected longcreationtimeThe source creation time.protected IMonitoringService.PublishEventLevellevelThe event importance.protected java.util.Map<java.lang.String,java.lang.Object>propertiesThe service call properties.protected IComponentIdentifiersourceThe source.protected java.lang.StringsourcedescThe source description.protected longtimeThe timepoint.protected java.lang.StringtypeThe type.-
Fields inherited from interface jadex.bridge.service.types.monitoring.IMonitoringEvent
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, SOURCE_CATEGORY_PROPERTY, SOURCE_CATEGORY_SERVICE, TERMINATION_FILTER, TYPE_COMPONENT_CREATED, TYPE_COMPONENT_DISPOSED, TYPE_PROPERTY_ADDED, TYPE_PROPERTY_REMOVED, TYPE_SERVICECALL_END, TYPE_SERVICECALL_START, TYPE_SUBSCRIPTION_START
-
-
Constructor Summary
Constructors Constructor Description MonitoringEvent()Create a new monitoring event.MonitoringEvent(IComponentIdentifier source, long crtime, java.lang.String type, long time, IMonitoringService.PublishEventLevel importance)Create a new monitoring event.MonitoringEvent(IComponentIdentifier source, long crtime, java.lang.String sourcedesc, java.lang.String type, long time, IMonitoringService.PublishEventLevel importance)Create a new monitoring event.MonitoringEvent(IComponentIdentifier source, long crtime, java.lang.String sourcdesc, java.lang.String type, long time, IMonitoringService.PublishEventLevel level, java.util.Map<java.lang.String,java.lang.Object> props)Create a new monitoring event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IMonitoringService.PublishEventLevelgetLevel()Get the event importance level.java.util.Map<java.lang.String,java.lang.Object>getProperties()Get a property.java.lang.ObjectgetProperty(java.lang.String name)Get a property.longgetSourceCreationTime()Get the source creation time, i.e.java.lang.StringgetSourceDescription()Get the source description, e.g.IComponentIdentifiergetSourceIdentifier()Get the caller.longgetTime()Get the time.java.lang.StringgetType()Get the type.voidsetCreationTime(long creationtime)Set the creation time.voidsetLevel(IMonitoringService.PublishEventLevel importance)Set the importance.voidsetProperties(java.util.Map<java.lang.String,java.lang.Object> properties)Set the properties.voidsetProperty(java.lang.String name, java.lang.Object val)Set a property.voidsetSourceDescription(java.lang.String sourcedesc)Set the source description.voidsetSourceIdentifier(IComponentIdentifier source)Set the source.voidsetTime(long time)Set the time.voidsetType(java.lang.String type)Set the type.java.lang.StringtoString()Get the string representation.
-
-
-
Field Detail
-
source
protected IComponentIdentifier source
The source.
-
sourcedesc
protected java.lang.String sourcedesc
The source description.
-
creationtime
protected long creationtime
The source creation time.
-
type
protected java.lang.String type
The type.
-
time
protected long time
The timepoint.
-
level
protected IMonitoringService.PublishEventLevel level
The event importance.
-
properties
protected java.util.Map<java.lang.String,java.lang.Object> properties
The service call properties.
-
-
Constructor Detail
-
MonitoringEvent
public MonitoringEvent()
Create a new monitoring event.
-
MonitoringEvent
public MonitoringEvent(IComponentIdentifier source, long crtime, java.lang.String type, long time, IMonitoringService.PublishEventLevel importance)
Create a new monitoring event.
-
MonitoringEvent
public MonitoringEvent(IComponentIdentifier source, long crtime, java.lang.String sourcedesc, java.lang.String type, long time, IMonitoringService.PublishEventLevel importance)
Create a new monitoring event.
-
MonitoringEvent
public MonitoringEvent(IComponentIdentifier source, long crtime, java.lang.String sourcdesc, java.lang.String type, long time, IMonitoringService.PublishEventLevel level, java.util.Map<java.lang.String,java.lang.Object> props)
Create a new monitoring event.
-
-
Method Detail
-
getSourceIdentifier
public IComponentIdentifier getSourceIdentifier()
Get the caller.- Specified by:
getSourceIdentifierin interfaceIMonitoringEvent- Returns:
- The caller.
-
setSourceIdentifier
public void setSourceIdentifier(IComponentIdentifier source)
Set the source.- Parameters:
source- The source to set.
-
getSourceDescription
public java.lang.String getSourceDescription()
Get the source description, e.g. if it is a service.- Specified by:
getSourceDescriptionin interfaceIMonitoringEvent- Returns:
- The source description.
-
setSourceDescription
public void setSourceDescription(java.lang.String sourcedesc)
Set the source description.
-
getSourceCreationTime
public long getSourceCreationTime()
Get the source creation time, i.e. the time when the component was created.- Specified by:
getSourceCreationTimein interfaceIMonitoringEvent- Returns:
- The creation time.
-
setCreationTime
public void setCreationTime(long creationtime)
Set the creation time.- Parameters:
creation- time The creation time to set.
-
getType
public java.lang.String getType()
Get the type.- Specified by:
getTypein interfaceIMonitoringEvent- Returns:
- The type.
-
setType
public void setType(java.lang.String type)
Set the type.- Parameters:
type- The type to set.
-
getTime
public long getTime()
Get the time.- Specified by:
getTimein interfaceIMonitoringEvent- Returns:
- The time.
-
setTime
public void setTime(long time)
Set the time.- Parameters:
time- The time to set.
-
getProperty
public java.lang.Object getProperty(java.lang.String name)
Get a property.- Specified by:
getPropertyin interfaceIMonitoringEvent- Parameters:
name- The property name.- Returns:
- The property.
-
setProperty
public void setProperty(java.lang.String name, java.lang.Object val)Set a property.- Parameters:
name- The property name.val- The property value.
-
getProperties
public java.util.Map<java.lang.String,java.lang.Object> getProperties()
Get a property.- Specified by:
getPropertiesin interfaceIMonitoringEvent- Parameters:
name- The property name.- Returns:
- The property.
-
setProperties
public void setProperties(java.util.Map<java.lang.String,java.lang.Object> properties)
Set the properties.- Parameters:
properties- The properties to set.
-
getLevel
public IMonitoringService.PublishEventLevel getLevel()
Get the event importance level.- Specified by:
getLevelin interfaceIMonitoringEvent
-
setLevel
public void setLevel(IMonitoringService.PublishEventLevel importance)
Set the importance.
-
toString
public java.lang.String toString()
Get the string representation.- Overrides:
toStringin classjava.lang.Object
-
-