Beispiel #1
0
 private void sendEvent(Event event) {
   OteEventMessage message = OteEventMessageUtil.getOteEventMessage(event);
   if (message != null) {
     try {
       UUID id = OteEventMessageUtil.getUUID(message);
       if (!id.equals(MYID)) {
         OteEventMessageUtil.setUUID(message, MYID);
         connecitonNode.getConnectionNode().send(BridgeMessages.BYTE_MESSAGE, message.getData());
       }
     } catch (OseeCoreException e) {
       e.printStackTrace();
     }
   }
 }
Beispiel #2
0
 @Override
 public void process(
     Object message, Map<String, Object> headers, ReplyConnection replyConnection) {
   if (message instanceof byte[]) {
     OteEventMessage msg = new OteEventMessage((byte[]) message);
     UUID id = OteEventMessageUtil.getUUID(msg);
     if (!id.equals(MYID)) {
       OteEventMessageUtil.setUUID(msg, MYID);
       Map<String, Object> data = new HashMap<>();
       data.put(OteEventMessageUtil.BYTE_KEY, msg.getData());
       Event newevent = new Event(msg.getHeader().TOPIC.getValue(), data);
       eventAdmin.sendEvent(newevent);
     }
   } else {
     OseeLog.log(
         EventToJmsComponent.class, Level.SEVERE, "not a recognized message" + message.getClass());
   }
 }