TPTP 4.2.0 Platform Project
Public API Specification

org.eclipse.tptp.logging.events.cbe.impl
Class EventFactoryImpl

java.lang.Object
  extended byorg.eclipse.tptp.logging.events.cbe.impl.EventFactoryImpl
All Implemented Interfaces:
EventFactory, javax.naming.Referenceable, java.io.Serializable

public class EventFactoryImpl
extends java.lang.Object
implements EventFactory, java.io.Serializable, javax.naming.Referenceable

Class representing an implementation of an EventFactory.

It provides a create method for each non-abstract class of the model.

Since:
1.0.1
See Also:
Serialized Form

Field Summary
static java.lang.String CBE_INSTANCE_ADDRESS
          Name of the reference address for the mediation handlers in JNDI.
 
Fields inherited from interface org.eclipse.tptp.logging.events.cbe.EventFactory
eINSTANCE
 
Constructor Summary
EventFactoryImpl()
          Creates and instance of the factory
 
Method Summary
 AssociatedEvent createAssociatedEvent()
           Returns a new object of class 'Associated Event'.
 AssociationEngine createAssociationEngine()
           Returns a new object of class 'Association Engine'.
 AvailableSituation createAvailableSituation()
           Returns a new object of class 'Available Situation'.
 CommonBaseEvent createCommonBaseEvent()
           Returns a new object of class 'Common Base Event'.
 CommonBaseEvent createCommonBaseEvent(short severity, ComponentIdentification reporterCompId, ComponentIdentification sourceCompId, Situation situation, java.lang.String msg)
           Returns a new object of class 'Common Base Event'.
 CommonBaseEvent createCommonBaseEvent(short severity, ComponentIdentification reporterCompId, ComponentIdentification sourceCompId, Situation situation, java.lang.String msgCatalogId, java.lang.String[] msgCatalogTokens, java.lang.String msgId, java.lang.String msg)
           Returns a new object of class 'Common Base Event'.
 CommonBaseEvent createCommonBaseEvent(short severity, Situation situation, java.lang.String msg)
           Returns a new object of class 'Common Base Event'.
 CommonBaseEvent createCommonBaseEvent(short severity, Situation situation, java.lang.String msgCatalogId, java.lang.String[] msgCatalogTokens, java.lang.String msgId, java.lang.String msg)
           Returns a new object of class 'Common Base Event'.
 CommonBaseEvent createCommonBaseEvent(java.lang.String extensionName)
           Returns a new object of class 'Common Base Event'.
 CommonBaseEvent createCommonBaseEvent(java.lang.String extensionName, long creationTime)
           Returns a new object of class 'Common Base Event'.
 CommonBaseEvent createCommonBaseEventGen()
           
 ComponentIdentification createComponentIdentification()
           Returns a new object of class 'Component Identification'.
 ConfigureSituation createConfigureSituation()
           Returns a new object of class 'Configure Situation'.
 ConnectSituation createConnectSituation()
           Returns a new object of class 'Connect Situation'.
 ContextDataElement createContextDataElement()
           Returns a new object of class 'Context Data Element'.
 CreateSituation createCreateSituation()
           Returns a new object of class 'Create Situation'.
 DependencySituation createDependencySituation()
           Returns a new object of class 'Dependency Situation'.
 DestroySituation createDestroySituation()
           Returns a new object of class 'Destroy Situation'.
 ExtendedDataElement createExtendedDataElement()
           Returns a new object of class 'Extended Data Element'.
 FeatureSituation createFeatureSituation()
           Returns a new object of class 'Feature Situation'.
 java.lang.String createGlobalInstanceId()
          Produces a globally unique identifier according to the Internet draft draft-leach-uuids-guids-01 algorithm.
 MsgCatalogToken createMsgCatalogToken()
           Returns a new object of class 'Msg Catalog Token'.
 MsgDataElement createMsgDataElement()
           Returns a new object of class 'Msg Data Element'.
 OtherSituation createOtherSituation()
           Returns a new object of class 'Other Situation'.
 ReportSituation createReportSituation()
           Returns a new object of class 'Report Situation'.
 RequestSituation createRequestSituation()
           Returns a new object of class 'Request Situation'.
 Situation createSituation()
           Returns a new object of class 'Situation'.
 StartSituation createStartSituation()
           Returns a new object of class 'Start Situation'.
 StopSituation createStopSituation()
           Returns a new object of class 'Stop Situation'.
 boolean getCompleteEvent()
          Gets the complete event configuration flag for this event factory instance.
 ContentHandler getContentHandler()
          Gets the ContentHandler associated with this event factory instance.
