Creating a new event factory

An event factory is used to create new events.

Why and when to perform this task

To create a new event factory, use the event factory factory, implemented as the class EventFactoryFactory. This class has no instances; instead, it provides two static methods used to create event factories. The choice of which method to use depends upon whether you want to use a content handler to implement automatic content completion. For more information, see Completing event content automatically.

To create a generic event factory with no content handler, use the createEventFactory() static method of EventFactoryFactory:
EventFactory eventFactory = 
     (EventFactory) EventFactoryFactory.createEventFactory();
To create an event factory with a content handler, use the createEventFactory(ContentHandler) method, specifying the content handler you want to use:
EventFactory eventFactory = 
     (EventFactory) EventFactoryFactory.createEventFactory(contentHandler);

In either case, the returned object is an event factory you can use to create new events.


Terms of use |

Last updated: Tue Feb 21 17:19:16 2006

(c) Copyright IBM Corporation 2005.
This information center is powered by Eclipse technology (http://www.eclipse.org)