@Override public void handleProxyUpdate(ObjectName objectName, Class interfaceClass, Object proxyObject, FederationComponent newVal, FederationComponent oldVal) { distributedSystemBridge.updateGatewayReceiver(objectName, newVal, oldVal); }
@Override public void handleProxyUpdate(ObjectName objectName, Class interfaceClass, Object proxyObject, FederationComponent newVal, FederationComponent oldVal) { distributedSystemBridge.updateGatewayReceiver(objectName, newVal, oldVal); }
/** * Add a proxy to the map to be used by bridge. * * @param objectName * object name of the proxy * @param proxy * actual proxy instance */ public void addGatewayReceiverToSystem(ObjectName objectName, GatewayReceiverMXBean proxy, FederationComponent newState) { if (mapOfGatewayReceivers != null) { mapOfGatewayReceivers.put(objectName, proxy); gatewayReceiverSetSize = mapOfGatewayReceivers.values().size(); } updateGatewayReceiver(objectName, newState, null); }
/** * Add a proxy to the map to be used by bridge. * * @param objectName * object name of the proxy * @param proxy * actual proxy instance */ public void addGatewayReceiverToSystem(ObjectName objectName, GatewayReceiverMXBean proxy, FederationComponent newState) { if (mapOfGatewayReceivers != null) { mapOfGatewayReceivers.put(objectName, proxy); gatewayReceiverSetSize = mapOfGatewayReceivers.values().size(); } updateGatewayReceiver(objectName, newState, null); }
/** * Removed the proxy from the map. * * @param objectName * name of the proxy to be removed. * @param proxy * actual reference to the proxy object * @return whether all proxies have been removed or not. In this case it will * always be false. Kept it for consistency for MBeanAggregator. */ public boolean removeGatewayReceiverFromSystem(ObjectName objectName, GatewayReceiverMXBean proxy, FederationComponent oldState) { if (mapOfGatewayReceivers != null) { mapOfGatewayReceivers.remove(objectName); gatewayReceiverSetSize = mapOfGatewayReceivers.values().size(); if (mapOfGatewayReceivers.values().size() == 0) { gatewayReceiverSetSize = 0; return true; } } updateGatewayReceiver(objectName, null, oldState); return false; }
/** * Removed the proxy from the map. * * @param objectName * name of the proxy to be removed. * @param proxy * actual reference to the proxy object * @return whether all proxies have been removed or not. In this case it will * always be false. Kept it for consistency for MBeanAggregator. */ public boolean removeGatewayReceiverFromSystem(ObjectName objectName, GatewayReceiverMXBean proxy, FederationComponent oldState) { if (mapOfGatewayReceivers != null) { mapOfGatewayReceivers.remove(objectName); gatewayReceiverSetSize = mapOfGatewayReceivers.values().size(); if (mapOfGatewayReceivers.values().size() == 0) { gatewayReceiverSetSize = 0; return true; } } updateGatewayReceiver(objectName, null, oldState); return false; }