Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.hyades.logging.events
Class CommonBaseEventFactory

    java.lang.Object
      |
      +--org.eclipse.hyades.logging.events.CommonBaseEventFactory

All Implemented Interfaces:
  IEventFactory

public class CommonBaseEventFactory
extends java.lang.Object
implements IEventFactory

Factory to construct ICommonBaseEvent objects.

Since:
  1.0
Version:
  1.0.1

Field Summary

Fields inherited from interface org.eclipse.hyades.logging.events.IEventFactory
`CURRENT_TIME, UNSPECIFIED_ELAPSED_TIME, UNSPECIFIED_PRIORITY, UNSPECIFIED_REPEAT_COUNT, UNSPECIFIED_SEQUENCE_NUM, UNSPECIFIED_SEVERITY`

Constructor Summary
`protected` | `CommonBaseEventFactory()` Protected constructor for CommonBaseEventFactory.

Method Summary
`ICommonBaseEvent` | `createEmptyEvent()` Create an empty event.
`ICommonBaseEvent` | `createEvent(java.util.Date creationTime, IComponentIdentification sourceCompId)` Create a new event.
`ICommonBaseEvent` | `createEvent(java.util.Date creationTime, java.lang.String localInstId, java.lang.String globalInstId, short severity, short priority, IComponentIdentification reporterCompId, IComponentIdentification sourceCompId, ISituation situation, IContextDataElement[] contextData, IMsgDataElement msgData, java.lang.String msg, short repeatCount, long elapsedTime, IAssociatedEvent[] assocEvents, java.lang.String extensionName, IExtendedDataElement[] extendedData, long sequenceNum, java.lang.String[] otherData)` Create a new event.
`ICommonBaseEvent` | `createEvent(java.util.Date creationTime, java.lang.String localInstId, java.lang.String globalInstId, short severity, short priority, IComponentIdentification reporterCompId, IComponentIdentification sourceCompId, java.lang.String situationType, IContextDataElement[] contextData, IMsgDataElement msgData, java.lang.String msg, short repeatCount, long elapsedTime, IAssociatedEvent[] assocEvents, java.lang.String extensionName, IExtendedDataElement[] extendedData, long sequenceNum)` Deprecated. Use the createEvent(Date, String, String, short, short, IComponentIdentification, IComponentIdentification, ISituation, IContextDataElement[], IMsgDataElement, String, short, long, IAssociatedEvent, String, IExtendedDataElement, long,String[]) as of 1.0.1.
`ICommonBaseEvent` | `createEvent(long creationTime, IComponentIdentification sourceCompId)` Create a new event.
`ICommonBaseEvent` | `createEvent(long creationTime, java.lang.String localInstId, java.lang.String globalInstId, short severity, short priority, IComponentIdentification reporterCompId, IComponentIdentification sourceCompId, ISituation situation, IContextDataElement[] contextData, IMsgDataElement msgData, java.lang.String msg, short repeatCount, long elapsedTime, IAssociatedEvent[] assocEvents, java.lang.String extensionName, IExtendedDataElement[] extendedData, long sequenceNum, java.lang.String[] otherData)` Create a new event.
`ICommonBaseEvent` | `createEvent(long creationTime, java.lang.String localInstId, java.lang.String globalInstId, short severity, short priority, IComponentIdentification reporterCompId, IComponentIdentification sourceCompId, java.lang.String situationType, IContextDataElement[] contextData, IMsgDataElement msgData, java.lang.String msg, short repeatCount, long elapsedTime, IAssociatedEvent[] assocEvents, java.lang.String extensionName, IExtendedDataElement[] extendedData, long sequenceNum)` Deprecated. Use the createEvent(long, String, String, short, short, IComponentIdentification, IComponentIdentification, ISituation, IContextDataElement[], IMsgDataElement, String, short, long, IAssociatedEvent, String, IExtendedDataElement, long,String[]) as of 1.0.1.
`java.lang.String` | `getEventInterfaceClassName()` Get the fully-qualified interface name for the events created by this factory.
`ICommonBaseEvent` | `getEventSettings()` Get the optional event settings for this factory instance.
`java.lang.String` | `getName()` Get the name of this factory instance.
`void` | `init(java.lang.String name)` Initialization method.
`void` | `setEventSettings(ICommonBaseEvent settings)` Set the optional event settings for this factory instance.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CommonBaseEventFactory

    protected CommonBaseEventFactory()

  Protected constructor for CommonBaseEventFactory. Applications should use `FactoryHome` rather than directly creating event factories.

