# Revision history [back]

### Event driven Code- packet in to controller

I have a Hello World Project with openflowplugin installed. I am able to add flows via RESTCONF. Now, I need to make my project event driven , i.e. it can add and delete flows dynamically.

For eg, a switch is connected to the Controller. A packet comes in to the switch. By default it should come to the controller and the controller should act upon it. I just need to know how to implement the event " packet in " in my code.

The structure of my project right now is:

-api
-artifacts
-features
-impl
-it
-karaf
-pom.xml
-target


in impl i have java files - HelloWorldImpl HelloWorldProvider, HelloWorldModule HelloWorldModuleFactory.

TIA

### Event driven Code- packet in to controller

I have a Hello World Project with openflowplugin installed. I am able to add flows via RESTCONF. Now, I need to make my project event driven , i.e. it can add and delete flows dynamically.

For eg, a switch is connected to the Controller. A packet comes in to the switch. By default it should come to the controller and the controller should act upon it. I just need to know how to implement the event " packet in " in my code.

The structure of my project right now is:

-api
-artifacts
-features
-impl
-it
-karaf
-pom.xml
-target


in impl i have java files - HelloWorldImpl HelloWorldProvider, HelloWorldModule HelloWorldModuleFactory.