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 long
creationtime
The source creation time.protected IMonitoringService.PublishEventLevel
level
The event importance.protected java.util.Map<java.lang.String,java.lang.Object>
properties
The service call properties.protected IComponentIdentifier
source
The source.protected java.lang.String
sourcedesc
The source description.protected long
time
The timepoint.protected java.lang.String
type
The 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.PublishEventLevel
getLevel()
Get the event importance level.java.util.Map<java.lang.String,java.lang.Object>
getProperties()
Get a property.java.lang.Object
getProperty(java.lang.String name)
Get a property.long
getSourceCreationTime()
Get the source creation time, i.e.java.lang.String
getSourceDescription()
Get the source description, e.g.IComponentIdentifier
getSourceIdentifier()
Get the caller.long
getTime()
Get the time.java.lang.String
getType()
Get the type.void
setCreationTime(long creationtime)
Set the creation time.void
setLevel(IMonitoringService.PublishEventLevel importance)
Set the importance.void
setProperties(java.util.Map<java.lang.String,java.lang.Object> properties)
Set the properties.void
setProperty(java.lang.String name, java.lang.Object val)
Set a property.void
setSourceDescription(java.lang.String sourcedesc)
Set the source description.void
setSourceIdentifier(IComponentIdentifier source)
Set the source.void
setTime(long time)
Set the time.void
setType(java.lang.String type)
Set the type.java.lang.String
toString()
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:
getSourceIdentifier
in 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:
getSourceDescription
in 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:
getSourceCreationTime
in 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:
getType
in 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:
getTime
in 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:
getProperty
in 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:
getProperties
in 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:
getLevel
in interfaceIMonitoringEvent
-
setLevel
public void setLevel(IMonitoringService.PublishEventLevel importance)
Set the importance.
-
toString
public java.lang.String toString()
Get the string representation.- Overrides:
toString
in classjava.lang.Object
-
-