Method Detail

### getName

    public java.lang.String getName()

  Get the name of this factory instance. Instance names are immutable once set.

  Specified by:
    `getName` in interface `IEventFactory`
  Returns:
    The instance name.

### getEventInterfaceClassName

    public java.lang.String getEventInterfaceClassName()

  Get the fully-qualified interface name for the events created by this factory. This should either be: `org.eclipse.hyades.logging.events.ICommonBaseEvent` or an interface which extends it.

  Specified by:
    `getEventInterfaceClassName` in interface `IEventFactory`
  Returns:
    The interface name.

### getEventSettings

    public ICommonBaseEvent getEventSettings()

  Get the optional event settings for this factory instance. The values of this object (if any) will be used as defaults when creating new events.

  Specified by:
    `getEventSettings` in interface `IEventFactory`
  Returns:
    The current event settings, or `null` if no settings have been defined.

### setEventSettings

    public void setEventSettings(ICommonBaseEvent settings)

  Set the optional event settings for this factory instance. The values of this object (if any) will be used as defaults when creating new events.

  The settings object should be an event which was created by this factory's `createEmptyEvent()` method, then populated with values.

  Specified by:
    `setEventSettings` in interface `IEventFactory`

### createEvent

    public ICommonBaseEvent createEvent(java.util.Date creationTime,
                                        IComponentIdentification sourceCompId)

  Create a new event.

  Specified by:
    `createEvent` in interface `IEventFactory`
  Parameters:
    `creationTime` - The creation time for the event, or `null` to use the current system time.
    `sourceCompId` - The source component ID for the event, or `null` to copy the value from the event settings.

    If event settings are defined for this factory instance, they will be used to set any fields not specified above.

    NOTE: If the source component ID is not specified and is not found in the factory event settings, the event will not be created. Use `createEmptyEvent()` to create an event with no creation time or source component ID.

  Returns:
    The new event, or `null` if no value was found for the required source component ID.

    The new event will implement the interface reported by `getEventInterfaceClassName()`.

### createEvent

    public ICommonBaseEvent createEvent(long creationTime,
                                        IComponentIdentification sourceCompId)

  Create a new event.

  Specified by:
    `createEvent` in interface `IEventFactory`
  Parameters:
    `creationTime` - The creation time for the event, or `CURRENT_TIME` to use the current system time.
    `sourceCompId` - The source component ID for the event, or `null` to copy the value from the event settings.

    If event settings are defined for this factory instance, they will be used to set any fields not specified above.

    NOTE: If the source component ID is not specified and is not found in the factory event settings, the event will not be created. Use `createEmptyEvent()` to create an event with no creation time or source component ID.

  Returns:
    The new event, or `null` if no value was found for the required source component ID.

    The new event will implement the interface reported by `getEventInterfaceClassName()`.

### createEvent

    public ICommonBaseEvent createEvent(java.util.Date creationTime,
                                        java.lang.String localInstId,
                                        java.lang.String globalInstId,
                                        short severity,
                                        short priority,
                                        IComponentIdentification reporterCompId,
                                        IComponentIdentification sourceCompId,
                                        java.lang.String situationType,
                                        IContextDataElement[] contextData,
                                        IMsgDataElement msgData,
                                        java.lang.String msg,
                                        short repeatCount,
                                        long elapsedTime,
                                        IAssociatedEvent[] assocEvents,
                                        java.lang.String extensionName,
                                        IExtendedDataElement[] extendedData,
                                        long sequenceNum)

  Deprecated. Use the createEvent(Date, String, String, short, short, IComponentIdentification, IComponentIdentification, ISituation, IContextDataElement[], IMsgDataElement, String, short, long, IAssociatedEvent, String, IExtendedDataElement, long,String[]) as of 1.0.1.

  Create a new event.

  Specified by:
    `createEvent` in interface `IEventFactory`
  Parameters:
    `creationTime` - The creation time for the event, or `null` to use the current system time.
    `localInstId` - An optional local-instance identifier, or `null` to copy the value (if any) from the event settings.
    `globalInstId` - An optional global-instance identifier, or `null` to copy the value (if any) from the event settings.
    `severity` - The optional event severity, or `UNSPECIFIED_SEVERITY` to copy the value (if any) from the event settings.
    `priority` - The optional event priority, or `UNSPECIFIED_PRIORITY` to copy the value (if any) from the event settings
    `reporterCompId` - The optional reporter component ID for the event, or `null` to copy the value (if any) from event settings.
    `sourceCompId` - The required source component ID for the event, or `null` to copy the value from the event settings.

    NOTE: If the source component ID is not specified and is not found in the factory event settings, the event will not be created. Use `createEmptyEvent()` to create an event with no creation time or source component ID.

    `situationType` - An optional situation-type string, or `null` to copy the value (if any) from the event settings.
    `contextData` - An optional array of context data elements, or `null` to copy the value (if any) from the event settings.
    `msgData` - Optional data about the message, or `null` to copy the value (if any) from the event settings.
    `msg` - The optional message text, or `null` to copy the value (if any) from the event settings.
    `repeatCount` - The optional repeat count, or `UNSPECIFIED_REPEAT_COUNT` to copy the value (if any) from the event settings.
    `elapsedTime` - The optional time (in microseconds) for the number of events specified in the repeat count, or `UNSPECIFIED_ELAPSED_TIME` to copy the value (if any) from the event settings.
    `assocEvents` - An optional array of associated events, or `null` to copy the value (if any) from the event settings.
    `extensionName` - An optional extension name, or `null` to copy the value (if any) from the event settings.
    `extendedData` - An optional array of extended data elements, or `null` to copy the value (if any) from the event settings.
    `sequenceNum` - An optional sequence number for the event, or `UNSPECIFIED_SEQUENCE_NUM` to copy the value (if any) from the event settings.

    If event settings are defined for this factory instance, they will be used to set any fields not specified above.

  Returns:
    The new event, or `null` if no value was found for the required source component ID.

    The new event will implement the interface reported by `getEventInterfaceClassName()`.

### createEvent

    public ICommonBaseEvent createEvent(java.util.Date creationTime,
                                        java.lang.String localInstId,
                                        java.lang.String globalInstId,
                                        short severity,
                                        short priority,
                                        IComponentIdentification reporterCompId,
                                        IComponentIdentification sourceCompId,
                                        ISituation situation,
                                        IContextDataElement[] contextData,
                                        IMsgDataElement msgData,
                                        java.lang.String msg,
                                        short repeatCount,
                                        long elapsedTime,
                                        IAssociatedEvent[] assocEvents,
                                        java.lang.String extensionName,
                                        IExtendedDataElement[] extendedData,
                                        long sequenceNum,
                                        java.lang.String[] otherData)

  Create a new event.

  Specified by:
    `createEvent` in interface `IEventFactory`
  Parameters:
    `creationTime` - The creation time for the event, or `CURRENT_TIME` to use the current system time.
    `localInstId` - An optional local-instance identifier, or `null` to copy the value (if any) from the event settings.
    `globalInstId` - An optional global-instance identifier, or `null` to copy the value (if any) from the event settings.
    `severity` - The optional event severity, or `UNSPECIFIED_SEVERITY` to copy the value (if any) from the event settings.
    `priority` - The optional event priority, or `UNSPECIFIED_PRIORITY` to copy the value (if any) from the event settings
    `reporterCompId` - The optional reporter component ID for the event, or `null` to copy the value (if any) from event settings.
    `sourceCompId` - The required source component ID for the event, or `null` to copy the value from the event settings.

    NOTE: If the source component ID is not specified and is not found in the factory event settings, the event will not be created. Use `createEmptyEvent()` to create an event with no creation time or source component ID.

    `situation` - A required ISituation or `null` to copy the value from the event settings.
    `contextData` - An optional array of context data elements, or `null` to copy the value (if any) from the event settings.
    `msgData` - Optional data about the message, or `null` to copy the value (if any) from the event settings.
    `msg` - The optional message text, or `null` to copy the value (if any) from the event settings.
    `repeatCount` - The optional repeat count, or `UNSPECIFIED_REPEAT_COUNT` to copy the value (if any) from the event settings.
    `elapsedTime` - The optional time (in microseconds) for the number of events specified in the repeat count, or `UNSPECIFIED_ELAPSED_TIME` to copy the value (if any) from the event settings.
    `assocEvents` - An optional array of associated events,
    `extensionName` - An optional extension name, or `null` to copy the value (if any) from the event settings.
    `extendedData` - An optional array of extended data elements, or `null` to copy the value (if any) from the event settings.
    `sequenceNum` - An optional sequence number for the event, or `UNSPECIFIED_SEQUENCE_NUM` to copy the value (if any) from the event settings.
    `otherData` - An optional string array of other data or `null` to copy the value (if any) from the event settings.

    If event settings are defined for this factory instance, they will be used to set any fields not specified above.

  Returns:
    The new event, or `null` if no value was found for the required source component ID.

    The new event will implement the interface reported by `getEventInterfaceClassName()`.

  Since:
    1.0.1

### createEvent

    public ICommonBaseEvent createEvent(long creationTime,
                                        java.lang.String localInstId,
                                        java.lang.String globalInstId,
                                        short severity,
                                        short priority,
                                        IComponentIdentification reporterCompId,
                                        IComponentIdentification sourceCompId,
                                        ISituation situation,
                                        IContextDataElement[] contextData,
                                        IMsgDataElement msgData,
                                        java.lang.String msg,
                                        short repeatCount,
                                        long elapsedTime,
                                        IAssociatedEvent[] assocEvents,
                                        java.lang.String extensionName,
                                        IExtendedDataElement[] extendedData,
                                        long sequenceNum,
                                        java.lang.String[] otherData)

  Create a new event.

  Specified by:
    `createEvent` in interface `IEventFactory`
  Parameters:
    `creationTime` - The creation time for the event, or `CURRENT_TIME` to use the current system time.
    `localInstId` - An optional local-instance identifier, or `null` to copy the value (if any) from the event settings.
    `globalInstId` - An optional global-instance identifier, or `null` to copy the value (if any) from the event settings.
    `severity` - The optional event severity, or `UNSPECIFIED_SEVERITY` to copy the value (if any) from the event settings.
    `priority` - The optional event priority, or `UNSPECIFIED_PRIORITY` to copy the value (if any) from the event settings
    `reporterCompId` - The optional reporter component ID for the event, or `null` to copy the value (if any) from event settings.
    `sourceCompId` - The required source component ID for the event, or `null` to copy the value from the event settings.

    NOTE: If the source component ID is not specified and is not found in the factory event settings, the event will not be created. Use `createEmptyEvent()` to create an event with no creation time or source component ID.

    `situation` - A required ISituation or `null` to copy the value from the event settings.
    `contextData` - An optional array of context data elements, or `null` to copy the value (if any) from the event settings.
    `msgData` - Optional data about the message, or `null` to copy the value (if any) from the event settings.
    `msg` - The optional message text, or `null` to copy the value (if any) from the event settings.
    `repeatCount` - The optional repeat count, or `UNSPECIFIED_REPEAT_COUNT` to copy the value (if any) from the event settings.
    `elapsedTime` - The optional time (in microseconds) for the number of events specified in the repeat count, or `UNSPECIFIED_ELAPSED_TIME` to copy the value (if any) from the event settings.
    `assocEvents` - An optional array of associated events,
    `extensionName` - An optional extension name, or `null` to copy the value (if any) from the event settings.
    `extendedData` - An optional array of extended data elements, or `null` to copy the value (if any) from the event settings.
    `sequenceNum` - An optional sequence number for the event, or `UNSPECIFIED_SEQUENCE_NUM` to copy the value (if any) from the event settings.
    `otherData` - An optional string array of other data or `null` to copy the value (if any) from the event settings.

    If event settings are defined for this factory instance, they will be used to set any fields not specified above.

  Returns:
    The new event, or `null` if no value was found for the required source component ID.

    The new event will implement the interface reported by `getEventInterfaceClassName()`.

  Since:
    1.0.1

