New events are created by using an event factory.
To create new events in your event source, you use an event factory,
which is an object that returns new instances of CommonBaseEvent or of the
specialized classes representing complex property data types.
There are two ways you can access an event factory:
- You can create a new event factory using the event factory factory.
Use this approach if no appropriate event factory is already available. When
you create a new event factory, you can optionally specify a content handler
to provide automatic content completion.
- You can use an existing event factory that has been bound into a Java
Naming and Directory Interface (JNDI) namespace. Use this approach if an administrator
has provided an event factory for you to use; this ensures that any events
you create conform to the appropriate business rules, because the event factory
might be configured with a content handler.