Search in sources :

Example 1 with RemoteNeedSpecificEvent

use of won.bot.framework.eventbot.event.RemoteNeedSpecificEvent in project webofneeds by researchstudio-sat.

the class ExecuteSendMessageCommandAction method makeLogMessageString.

private String makeLogMessageString(Event event) {
    StringBuilder sb = new StringBuilder();
    MessageCommandEvent messageCommandEvent = (MessageCommandEvent) event;
    sb.append("sending message of type ").append(messageCommandEvent.getWonMessageType());
    if (event instanceof NeedSpecificEvent) {
        sb.append(" on behalf of need ").append(((NeedSpecificEvent) event).getNeedURI());
    }
    if (event instanceof RemoteNeedSpecificEvent) {
        sb.append(" to need ").append(((RemoteNeedSpecificEvent) event).getRemoteNeedURI());
    }
    if (event instanceof ConnectionSpecificEvent) {
        sb.append(" in connection ").append(((ConnectionSpecificEvent) event).getConnectionURI());
    }
    return sb.toString();
}
Also used : RemoteNeedSpecificEvent(won.bot.framework.eventbot.event.RemoteNeedSpecificEvent) NeedSpecificEvent(won.bot.framework.eventbot.event.NeedSpecificEvent) ConnectionSpecificEvent(won.bot.framework.eventbot.event.ConnectionSpecificEvent) RemoteNeedSpecificEvent(won.bot.framework.eventbot.event.RemoteNeedSpecificEvent) MessageCommandEvent(won.bot.framework.eventbot.event.impl.command.MessageCommandEvent)

Aggregations

ConnectionSpecificEvent (won.bot.framework.eventbot.event.ConnectionSpecificEvent)1 NeedSpecificEvent (won.bot.framework.eventbot.event.NeedSpecificEvent)1 RemoteNeedSpecificEvent (won.bot.framework.eventbot.event.RemoteNeedSpecificEvent)1 MessageCommandEvent (won.bot.framework.eventbot.event.impl.command.MessageCommandEvent)1