### createEvent

    public ICommonBaseEvent createEvent(long creationTime,
                                        java.lang.String localInstId,
                                        java.lang.String globalInstId,
                                        short severity,
                                        short priority,
                                        IComponentIdentification reporterCompId,
                                        IComponentIdentification sourceCompId,
                                        java.lang.String situationType,
                                        IContextDataElement[] contextData,
                                        IMsgDataElement msgData,
                                        java.lang.String msg,
                                        short repeatCount,
                                        long elapsedTime,
                                        IAssociatedEvent[] assocEvents,
                                        java.lang.String extensionName,
                                        IExtendedDataElement[] extendedData,
                                        long sequenceNum)

  Deprecated. Use the createEvent(long, String, String, short, short, IComponentIdentification, IComponentIdentification, ISituation, IContextDataElement[], IMsgDataElement, String, short, long, IAssociatedEvent, String, IExtendedDataElement, long,String[]) as of 1.0.1.

  Create a new event.

  Specified by:
    `createEvent` in interface `IEventFactory`
  Parameters:
    `creationTime` - The creation time for the event, or `CURRENT_TIME` to use the current system time.
    `localInstId` - An optional local-instance identifier, or `null` to copy the value (if any) from the event settings.
    `globalInstId` - An optional global-instance identifier, or `null` to copy the value (if any) from the event settings.
    `severity` - The optional event severity, or `UNSPECIFIED_SEVERITY` to copy the value (if any) from the event settings.
    `priority` - The optional event priority, or `UNSPECIFIED_PRIORITY` to copy the value (if any) from the event settings
    `reporterCompId` - The optional reporter component ID for the event, or `null` to copy the value (if any) from event settings.
    `sourceCompId` - The required source component ID for the event, or `null` to copy the value from the event settings.

    NOTE: If the source component ID is not specified and is not found in the factory event settings, the event will not be created. Use `createEmptyEvent()` to create an event with no creation time or source component ID.

    `situationType` - An optional situation-type string, or `null` to copy the value (if any) from the event settings.
    `contextData` - An optional array of context data elements, or `null` to copy the value (if any) from the event settings.
    `msgData` - Optional data about the message, or `null` to copy the value (if any) from the event settings.
    `msg` - The optional message text, or `null` to copy the value (if any) from the event settings.
    `repeatCount` - The optional repeat count, or `UNSPECIFIED_REPEAT_COUNT` to copy the value (if any) from the event settings.
    `elapsedTime` - The optional time (in microseconds) for the number of events specified in the repeat count, or `UNSPECIFIED_ELAPSED_TIME` to copy the value (if any) from the event settings.
    `assocEvents` - An optional array of associated events, or `null` to copy the value (if any) from the event settings.
    `extensionName` - An optional extension name, or `null` to copy the value (if any) from the event settings.
    `extendedData` - An optional array of extended data elements, or `null` to copy the value (if any) from the event settings.
    `sequenceNum` - An optional sequence number for the event, or `UNSPECIFIED_SEQUENCE_NUM` to copy the value (if any) from the event settings.

    If event settings are defined for this factory instance, they will be used to set any fields not specified above.

  Returns:
    The new event, or `null` if no value was found for the required source component ID.

    The new event will implement the interface reported by `getEventInterfaceClassName()`.

### createEmptyEvent

    public ICommonBaseEvent createEmptyEvent()

  Create an empty event.

  No fields will be set for this event. Any event settings for this factory instance will be ignored.

  Specified by:
    `createEmptyEvent` in interface `IEventFactory`
  Returns:
    The empty new event.

    The new event will implement the interface reported by `getEventInterfaceClassName()`.

### init

    public void init(java.lang.String name)

  Initialization method. This should not be called by applications, and has no effect after this factory instance is initialized.

  Specified by:
    `init` in interface `IEventFactory`

Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD