Interface IEventProcessorFactory<T extends IEventProcessor>
-
- Type Parameters:
T
- The type of event processor objects produced by this factory, which must implement IEventProcessor
public interface IEventProcessorFactory<T extends IEventProcessor>
Interface that must be implemented by an event processor factory class.User-provided factories are needed if creating an event processor object requires more work than just a new with a parameterless constructor.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
createEventProcessor(PartitionContext context)
Called to create an event processor for the given partition.
-
-
-
Method Detail
-
createEventProcessor
T createEventProcessor(PartitionContext context) throws Exception
Called to create an event processor for the given partition.If it throws an exception, that causes this event processor host instance to give up ownership of the partition.
- Parameters:
context
- Information about the partition that the event processor will handle events from.- Returns:
- The event processor object.
- Throws:
Exception
- to indicate failure.
-
-