/** * Sets the <code>NetworkSettings</code> of the <code>MessageDestination</code>. * * @param networkSettings The <code>NetworkSettings</code> of the <code>MessageDestination</code> */ public void setNetworkSettings(NetworkSettings networkSettings) { super.setNetworkSettings(networkSettings); // Set throttle and subscription manager settings if needed if (networkSettings.getThrottleSettings() != null) { ThrottleSettings settings = networkSettings.getThrottleSettings(); settings.setDestinationName(getId()); throttleManager.setThrottleSettings(settings); } if (networkSettings.getSubscriptionTimeoutMinutes() > 0) { long subscriptionTimeoutMillis = networkSettings.getSubscriptionTimeoutMinutes() * 60 * 1000; // Convert to millis. subscriptionManager.setSubscriptionTimeoutMillis(subscriptionTimeoutMillis); } }
/** * Sets up the throttle manager before it starts. */ @Override public void start() { // Create the throttle manager, only if needed. if (networkSettings.getThrottleSettings() != null) { ThrottleSettings settings = networkSettings.getThrottleSettings(); if (settings.isClientThrottleEnabled() || settings.isDestinationThrottleEnabled()) { settings.setDestinationName(getId()); throttleManager = createThrottleManager(); throttleManager.setThrottleSettings(settings); throttleManager.start(); } } super.start(); }
/** * Sets up the throttle manager before it starts. */ @Override public void start() { // Create the throttle manager, only if needed. if (networkSettings.getThrottleSettings() != null) { ThrottleSettings settings = networkSettings.getThrottleSettings(); if (settings.isClientThrottleEnabled() || settings.isDestinationThrottleEnabled()) { settings.setDestinationName(getId()); throttleManager = createThrottleManager(); throttleManager.setThrottleSettings(settings); throttleManager.start(); } } super.start(); }
protected void network(ConfigMap properties) { ConfigMap network = properties.getPropertyAsMap(NetworkSettings.NETWORK_ELEMENT, null); if (network != null) { // Get implementation specific network settings, including subclasses! NetworkSettings ns = getNetworkSettings(); // Subscriber timeout; first check for subscription-timeout-minutes and fallback to legacy session-timeout. int useLegacyPropertyToken = -999999; int subscriptionTimeoutMinutes = network.getPropertyAsInt(NetworkSettings.SUBSCRIPTION_TIMEOUT_MINUTES, useLegacyPropertyToken); if (subscriptionTimeoutMinutes == useLegacyPropertyToken) subscriptionTimeoutMinutes = network.getPropertyAsInt(NetworkSettings.SESSION_TIMEOUT, NetworkSettings.DEFAULT_TIMEOUT); ns.setSubscriptionTimeoutMinutes(subscriptionTimeoutMinutes); // Throttle Settings throttle(ns.getThrottleSettings(), network); setNetworkSettings(ns); } }
protected void network(ConfigMap properties) { ConfigMap network = properties.getPropertyAsMap(NetworkSettings.NETWORK_ELEMENT, null); if (network == null) return; // Get implementation specific network settings, including subclasses! NetworkSettings ns = getNetworkSettings(); // Subscriber timeout; first check for subscription-timeout-minutes and fallback to legacy session-timeout. int useLegacyPropertyToken = -999999; int subscriptionTimeoutMinutes = network.getPropertyAsInt(NetworkSettings.SUBSCRIPTION_TIMEOUT_MINUTES, useLegacyPropertyToken); if (subscriptionTimeoutMinutes == useLegacyPropertyToken) subscriptionTimeoutMinutes = network.getPropertyAsInt(NetworkSettings.SESSION_TIMEOUT, NetworkSettings.DEFAULT_TIMEOUT); ns.setSubscriptionTimeoutMinutes(subscriptionTimeoutMinutes); // Throttle Settings ThrottleSettings ts = ns.getThrottleSettings(); ts.setDestinationName(getId()); throttle(ts, network); setNetworkSettings(ns); }
protected void network(ConfigMap properties) { ConfigMap network = properties.getPropertyAsMap(NetworkSettings.NETWORK_ELEMENT, null); if (network == null) return; // Get implementation specific network settings, including subclasses! NetworkSettings ns = getNetworkSettings(); // Subscriber timeout; first check for subscription-timeout-minutes and fallback to legacy session-timeout. int useLegacyPropertyToken = -999999; int subscriptionTimeoutMinutes = network.getPropertyAsInt(NetworkSettings.SUBSCRIPTION_TIMEOUT_MINUTES, useLegacyPropertyToken); if (subscriptionTimeoutMinutes == useLegacyPropertyToken) subscriptionTimeoutMinutes = network.getPropertyAsInt(NetworkSettings.SESSION_TIMEOUT, NetworkSettings.DEFAULT_TIMEOUT); ns.setSubscriptionTimeoutMinutes(subscriptionTimeoutMinutes); // Throttle Settings ThrottleSettings ts = ns.getThrottleSettings(); ts.setDestinationName(getId()); throttle(ts, network); setNetworkSettings(ns); }
ThrottleSettings ts = destination.getNetworkSettings().getThrottleSettings(); if (ts.getOutboundPolicy() != Policy.NONE && (ts.isOutboundClientThrottleEnabled() || si.maxFrequency > 0))
ThrottleSettings ts = destination.getNetworkSettings().getThrottleSettings(); if (ts.getOutboundPolicy() != Policy.NONE && (ts.isOutboundClientThrottleEnabled() || si.maxFrequency > 0))