static EventFactory getInstance()
          Accessor method to retrieve the instance of the singleton factory.
 javax.naming.Reference getReference()
           
 void setCompleteEvent(boolean completeEvent)
          Sets the complete event configuration flag for this event factory instance.
 void setContentHandler(ContentHandler value)
          Sets the ContentHandler associated with this event factory instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CBE_INSTANCE_ADDRESS

public static final java.lang.String CBE_INSTANCE_ADDRESS
Name of the reference address for the mediation handlers in JNDI.

The getReference method encodes the mediation handlers in their serialized form inside a reference address and uses this name for that address.

See Also:
Constant Field Values
Constructor Detail

EventFactoryImpl

public EventFactoryImpl()
Creates and instance of the factory.

Method Detail

createAssociatedEvent

public AssociatedEvent createAssociatedEvent()
Description copied from interface: EventFactory

Returns a new object of class 'Associated Event'.

Specified by:
createAssociatedEvent in interface EventFactory
Returns:
a new object of class 'Associated Event'.

createAssociationEngine

public AssociationEngine createAssociationEngine()
Description copied from interface: EventFactory

Returns a new object of class 'Association Engine'.

Specified by:
createAssociationEngine in interface EventFactory
Returns:
a new object of class 'Association Engine'.

createAvailableSituation

public AvailableSituation createAvailableSituation()
Description copied from interface: EventFactory

Returns a new object of class 'Available Situation'.

Specified by:
createAvailableSituation in interface EventFactory
Returns:
a new object of class 'Available Situation'.

createCommonBaseEventGen

public CommonBaseEvent createCommonBaseEventGen()

createCommonBaseEvent

public CommonBaseEvent createCommonBaseEvent()
Description copied from interface: EventFactory

Returns a new object of class 'Common Base Event'.

Specified by:
createCommonBaseEvent in interface EventFactory
Returns:
a new object of class 'Common Base Event'.
See Also:
EventFactory.createCommonBaseEvent()

createCommonBaseEvent

public CommonBaseEvent createCommonBaseEvent(java.lang.String extensionName,
                                             long creationTime)
Description copied from interface: EventFactory

Returns a new object of class 'Common Base Event'.

Specified by:
createCommonBaseEvent in interface EventFactory
Parameters:
extensionName - the extension name for the newly returned event or null.
creationTime - the creation time, in xsd:dateTime format, for the newly created event or -1.
Returns:
a new object of class 'Common Base Event'.
See Also:
EventFactory.createCommonBaseEvent(String, long)

createCommonBaseEvent

public CommonBaseEvent createCommonBaseEvent(java.lang.String extensionName)
Description copied from interface: EventFactory

Returns a new object of class 'Common Base Event'.

Specified by:
createCommonBaseEvent in interface EventFactory
Parameters:
extensionName - the extension name for the newly returned event or null.
Returns:
a new object of class 'Common Base Event'.
See Also:
EventFactory.createCommonBaseEvent(String)

createCommonBaseEvent

public CommonBaseEvent createCommonBaseEvent(short severity,
                                             Situation situation,
                                             java.lang.String msg)
Description copied from interface: EventFactory

Returns a new object of class 'Common Base Event'.

Specified by:
createCommonBaseEvent in interface EventFactory
Parameters:
severity - the severity of the event being created or -1
situation - the situation of the event being created or null
msg - the msg of the CommonBaseEvent created or null
Returns:
a new object of class 'Common Base Event'.
See Also:
EventFactory.createCommonBaseEvent(short, org.eclipse.tptp.logging.events.cbe.Situation, java.lang.String)

createCommonBaseEvent

public CommonBaseEvent createCommonBaseEvent(short severity,
                                             Situation situation,
                                             java.lang.String msgCatalogId,
                                             java.lang.String[] msgCatalogTokens,
                                             java.lang.String msgId,
                                             java.lang.String msg)
Description copied from interface: EventFactory

Returns a new object of class 'Common Base Event'.

Specified by:
createCommonBaseEvent in interface EventFactory
Parameters:
severity - the severity of the event being created or -1
situation - the situation of the event being created or null
msgCatalogId - the msgCatalogId of the MsgDataElement of the CommonBaseEvent being created or null
msgCatalogTokens - the msgCatalogTokens of the MsgDataElement of the CommonBaseEvent being created or null
msgId - the msgId of the MsgDataElement of the CommonBaseEvent being created or null
msg - the msg of the CommonBaseEvent created or null
Returns:
a new object of class 'Common Base Event'.
See Also:
EventFactory.createCommonBaseEvent(short, org.eclipse.tptp.logging.events.cbe.Situation, java.lang.String, java.lang.String[], java.lang.String, java.lang.String)

createCommonBaseEvent

public CommonBaseEvent createCommonBaseEvent(short severity,
                                             ComponentIdentification reporterCompId,
                                             ComponentIdentification sourceCompId,
                                             Situation situation,
                                             java.lang.String msg)
Description copied from interface: EventFactory

Returns a new object of class 'Common Base Event'.

Specified by:
createCommonBaseEvent in interface EventFactory
Parameters:
severity - the severity of the event being created or -1
reporterCompId - the reporter component Id of the event being created or null
sourceCompId - the source component Id of the event being created or null
situation - the situation of the event being created or null
msg - the msg of the CommonBaseEvent created or null
Returns:
a new object of class 'Common Base Event'.
See Also:
EventFactory.createCommonBaseEvent(short, org.eclipse.tptp.logging.events.cbe.ComponentIdentification, org.eclipse.tptp.logging.events.cbe.ComponentIdentification, org.eclipse.tptp.logging.events.cbe.Situation, java.lang.String)

createCommonBaseEvent

public CommonBaseEvent createCommonBaseEvent(short severity,
                                             ComponentIdentification reporterCompId,
                                             ComponentIdentification sourceCompId,
                                             Situation situation,
                                             java.lang.String msgCatalogId,
                                             java.lang.String[] msgCatalogTokens,
                                             java.lang.String msgId,
                                             java.lang.String msg)
Description copied from interface: EventFactory

Returns a new object of class 'Common Base Event'.

Specified by:
createCommonBaseEvent in interface EventFactory
Parameters:
severity - the severity of the event being created or -1
reporterCompId - the reporter component Id of the event being created or null
sourceCompId - the source component Id of the event being created or null
situation - the situation of the event being created or null
msgCatalogId - the msgCatalogId of the MsgDataElement of the CommonBaseEvent being created or null
msgCatalogTokens - the msgCatalogTokens of the MsgDataElement of the CommonBaseEvent being created or null
msgId - the msgId of the MsgDataElement of the CommonBaseEvent being created or null
msg - the msg of the CommonBaseEvent created or null
Returns:
a new object of class 'Common Base Event'.
See Also:
EventFactory.createCommonBaseEvent(short, org.eclipse.tptp.logging.events.cbe.ComponentIdentification, org.eclipse.tptp.logging.events.cbe.ComponentIdentification, org.eclipse.tptp.logging.events.cbe.Situation, java.lang.String, java.lang.String[], java.lang.String, java.lang.String)

createComponentIdentification

public ComponentIdentification createComponentIdentification()
Description copied from interface: EventFactory

Returns a new object of class 'Component Identification'.

Specified by:
createComponentIdentification in interface EventFactory
Returns:
a new object of class 'Component Identification'.

createConfigureSituation

public ConfigureSituation createConfigureSituation()
Description copied from interface: EventFactory

Returns a new object of class 'Configure Situation'.

Specified by:
createConfigureSituation in interface EventFactory
Returns:
a new object of class 'Configure Situation'.

createConnectSituation

public ConnectSituation createConnectSituation()
Description copied from interface: EventFactory

Returns a new object of class 'Connect Situation'.

Specified by:
createConnectSituation in interface EventFactory
Returns:
a new object of class 'Connect Situation'.

createContextDataElement

public ContextDataElement createContextDataElement()
Description copied from interface: EventFactory

Returns a new object of class 'Context Data Element'.

Specified by:
createContextDataElement in interface EventFactory
Returns:
a new object of class 'Context Data Element'.

createCreateSituation

public CreateSituation createCreateSituation()
Description copied from interface: EventFactory

Returns a new object of class 'Create Situation'.

Specified by:
createCreateSituation in interface EventFactory
Returns:
a new object of class 'Create Situation'.

createDependencySituation

public DependencySituation createDependencySituation()
Description copied from interface: EventFactory

Returns a new object of class 'Dependency Situation'.

Specified by:
createDependencySituation in interface EventFactory
Returns:
a new object of class 'Dependency Situation'.

createDestroySituation

public DestroySituation createDestroySituation()
Description copied from interface: EventFactory

Returns a new object of class 'Destroy Situation'.

Specified by:
createDestroySituation in interface EventFactory
Returns:
a new object of class 'Destroy Situation'.

createExtendedDataElement

public ExtendedDataElement createExtendedDataElement()
Description copied from interface: EventFactory

Returns a new object of class 'Extended Data Element'.

Specified by:
createExtendedDataElement in interface EventFactory
Returns:
a new object of class 'Extended Data Element'.

createFeatureSituation

public FeatureSituation createFeatureSituation()
Description copied from interface: EventFactory

