001    package com.hammurapi.eventbus.tests;
002    
003    import com.hammurapi.common.Condition;
004    import com.hammurapi.eventbus.Handler;
005    
006    public class OppositeHandler {
007            
008            private boolean oneInvoked;
009            private boolean twoInvoked;
010                    
011            @Handler
012            public void handleOne(@Condition("java(*)://str.length()==10 && str.startsWith(\"Hello\")") String str) {
013                    oneInvoked = true;
014            }
015            
016            @Handler("java(*)://AND(s.endsWith(\"world!\"), 10!=s.length())")
017            public void handleTwo(String s) {
018                    twoInvoked = true;
019            }
020            
021            @Handler("java(*)://i>118") 
022            public void handleInteger(Integer i) {
023                    
024            }
025    
026            public boolean isOneInvoked() {
027                    return oneInvoked;
028            }
029            
030            public boolean isTwoInvoked() {
031                    return twoInvoked;
032            }
033            
034    }