Commits

Boris FELD committed 5ad144d

Process agent repository event in ZeroMQKernelAgent

Comments (0)

Files changed (1)

src/zeromq/src/main/java/org/janusproject/kernel/network/zeromq/agent/ZeroMQKernelAgent.java

 				catch (Exception e) {
 					logger.fine(Throwables.toString(e));
 				}
+			} else if (evt.getChangedObject() instanceof AgentAddress) {
+				try {
+					AgentAddress agent = (AgentAddress) evt.getChangedObject();
+					this.adapter.informLocalAgent(agent);
+				}
+				catch (AssertionError ae) {
+					throw ae;
+				}
+				catch (Exception e) {
+					logger.fine(Throwables.toString(e));
+				}
 			}
 		}
 		else if (evt.getType() == ChangeType.REMOVE) {
 				catch (Exception e) {
 					logger.fine(Throwables.toString(e));
 				}
+			} else if (evt.getChangedObject() instanceof AgentAddress) {
+				try {
+					AgentAddress agent = (AgentAddress) evt.getChangedObject();					
+					this.adapter.informLocalAgentRemoved(agent);
+				}
+				catch (AssertionError ae) {
+					throw ae;
+				}
+				catch (Exception e) {
+					logger.fine(Throwables.toString(e));
+				}
 			}
 		}
 	}