public abstract class DataProcessor
extends java.lang.Object
Constructor and Description |
---|
DataProcessor()
Creates a new processor.
|
Modifier and Type | Method and Description |
---|---|
void |
activate()
Activates this processor.
|
void |
deactivate()
Deactivates this processor.
|
protected DataCenter |
getDataCenter()
Returns the world on which this system is attached to.
|
java.util.List<IEntity> |
getInterestedEntities()
Returns a list of entities, this processor is interested in.
|
TLongList |
getInterestedEntityIds()
Returns a list of entity ids, this processor is interested in.
|
boolean |
isActive()
Check if this processor is active.
|
protected abstract void |
onInitialize()
Houses all the initializations for the processor, such as registering
interest in a specific group of entities.
|
protected abstract void |
onProcessing()
Processes the processor's logic.
|
void |
process()
Processes all the things this processor is ought to process.
|
void |
registerInterestIn(java.lang.Class<? extends Data>... someInterestedData)
Tells the DataCenter, which entites this processor is interested in.
|
void |
toggelActiveness()
Toggles the activeness of this processor.
|
public void registerInterestIn(java.lang.Class<? extends Data>... someInterestedData)
someInterestedData
- public void process()
protected abstract void onInitialize()
protected abstract void onProcessing()
protected DataCenter getDataCenter()
public TLongList getInterestedEntityIds()
public java.util.List<IEntity> getInterestedEntities()
public boolean isActive()
public void activate()
public void deactivate()
public void toggelActiveness()