public static final class EventFactory.EventType extends Object
This class stores event type information for use by the factory
when instantiating events. This class is only of interest to the
user if the user is registering event types programatically using
EventFactory.registerEventType(com.neeve.event.EventFactory.EventType, boolean).
| Modifier and Type | Method and Description |
|---|---|
static EventFactory.EventType |
create(short id,
String name,
String className,
boolean shouldPool,
Properties props)
Create a new event type object.
|
String |
getName()
Get the event type name
|
UtlPool<Event> |
getPool()
Returns the pool associated with this event type
|
boolean |
isPooled()
Returns if this event type is pooled
|
public static final EventFactory.EventType create(short id, String name, String className, boolean shouldPool, Properties props)
id - Each event type in the system is uniquely identified
using a event id. This contains the unique identifier of the
event type being created.name - A name used to describe the event type.className - The name of the event class.shouldPool - Indicates whether events of this type should be
pooled. Pooled events are passed through a recycler to avoid
garbage collection.props - A set of properties to be associated with the event
type. Event type properties are passed unchanged to the event
constructor when creating events of that type.IllegalArgumentException - Thrown in case any of the supplied
arguments are invalid.public final String getName()
public final boolean isPooled()
Copyright © 2019 Neeve Research, LLC. All Rights Reserved.