@Test public void testDefaultDestination() { MessageEvent evt = new MessageEvent(null, "hello there"); assertEquals("Default destination should be 'app.event.sensor.messages.callout'", "app.event.sensor.messages.callout", evt.getDefaultDestination()); }
@Override public String getDefaultDestination() { String type = ""; try { type = "." + getPayload().getStatements(MESSAGE_TYPE).get(0).getValue().toLowerCase().trim(); } catch (Exception e) { type = ""; } return "app.event.sensor.messages" + type; }
MessageEvent extends EventTemplate { @Override public String getDefaultDestination() { String type = ""; try { type = "." + getPayload().getStatements(MESSAGE_TYPE).get(0).getValue().toLowerCase().trim(); } catch (Exception e) { type = ""; } return "app.event.sensor.messages" + type; } }
MessageEvent extends EventTemplate { @Override public String getDefaultDestination() { String type = ""; try { type = "." + getPayload().getStatements(MESSAGE_TYPE).get(0).getValue().toLowerCase().trim(); } catch (Exception e) { type = ""; } return "app.event.sensor.messages" + type; } MessageEvent(Object source, String message); }
MessageEvent extends EventTemplate { @Override public String getDefaultDestination() { String type = ""; try { type = "." + getPayload().getStatements(MESSAGE_TYPE).get(0).getValue().toLowerCase().trim(); } catch (Exception e) { type = ""; } return "app.event.sensor.messages" + type; } MessageEvent(Object source, String message); void setType(String type); void setLevel(String level); void setExpiration(long expires); void setFrom(String from); void setTo(String to); void setAttachmentPath(String path); void setAttachmentPath(File attachment); String getFrom(); String getTo(); String getText(); String getAttachmentPath(); @Override String getDefaultDestination(); }
MessageEvent extends EventTemplate { @Override public String getDefaultDestination() { String type = ""; try { type = "." + getPayload().getStatements(MESSAGE_TYPE).get(0).getValue().toLowerCase().trim(); } catch (Exception e) { type = ""; } return "app.event.sensor.messages" + type; } MessageEvent(Object source, String message); void setType(String type); void setLevel(String level); void setExpiration(long expires); void setFrom(String from); void setTo(String to); void setAttachmentPath(String path); void setAttachmentPath(File attachment); String getFrom(); String getTo(); String getText(); String getAttachmentPath(); @Override String getDefaultDestination();  }