[Asterisk-java-devel] How to create a new Event.class
Brought to you by:
srt
|
From: Jose B. <pe...@gm...> - 2014-02-12 14:01:19
|
Hello! I needed a new ManagerEvent not developed in Asterisk-Java
(PickupEvent).
I am not a developer, so I made a new class (PickupEvent.java) based on
other Asterisk-Java source code (with proper setters/getters).
My code for handling ManagerEvent is (1.0.0-CI )
@Override
public void *onManagerEvent(ManagerEvent event)* {
if (*event.getClass() == NewExtenEvent.class*) {
handleEvent((NewExtenEvent) event);
}
else if (*event.??? == PickupEvent.class)* {
handleEvent((PickupEvent) event);
}
}
Can I create this new class in my project without putting it in library
(which I don't know) ?
I already made the class and:
event.getClass() == PickupEvent.class
...never gets called
What else do I need?
Thanks.
|