Iam just a bit confused with what type of events can be published through OTTO. and a example of event class will be really helpful. Thanks
You can publish any objects. Check the Otto home page. There you see an example where AnswerAvailableEvent
event gets published. Event class can look like this.
public class AnswerAvailableEvent {
private int answer;
public AnswerAvailableEvent(int answer) {
this.answer = answer;
}
public int getAnswer() {
return answer;
}
}