Skip to content

scm-manager/legman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Legman

Legman is a fork of the Guava Eventbus.

Differences to Guava

  • weak references by default
  • synchronous and asynchronous dispatching in same EventBus
  • all options are controlled by attributes of the subscribe annotation
  • exceptions are propagated to caller (works only with synchronous dispatching)

In addition, Legman comes with ready to use integrations:

Maven

<dependencies>
    
  <dependency>
    <groupId>com.cloudogu.legman</groupId>
    <artifactId>core</artifactId>
    <version>2.0.0</version>
  </dependency>

</dependencies>

<repositories>

  <repository>
    <id>packages.scm-manager.org</id>
    <name>scm-manager repository</name>
    <url>https://packages.scm-manager.org/repository/public/</url>
  </repository>

</repositories>

Usage

public class Event {

}

public class Listener {

  @Subscribe
  public void handleEvent(Event event){
    // handle event
  }

}

Listener listener = new Listener();

EventBus eventBus = new EventBus();
eventBus.register(listener);
eventBus.post(new Event());

About

This project is a fork of the EventBus of Google Guava

Resources

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages