Last active
April 19, 2018 10:44
-
-
Save sapanparikh18/bc7474871a6b656d1734bc98704c545e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.HashMap; | |
import java.util.Map; | |
public class Invoice implements Subscriber { | |
@Override | |
public void update(Broker.Context ctx) { | |
System.out.println("tax rates changed"); | |
} | |
public static void main(String[] args) { | |
// register to listen to events | |
Invoice subscriber = new Invoice(); | |
Broker.getInstance().register(Broker.CommonTopics.ON_TAX_CHANGE,subscriber); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment