added automatic listener cleanup
@@ -30,7 +30,7 @@ import won.bot.framework.eventbot.filter.impl.AcceptOnceFilter;
import won.bot.framework.eventbot.filter.impl.OriginalMessageUriRemoteResponseEventFilter;
import won.bot.framework.eventbot.filter.impl.OriginalMessageUriResponseEventFilter;
import won.bot.framework.eventbot.listener.EventListener;
-import won.bot.framework.eventbot.listener.impl.ActionOnEventListener;
+import won.bot.framework.eventbot.listener.impl.ActionOnFirstEventListener;
import won.protocol.message.WonMessage;
import javax.mail.MessagingException;
@@ -201,7 +201,7 @@ public class EventBotActionUtils {
EventListenerContext context) {
//create an event listener that processes the response to the wonMessage we're about to send
- EventListener listener = new ActionOnEventListener(context,
+ EventListener listener = new ActionOnFirstEventListener(context,
new AcceptOnceFilter(OriginalMessageUriResponseEventFilter.forWonMessage(outgoingMessage)),
new BaseEventBotAction(context)
{
@@ -236,7 +236,7 @@ public class EventBotActionUtils {
EventListenerContext context) {
//create an event listener that processes the remote response to the wonMessage we're about to send
- EventListener listener = new ActionOnEventListener(context,
+ EventListener listener = new ActionOnFirstEventListener(context,
new AcceptOnceFilter(OriginalMessageUriRemoteResponseEventFilter.forWonMessage(outgoingMessage)),
new BaseEventBotAction(context)
{
