Hello everyone. 

I'm looking for some explanation on event handling in POX. 

Lets say that i have 2 components registered in core with names Component_1 and 
Component_2. Component_1 raises some event called Event_1.

I want to handle some events in Component_2 both from core.openflow and from 
core.Component_1.

How should i name the handler methods in Component_2 and how should i register 
the listeners? Is the following example correct?

In Component_2:

__init__(self):
        core.Component_1.addListeners(self) 
        core.openflow.addListeners(self)

def _handle_openflow_ConnectionUp(self):
        ….

def _handle_Component_1_Event_1(self):
        ….

Secondly, i only want a component to start handling events afar having received 
a notification from another component. Can i add the listeners only after i 
have "caught" an event? Something like the following:

__init__(self):
        core.Component_1.addListeners(self) 

def _handle_Component_1_Event_1(self):
        core.openflow.addListeners(self)

Third, can someone explain to me what the core.listen_to_dependencies does?

Thank you in advance,
John

Reply via email to