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