Returns a new object of class 'Feature Situation'.

Specified by:
createFeatureSituation in interface EventFactory
Returns:
a new object of class 'Feature Situation'.

createGlobalInstanceId

public java.lang.String createGlobalInstanceId()
Produces a globally unique identifier according to the Internet draft draft-leach-uuids-guids-01 algorithm.

Specified by:
createGlobalInstanceId in interface EventFactory
Returns:
a globally unique identifier according to the algorith above.

createMsgCatalogToken

public MsgCatalogToken createMsgCatalogToken()
Description copied from interface: EventFactory

Returns a new object of class 'Msg Catalog Token'.

Specified by:
createMsgCatalogToken in interface EventFactory
Returns:
a new object of class 'Msg Catalog Token'.

createMsgDataElement

public MsgDataElement createMsgDataElement()
Description copied from interface: EventFactory

Returns a new object of class 'Msg Data Element'.

Specified by:
createMsgDataElement in interface EventFactory
Returns:
a new object of class 'Msg Data Element'.

createOtherSituation

public OtherSituation createOtherSituation()
Description copied from interface: EventFactory

Returns a new object of class 'Other Situation'.

Specified by:
createOtherSituation in interface EventFactory
Returns:
a new object of class 'Other Situation'.

createReportSituation

public ReportSituation createReportSituation()
Description copied from interface: EventFactory

Returns a new object of class 'Report Situation'.

Specified by:
createReportSituation in interface EventFactory
Returns:
a new object of class 'Report Situation'.

createRequestSituation

public RequestSituation createRequestSituation()
Description copied from interface: EventFactory

Returns a new object of class 'Request Situation'.

Specified by:
createRequestSituation in interface EventFactory
Returns:
a new object of class 'Request Situation'.

createSituation

public Situation createSituation()
Description copied from interface: EventFactory

Returns a new object of class 'Situation'.

Specified by:
createSituation in interface EventFactory
Returns:
a new object of class 'Situation'.

createStartSituation

public StartSituation createStartSituation()
Description copied from interface: EventFactory

Returns a new object of class 'Start Situation'.

Specified by:
createStartSituation in interface EventFactory
Returns:
a new object of class 'Start Situation'.

createStopSituation

public StopSituation createStopSituation()
Description copied from interface: EventFactory

Returns a new object of class 'Stop Situation'.

Specified by:
createStopSituation in interface EventFactory
Returns:
a new object of class 'Stop Situation'.

setContentHandler

public void setContentHandler(ContentHandler value)
Description copied from interface: EventFactory
Sets the ContentHandler associated with this event factory instance.

ContentHandler s associated with this event factory instance are assigned to each newly create event instance.

Specified by:
setContentHandler in interface EventFactory
Parameters:
value - The new ContentHandler associated with this event factory instance.

getContentHandler

public ContentHandler getContentHandler()
Description copied from interface: EventFactory
Gets the ContentHandler associated with this event factory instance.

ContentHandler s associated with this event factory instance are assigned to each newly create event instance.

Specified by:
getContentHandler in interface EventFactory
Returns:
The ContentHandler associated with this event factory instance, otherwise null.

setCompleteEvent

public void setCompleteEvent(boolean completeEvent)
Description copied from interface: EventFactory
Sets the complete event configuration flag for this event factory instance.

The complete event configuration flag instructs the event factory instance to automatically complete newly create event instances using the ContentHandler associated with this event factory instance, if any.

If the complete event configuration flag is false, the event factory will not automatically complete newly create event instances.

By default, the complete event configuration flag is false.

Specified by:
setCompleteEvent in interface EventFactory
Parameters:
completeEvent - The complete event configuration flag.

getCompleteEvent

public boolean getCompleteEvent()
Description copied from interface: EventFactory
Gets the complete event configuration flag for this event factory instance.

The complete event configuration flag instructs the event factory instance to automatically complete newly create event instances using the ContentHandler associated with this event factory instance, if any.

If the complete event configuration flag is false, the event factory will not automatically complete newly create event instances.

By default, the complete event configuration flag is false.

Specified by:
getCompleteEvent in interface EventFactory
Returns:
True if the complete event configuration flag is set, otherwise false.

getReference

public javax.naming.Reference getReference()
                                    throws javax.naming.NamingException
Specified by:
getReference in interface javax.naming.Referenceable
Throws:
javax.naming.NamingException
See Also:
Referenceable.getReference()

getInstance

public static EventFactory getInstance()
Accessor method to retrieve the instance of the singleton factory.

Returns:
EventFactory

TPTP 4.2.0 Platform Project
Public API Specification