Search in sources :

Example 1 with TargetAtomSpecificEvent

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

the class ExecuteMessageCommandAction 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 AtomSpecificEvent) {
        sb.append(" on behalf of atom ").append(((AtomSpecificEvent) event).getAtomURI());
    }
    if (event instanceof TargetAtomSpecificEvent) {
        sb.append(" to atom ").append(((TargetAtomSpecificEvent) event).getTargetAtomURI());
    }
    if (event instanceof ConnectionSpecificEvent) {
        sb.append(" in connection ").append(((ConnectionSpecificEvent) event).getConnectionURI());
    }
    return sb.toString();
}
Also used : ConnectionSpecificEvent(won.bot.framework.eventbot.event.ConnectionSpecificEvent) AtomSpecificEvent(won.bot.framework.eventbot.event.AtomSpecificEvent) TargetAtomSpecificEvent(won.bot.framework.eventbot.event.TargetAtomSpecificEvent) MessageCommandEvent(won.bot.framework.eventbot.event.impl.command.MessageCommandEvent) TargetAtomSpecificEvent(won.bot.framework.eventbot.event.TargetAtomSpecificEvent)

Aggregations

AtomSpecificEvent (won.bot.framework.eventbot.event.AtomSpecificEvent)1 ConnectionSpecificEvent (won.bot.framework.eventbot.event.ConnectionSpecificEvent)1 TargetAtomSpecificEvent (won.bot.framework.eventbot.event.TargetAtomSpecificEvent)1 MessageCommandEvent (won.bot.framework.eventbot.event.impl.command.MessageCommandEvent)1