Skip to content

About

Event loop for processing your Java based application events

Topics

Resources

Stars

8 stars

Watchers

1 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Event Loop

Simple event loop for processing custom application events

#####1. Configure Event Publisher and Event Loop.

EventBus eventBus = new EventBusImpl();
EventLoop eventLoop = new EventLoopImpl(eventBus);
EventPublisher eventPublisher = new EventPublisherImpl(eventBus);

eventLoop.addEventHandler(simpleEventHandler);
eventLoop.addEventHandler(urlCheckingEventHandler);
eventLoop.addEventHandler(isOddNumberResultEventHandler);
eventLoop.addEventHandler(isOddNumberCheckingEventHandler);

#####2. Start Event Loop after configuring

eventLoop.start();

#####3. Publish events through the Event Publisher

SimpleEvent simpleEvent = new SimpleEvent("hello world!");
eventPublisher.publish(simpleEvent);

You may see the working example into Test.java

I'll publish thats event-loop library in maven central repository later

About

Event loop for processing your Java based application events

Topics

Resources

Stars

8 stars

Watchers

1 watching

Forks

Contributors

Languages