Created
April 20, 2011 19:05
-
-
Save mathieuancelin/932349 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
@ApplicationScoped | |
public class ServiceListener { | |
public void bindService(@Observes @Specification(MyService.class) ServiceArrival event) { | |
System.out.println("A new service just arrived"); | |
MyService arrived = event.type(MyService.class).getService(); | |
} | |
public void unbindService(@Observes @Specification(MyService.class) ServiceDeparture event) { | |
System.out.println("A service just went out"); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment