Created
November 28, 2014 22:38
-
-
Save RX14/7cf561d78f13d5751afb 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
public void poll() | |
{ | |
List<ChatEvent> events = new ArrayList<>(); | |
for (ISteph steph : stephs) | |
while (steph.moveNextEvent()) | |
events.add(steph.getCurrentEvent()); | |
for (ChatEvent event : events) | |
for (IMessageHandler handler : handlers) | |
for (IEventMatcher matcher : handler.getEventMatchers()) | |
if (matcher.match(event)) | |
{ | |
handler.processEvent(event); | |
break; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment