Skip to content

it's about decoupling and the separation of concerns.

License

Notifications You must be signed in to change notification settings

maregeo/eventbus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eventbus

it's about decoupling and the separation of concerns.

How to use?
add this tag in your application spring.xml
step 1:
add spring bean in spring.xml com.qc.eventbus.spring.SpringEventBus and add init-method="init" and destroy-method="destroy"

step 2:
use eventbus instance like this
eventbus.publish(DemoEvent event);
event is what you are concerned.
step 3:
add @Subscribe annotation on you service method
@Subscribe(async=false) or @Subscribe(async=true)
public void handleDemoEvent(DemoEvent event){

}

async=false the thread is synchronous
async=ture the thread is asynchronous

About

it's about decoupling and the separation of concerns.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages