Plug-in event representation that can dynamically create event types and event instances based on information available elsewhere.
A plug-in event representation can be useful when your application has existing Java classes that carry event metadata and event property values and your application does not want to (or cannot) extract or transform such event metadata and event data into one of the built-in event representations (POJO Java objects, Map or XML DOM).
Further use of a plug-in event representation is to provide a faster or short-cut access path to event data. For example, the access to XML event data through a StAX Streaming API for XML (StAX) is known to be very efficient.
Further, a plug-in event representation can provide network lookup and general abstraction of event typing and event sourcing.
Before use, an implementation of this interface must be registered via configuration. Upon engine initialization, the engine invokes the {@link #init} method passing configuration information.
When a plug-in event type name is registered via configuration (runtime or configuration time), the engine first asks the implementation whether the type is accepted via {@link #acceptsType}. If accepted, the engine follows with a call to {@link #getTypeHandler} for creating and handling the type.
An implementation can participate in dynamic resolution of new (unseen) event type names if the application configures the URI of the event representation, or a child URI (parameters possible) via {@link com.espertech.esper.client.ConfigurationOperations#setPlugInEventTypeResolutionURIs(java.net.URI[])}.
Last, see {@link com.espertech.esper.client.EPRuntime#getEventSender(java.net.URI[])}. An event sender allows dynamic reflection on an incoming event object. At the time such an event sender is obtained and a matching URI specified, the {@link #acceptsEventBeanResolution} methodindicates that the event representation can or cannot inspect events, and the {@link PlugInEventBeanFactory}returned is used by the event sender to wrap event objects for processing.