Skip to content

Instantly share code, notes, and snippets.

@pmuir
Forked from johnament/EventFiringBean.java
Created June 7, 2011 12:50
Show Gist options
  • Save pmuir/1012170 to your computer and use it in GitHub Desktop.
Save pmuir/1012170 to your computer and use it in GitHub Desktop.
CDI Event Qualifiers
public class EventFiringBean {
@Inject @Outbound Event<String> stringJmsEvent;
@Inject Event<String> stringEvent;
}
public class EventObserver {
public void handleString1(@Observes String s) {
...
}
public void handleString2(@Observes @Inbound String s) {
...
}
public void handleString3(@Observes @Outbound String s) {
...
}
public void handleString4(@Observes @Default String s) {
...
}
public void handleString5(@Observes @Any String s) {
...
}
}
public interface JmsInterface{
public void routeStrings(@Observes String s, @StringTopic Topic topic);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment