Skip to content

Instantly share code, notes, and snippets.

@johnament
Created June 7, 2011 12:02
Show Gist options
  • Save johnament/1012090 to your computer and use it in GitHub Desktop.
Save johnament/1012090 to your computer and use it in GitHub Desktop.
CDI Event Qualifiers
public class EventFiringBean {
@Inject @Outbound Event<String> stringJmsEvent;
@Inject @Inbound Event<String> stringJmsInboundEvent;
@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 void handleString6(@Observes @Inbound @Outbound 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