Пример #1
0
 public synchronized void bindConnectionNode(OteServerJmsNodeProvider connectionNode) {
   this.connecitonNode = connectionNode;
   connecitonNode.getConnectionNode().subscribe(BridgeMessages.BYTE_MESSAGE, this);
   for (Event event : eventQueue) {
     sendEvent(event);
   }
   eventQueue.clear();
 }
Пример #2
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();
     }
   }
 }
Пример #3
0
 public synchronized void unbindConnectionNode(OteServerJmsNodeProvider connectionNode) {
   connecitonNode.getConnectionNode().unsubscribe(BridgeMessages.BYTE_MESSAGE, this);
   this.connecitonNode = null;
 }