For sending and receiving events we first need an Event object. Event objects are actually simple POJOs.

public class ArbitaryEvent{
    public static final int TYPE_1 = 1;
    public static final int TYPE_2 = 2;
    private int eventType;
    public ArbitaryEvent(int eventType){
        this.eventType = eventType;
    }
    
    public int getEventType(){
        return eventType;
    }
}