use of won.bot.framework.eventbot.event.AtomSpecificEvent 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();
}
Aggregations