flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cd...@apache.org
Subject [20/51] [partial] FLEX-34306 - [BlazeDS] Make the BlazeDS build run on Windows machines - Added some mkdir commands to the ANT Build.java - Did some fine-tuning to resolve some compile errors
Date Mon, 05 May 2014 20:08:34 GMT
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/4f6a3052/modules/core/src/flex/messaging/client/FlexClientOutboundQueueProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/flex/messaging/client/FlexClientOutboundQueueProcessor.java b/modules/core/src/flex/messaging/client/FlexClientOutboundQueueProcessor.java
old mode 100755
new mode 100644
index 059c3ef..8a5b399
--- a/modules/core/src/flex/messaging/client/FlexClientOutboundQueueProcessor.java
+++ b/modules/core/src/flex/messaging/client/FlexClientOutboundQueueProcessor.java
@@ -1,347 +1,347 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package flex.messaging.client;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import flex.messaging.Destination;
-import flex.messaging.MessageClient;
-import flex.messaging.MessageDestination;
-import flex.messaging.config.ConfigMap;
-import flex.messaging.messages.Message;
-import flex.messaging.services.messaging.ThrottleManager;
-import flex.messaging.services.messaging.ThrottleManager.ThrottleResult;
-import flex.messaging.services.messaging.ThrottleManager.ThrottleResult.Result;
-
-/**
- * The base FlexClientOutboundQueueProcessor implementation used if a custom implementation is not
- * specified. Its behavior is very simple. It adds all new messages in order to the tail
- * of the outbound queue and flushes all queued messages to the network as quickly as possible.
- * It also handles the outbound client-level throttling specified at the destination level.
- *
- * @author shodgson
- */
-public class FlexClientOutboundQueueProcessor
-{
-    //--------------------------------------------------------------------------
-    //
-    // Variables
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     * The associated FlexClient.
-     */
-    private FlexClient client;
-
-    /**
-     * The last MessageClient messages were flushed to. This is mainly for faster
-     * lookup.
-     */
-    private MessageClient lastMessageClient;
-
-    /**
-     * The associated endpoint's Id.
-     */
-    private String endpointId;
-
-    /**
-     * Manages throttling of outbound client level messages.
-     */
-    protected OutboundQueueThrottleManager outboundQueueThrottleManager;
-
-    //--------------------------------------------------------------------------
-    //
-    // Public Methods
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     * @exclude
-     * Stores the Id for the outbound queue's endpoint.
-     *
-     * @param value The Id for the outbound queue's endpoint.
-     */
-    public void setEndpointId(String value)
-    {
-        endpointId = value;
-    }
-
-    /**
-     * Returns the Id for the outbound queue's endpoint.
-     *
-     * @return The Id for the outbound queue's endpoint.
-     */
-    public String getEndpointId()
-    {
-        return endpointId;
-    }
-
-    /**
-     * @exclude
-     * Sets the associated FlexClient.
-     *
-     * @param value The associated FlexClient.
-     */
-    public void setFlexClient(FlexClient value)
-    {
-        client = value;
-    }
-
-    /**
-     * Returns the associated FlexClient.
-     *
-     * @return The associated FlexClient.
-     */
-    public FlexClient getFlexClient()
-    {
-        return client;
-    }
-
-    /**
-     * Returns the outbound queue throttle manager, or null if one does not exist.
-     *
-     * @return The outbound queue throttle manager.
-     */
-    public OutboundQueueThrottleManager getOutboundQueueThrottleManager()
-    {
-       return outboundQueueThrottleManager;
-    }
-
-    /**
-     * Utility method to initialize (if necessary) and return an outbound queue
-     * throttle manager.
-     *
-     * @return The outbound queue throttle manager.
-     */
-    public OutboundQueueThrottleManager getOrCreateOutboundQueueThrottleManager()
-    {
-        if (outboundQueueThrottleManager == null)
-            outboundQueueThrottleManager = new OutboundQueueThrottleManager(this);
-        return outboundQueueThrottleManager;
-    }
-
-    /**
-     * No-op; this default implementation doesn't require custom initialization.
-     * Subclasses may override to process any custom initialization properties that have been
-     * defined in the server configuration.
-     *
-     * @param properties A ConfigMap containing any custom initialization properties.
-     */
-    public void initialize(ConfigMap properties) {}
-
-    /**
-     * Always adds a new message to the tail of the queue.
-     *
-     * @param outboundQueue The queue of outbound messages.
-     * @param message The new message to add to the queue.
-     */
-    public void add(List<Message> outboundQueue, Message message)
-    {
-        outboundQueue.add(message);
-    }
-
-    /**
-     * Always empties the queue and returns all messages to be sent to the client.
-     *
-     * @param outboundQueue The queue of outbound messages.
-     * @return A FlushResult containing the messages that have been removed from the outbound queue
-     *         to be written to the network and a wait time for the next flush of the outbound queue
-     *         that is the default for the underlying Channel/Endpoint.
-     */
-    public FlushResult flush(List<Message> outboundQueue)
-    {
-        return flush(null /* no client distinction */, outboundQueue);
-    }
-
-    /**
-     * Removes all messages in the queue targeted to this specific MessageClient subscription(s) and
-     * returns them to be sent to the client.
-     * Overrides should be careful to only return messages for the specified MessageClient.
-     *
-     * @param messageClient The specific MessageClient to return messages for.
-     * @param outboundQueue The queue of outbound messages.
-     * @return A FlushResult containing the messages that have been removed from the outbound queue
-     *         to be written to the network for this MessageClient.
-     */
-    public FlushResult flush(MessageClient messageClient, List<Message> outboundQueue)
-    {
-        FlushResult flushResult = new FlushResult();
-        List<Message> messagesToFlush = null;
-
-        for (Iterator<Message> iter = outboundQueue.iterator(); iter.hasNext();)
-        {
-            Message message = iter.next();
-            if (messageClient == null || (message.getClientId().equals(messageClient.getClientId())))
-            {
-                if (isMessageExpired(message)) // Don't flush expired messages.
-                {
-                    iter.remove();
-                    continue;
-                }
-
-                messageClient = messageClient == null? getMessageClient(message) : messageClient;
-
-                // First, apply the destination level outbound throttling.
-                ThrottleResult throttleResult = throttleOutgoingDestinationLevel(messageClient, message, false);
-                Result result = throttleResult.getResult();
-
-                // No destination level throttling; check destination-client level throttling.
-                if (Result.OK == result)
-                {
-                    throttleResult = throttleOutgoingClientLevel(messageClient, message, false);
-                    result = throttleResult.getResult();
-                    // If no throttling, simply add the message to the list.
-                    if (Result.OK == result)
-                    {
-                        updateMessageFrequencyOutgoing(messageClient, message);
-                        if (messagesToFlush == null)
-                            messagesToFlush = new ArrayList<Message>();
-                        messagesToFlush.add(message);
-                    }
-                    // In rest of the policies (which is NONE), simply don't
-                    // add the message to the list.
-                }
-                iter.remove();
-            }
-        }
-
-        flushResult.setMessages(messagesToFlush);
-        return flushResult;
-    }
-
-    /**
-     * Utility method to test whether a message has expired or not.
-     * Messages with a timeToLive value that is shorter than the timespan from the message's
-     * timestamp up to the current system time will cause this method to return true.
-     * If there are expired messages in the outbound queue, flush implementations
-     * should use this helper method to only process and return messages that have
-     * not yet expired.
-     *
-     * @param message The message to test for expiration.
-     *
-     * @return true if the message has a timeToLive value that has expired; otherwise false.
-     */
-    public boolean isMessageExpired(Message message)
-    {
-        return (message.getTimeToLive() > 0 && (System.currentTimeMillis() - message.getTimestamp()) >= message.getTimeToLive());
-    }
-
-    /**
-     * Attempts to throttle the outgoing message at the destination level.
-     *
-     * @param msgClient The client the message is intended for.
-     * @param message The message to consider to throttle.
-     * @param buffered Whether the message has already been buffered. In that case,
-     * parts of regular throttling code is skipped.
-     * @return The result of throttling attempt.
-     */
-    protected ThrottleResult throttleOutgoingDestinationLevel(MessageClient msgClient, Message message, boolean buffered)
-    {
-        ThrottleManager throttleManager = getThrottleManager(msgClient);
-        if (throttleManager != null)
-        {
-            // In already buffered messages, don't use ThrottleManager#throttleOutgoingMessage
-            // to avoid regular throttling handling as the message has already been buffered.
-            if (buffered)
-                return throttleManager.throttleDestinationLevel(message, false /*incoming*/);
-
-            // Otherwise, regular throttling.
-            return throttleManager.throttleOutgoingMessage(message);
-        }
-        return new ThrottleResult(); // Otherwise, return OK result.
-    }
-
-    /**
-     * Attempts to throttle the outgoing message at the destination-client level.
-     *
-     * @param msgClient The client the message is intended for.
-     * @param message The message to consider to throttle.
-     * @param buffered Whether the message has already been buffered. In that case,
-     * parts of regular throttling code is skipped.
-     * @return The result of throttling attempt.
-     */
-    protected ThrottleResult throttleOutgoingClientLevel(MessageClient msgClient, Message message, boolean buffered)
-    {
-        if (outboundQueueThrottleManager != null) // Means client level throttling enabled.
-        {
-            ThrottleResult throttleResult = outboundQueueThrottleManager.throttleOutgoingClientLevel(message);
-            if (!buffered)
-            {
-                ThrottleManager throttleManager = getThrottleManager(msgClient);
-                if (throttleManager != null)
-                    throttleManager.handleOutgoingThrottleResult(message, throttleResult, true /*isClientLevel*/);
-            }
-            return throttleResult;
-        }
-        return new ThrottleResult(); // Otherwise, return OK result.
-    }
-
-    /**
-     * Returns the message client that the message is intended to.
-     *
-     * @param message The message.
-     * @return The message client that the message is intended to.
-     */
-    protected MessageClient getMessageClient(Message message)
-    {
-        // First try using the cached message client.
-        if (lastMessageClient != null && message.getClientId().equals(lastMessageClient.getClientId()))
-        {
-            return lastMessageClient;
-        }
-        else // Go ahead with the lookup.
-        {
-            lastMessageClient = client.getMessageClient((String)message.getClientId());
-            return lastMessageClient;
-        } 
-    }
-
-    /**
-     * Returns the throttle manager associated with the destination the message
-     * is intended to.
-     *
-     * @param msgClient The message client; it can be null.
-     * @return The throttle manager.
-     */
-    protected ThrottleManager getThrottleManager(MessageClient msgClient)
-    {
-        Destination destination = msgClient != null? msgClient.getDestination() : null;
-        return (destination != null && destination instanceof MessageDestination)? 
-                ((MessageDestination)destination).getThrottleManager() : null;
-    }
-
-    /**
-     * Updates the outgoing message's message frequency.
-     *
-     * @param msgClient The MessageClient that might have been passed to the flush; it can be null.
-     * @param message The message.
-     */
-    protected void updateMessageFrequencyOutgoing(MessageClient msgClient, Message message)
-    {
-        // Update the destination level message frequency.
-        ThrottleManager throttleManager = getThrottleManager(msgClient);
-        if (throttleManager != null)
-            throttleManager.updateMessageFrequencyDestinationLevel(false /*incoming*/);
-
-        // Update the client level message frequency.
-        if (outboundQueueThrottleManager != null)
-            outboundQueueThrottleManager.updateMessageFrequencyOutgoingClientLevel(message);
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package flex.messaging.client;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import flex.messaging.Destination;
+import flex.messaging.MessageClient;
+import flex.messaging.MessageDestination;
+import flex.messaging.config.ConfigMap;
+import flex.messaging.messages.Message;
+import flex.messaging.services.messaging.ThrottleManager;
+import flex.messaging.services.messaging.ThrottleManager.ThrottleResult;
+import flex.messaging.services.messaging.ThrottleManager.ThrottleResult.Result;
+
+/**
+ * The base FlexClientOutboundQueueProcessor implementation used if a custom implementation is not
+ * specified. Its behavior is very simple. It adds all new messages in order to the tail
+ * of the outbound queue and flushes all queued messages to the network as quickly as possible.
+ * It also handles the outbound client-level throttling specified at the destination level.
+ *
+ * @author shodgson
+ */
+public class FlexClientOutboundQueueProcessor
+{
+    //--------------------------------------------------------------------------
+    //
+    // Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     * The associated FlexClient.
+     */
+    private FlexClient client;
+
+    /**
+     * The last MessageClient messages were flushed to. This is mainly for faster
+     * lookup.
+     */
+    private MessageClient lastMessageClient;
+
+    /**
+     * The associated endpoint's Id.
+     */
+    private String endpointId;
+
+    /**
+     * Manages throttling of outbound client level messages.
+     */
+    protected OutboundQueueThrottleManager outboundQueueThrottleManager;
+
+    //--------------------------------------------------------------------------
+    //
+    // Public Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     * @exclude
+     * Stores the Id for the outbound queue's endpoint.
+     *
+     * @param value The Id for the outbound queue's endpoint.
+     */
+    public void setEndpointId(String value)
+    {
+        endpointId = value;
+    }
+
+    /**
+     * Returns the Id for the outbound queue's endpoint.
+     *
+     * @return The Id for the outbound queue's endpoint.
+     */
+    public String getEndpointId()
+    {
+        return endpointId;
+    }
+
+    /**
+     * @exclude
+     * Sets the associated FlexClient.
+     *
+     * @param value The associated FlexClient.
+     */
+    public void setFlexClient(FlexClient value)
+    {
+        client = value;
+    }
+
+    /**
+     * Returns the associated FlexClient.
+     *
+     * @return The associated FlexClient.
+     */
+    public FlexClient getFlexClient()
+    {
+        return client;
+    }
+
+    /**
+     * Returns the outbound queue throttle manager, or null if one does not exist.
+     *
+     * @return The outbound queue throttle manager.
+     */
+    public OutboundQueueThrottleManager getOutboundQueueThrottleManager()
+    {
+       return outboundQueueThrottleManager;
+    }
+
+    /**
+     * Utility method to initialize (if necessary) and return an outbound queue
+     * throttle manager.
+     *
+     * @return The outbound queue throttle manager.
+     */
+    public OutboundQueueThrottleManager getOrCreateOutboundQueueThrottleManager()
+    {
+        if (outboundQueueThrottleManager == null)
+            outboundQueueThrottleManager = new OutboundQueueThrottleManager(this);
+        return outboundQueueThrottleManager;
+    }
+
+    /**
+     * No-op; this default implementation doesn't require custom initialization.
+     * Subclasses may override to process any custom initialization properties that have been
+     * defined in the server configuration.
+     *
+     * @param properties A ConfigMap containing any custom initialization properties.
+     */
+    public void initialize(ConfigMap properties) {}
+
+    /**
+     * Always adds a new message to the tail of the queue.
+     *
+     * @param outboundQueue The queue of outbound messages.
+     * @param message The new message to add to the queue.
+     */
+    public void add(List<Message> outboundQueue, Message message)
+    {
+        outboundQueue.add(message);
+    }
+
+    /**
+     * Always empties the queue and returns all messages to be sent to the client.
+     *
+     * @param outboundQueue The queue of outbound messages.
+     * @return A FlushResult containing the messages that have been removed from the outbound queue
+     *         to be written to the network and a wait time for the next flush of the outbound queue
+     *         that is the default for the underlying Channel/Endpoint.
+     */
+    public FlushResult flush(List<Message> outboundQueue)
+    {
+        return flush(null /* no client distinction */, outboundQueue);
+    }
+
+    /**
+     * Removes all messages in the queue targeted to this specific MessageClient subscription(s) and
+     * returns them to be sent to the client.
+     * Overrides should be careful to only return messages for the specified MessageClient.
+     *
+     * @param messageClient The specific MessageClient to return messages for.
+     * @param outboundQueue The queue of outbound messages.
+     * @return A FlushResult containing the messages that have been removed from the outbound queue
+     *         to be written to the network for this MessageClient.
+     */
+    public FlushResult flush(MessageClient messageClient, List<Message> outboundQueue)
+    {
+        FlushResult flushResult = new FlushResult();
+        List<Message> messagesToFlush = null;
+
+        for (Iterator<Message> iter = outboundQueue.iterator(); iter.hasNext();)
+        {
+            Message message = iter.next();
+            if (messageClient == null || (message.getClientId().equals(messageClient.getClientId())))
+            {
+                if (isMessageExpired(message)) // Don't flush expired messages.
+                {
+                    iter.remove();
+                    continue;
+                }
+
+                messageClient = messageClient == null? getMessageClient(message) : messageClient;
+
+                // First, apply the destination level outbound throttling.
+                ThrottleResult throttleResult = throttleOutgoingDestinationLevel(messageClient, message, false);
+                Result result = throttleResult.getResult();
+
+                // No destination level throttling; check destination-client level throttling.
+                if (Result.OK == result)
+                {
+                    throttleResult = throttleOutgoingClientLevel(messageClient, message, false);
+                    result = throttleResult.getResult();
+                    // If no throttling, simply add the message to the list.
+                    if (Result.OK == result)
+                    {
+                        updateMessageFrequencyOutgoing(messageClient, message);
+                        if (messagesToFlush == null)
+                            messagesToFlush = new ArrayList<Message>();
+                        messagesToFlush.add(message);
+                    }
+                    // In rest of the policies (which is NONE), simply don't
+                    // add the message to the list.
+                }
+                iter.remove();
+            }
+        }
+
+        flushResult.setMessages(messagesToFlush);
+        return flushResult;
+    }
+
+    /**
+     * Utility method to test whether a message has expired or not.
+     * Messages with a timeToLive value that is shorter than the timespan from the message's
+     * timestamp up to the current system time will cause this method to return true.
+     * If there are expired messages in the outbound queue, flush implementations
+     * should use this helper method to only process and return messages that have
+     * not yet expired.
+     *
+     * @param message The message to test for expiration.
+     *
+     * @return true if the message has a timeToLive value that has expired; otherwise false.
+     */
+    public boolean isMessageExpired(Message message)
+    {
+        return (message.getTimeToLive() > 0 && (System.currentTimeMillis() - message.getTimestamp()) >= message.getTimeToLive());
+    }
+
+    /**
+     * Attempts to throttle the outgoing message at the destination level.
+     *
+     * @param msgClient The client the message is intended for.
+     * @param message The message to consider to throttle.
+     * @param buffered Whether the message has already been buffered. In that case,
+     * parts of regular throttling code is skipped.
+     * @return The result of throttling attempt.
+     */
+    protected ThrottleResult throttleOutgoingDestinationLevel(MessageClient msgClient, Message message, boolean buffered)
+    {
+        ThrottleManager throttleManager = getThrottleManager(msgClient);
+        if (throttleManager != null)
+        {
+            // In already buffered messages, don't use ThrottleManager#throttleOutgoingMessage
+            // to avoid regular throttling handling as the message has already been buffered.
+            if (buffered)
+                return throttleManager.throttleDestinationLevel(message, false /*incoming*/);
+
+            // Otherwise, regular throttling.
+            return throttleManager.throttleOutgoingMessage(message);
+        }
+        return new ThrottleResult(); // Otherwise, return OK result.
+    }
+
+    /**
+     * Attempts to throttle the outgoing message at the destination-client level.
+     *
+     * @param msgClient The client the message is intended for.
+     * @param message The message to consider to throttle.
+     * @param buffered Whether the message has already been buffered. In that case,
+     * parts of regular throttling code is skipped.
+     * @return The result of throttling attempt.
+     */
+    protected ThrottleResult throttleOutgoingClientLevel(MessageClient msgClient, Message message, boolean buffered)
+    {
+        if (outboundQueueThrottleManager != null) // Means client level throttling enabled.
+        {
+            ThrottleResult throttleResult = outboundQueueThrottleManager.throttleOutgoingClientLevel(message);
+            if (!buffered)
+            {
+                ThrottleManager throttleManager = getThrottleManager(msgClient);
+                if (throttleManager != null)
+                    throttleManager.handleOutgoingThrottleResult(message, throttleResult, true /*isClientLevel*/);
+            }
+            return throttleResult;
+        }
+        return new ThrottleResult(); // Otherwise, return OK result.
+    }
+
+    /**
+     * Returns the message client that the message is intended to.
+     *
+     * @param message The message.
+     * @return The message client that the message is intended to.
+     */
+    protected MessageClient getMessageClient(Message message)
+    {
+        // First try using the cached message client.
+        if (lastMessageClient != null && message.getClientId().equals(lastMessageClient.getClientId()))
+        {
+            return lastMessageClient;
+        }
+        else // Go ahead with the lookup.
+        {
+            lastMessageClient = client.getMessageClient((String)message.getClientId());
+            return lastMessageClient;
+        } 
+    }
+
+    /**
+     * Returns the throttle manager associated with the destination the message
+     * is intended to.
+     *
+     * @param msgClient The message client; it can be null.
+     * @return The throttle manager.
+     */
+    protected ThrottleManager getThrottleManager(MessageClient msgClient)
+    {
+        Destination destination = msgClient != null? msgClient.getDestination() : null;
+        return (destination != null && destination instanceof MessageDestination)? 
+                ((MessageDestination)destination).getThrottleManager() : null;
+    }
+
+    /**
+     * Updates the outgoing message's message frequency.
+     *
+     * @param msgClient The MessageClient that might have been passed to the flush; it can be null.
+     * @param message The message.
+     */
+    protected void updateMessageFrequencyOutgoing(MessageClient msgClient, Message message)
+    {
+        // Update the destination level message frequency.
+        ThrottleManager throttleManager = getThrottleManager(msgClient);
+        if (throttleManager != null)
+            throttleManager.updateMessageFrequencyDestinationLevel(false /*incoming*/);
+
+        // Update the client level message frequency.
+        if (outboundQueueThrottleManager != null)
+            outboundQueueThrottleManager.updateMessageFrequencyOutgoingClientLevel(message);
+    }
+}

http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/4f6a3052/modules/core/src/flex/messaging/client/FlushResult.java
----------------------------------------------------------------------
diff --git a/modules/core/src/flex/messaging/client/FlushResult.java b/modules/core/src/flex/messaging/client/FlushResult.java
old mode 100755
new mode 100644
index 6dd8cad..ab400fa
--- a/modules/core/src/flex/messaging/client/FlushResult.java
+++ b/modules/core/src/flex/messaging/client/FlushResult.java
@@ -1,117 +1,117 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package flex.messaging.client;
-
-import java.util.List;
-
-import flex.messaging.messages.Message;
-
-/**
- * Stores the messages that should be written to the network as a result of a flush
- * invocation on a FlexClient's outbound queue.
- */
-public class FlushResult
-{
-    //--------------------------------------------------------------------------
-    //
-    // Constructor
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     * Constructs a <tt>FlushResult</tt> instance to return from a
-     * flush invocation on a FlexClient's outbound queue.
-     * This instance stores the list of messages to write over the network to
-     * the client as well as an optional wait time in milliseconds for when the
-     * next flush should be invoked.
-     */
-    public FlushResult() {}
-
-    //--------------------------------------------------------------------------
-    //
-    // Properties
-    //
-    //--------------------------------------------------------------------------
-
-    //----------------------------------
-    //  messages
-    //----------------------------------
-
-    private List<Message> messages;
-
-    /**
-     * Returns the messages to write to the network for this flush invocation.
-     * This list may be null, in which case no messages are written.
-     *
-     * @return The messages to write to the network for this flush invocation.
-     */
-    public List<Message> getMessages()
-    {
-        return messages;
-    }
-
-    /**
-     * Sets the messages to write to the network for this flush invocation.
-     *
-     * @param value The messages to write to the network for this flush invocation.
-     */
-    public void setMessages(List<Message> value)
-    {
-        messages = value;
-    }
-
-    //----------------------------------
-    //  nextFlushWaitTimeMillis
-    //----------------------------------
-
-    private int nextFlushWaitTimeMillis = 0;
-
-    /**
-     * Returns the wait time in milliseconds for when the next flush invocation should occur.
-     * If this value is 0, the default, a delayed flush is not scheduled and the next flush will
-     * depend upon the underlying Channel/Endpoint.
-     * For client-side polling Channels the next flush invocation will happen when the client sends
-     * its next poll request at its regular interval.
-     * For client-side Channels that support direct writes to the client a flush invocation is triggered
-     * when the next message is added to the outbound queue.
-     *
-     * @return The wait time in milliseconds before flush is next invoked. A value of 0, the default,
-     *         indicates that the default flush behavior for the underlying Channel/Endpoint should be
-     *         used.
-     */
-    public int getNextFlushWaitTimeMillis()
-    {
-        return nextFlushWaitTimeMillis;
-    }
-
-    /**
-     * Sets the wait time in milliseconds for when the next flush invocation should occur.
-     * If this value is 0, the default, a delayed flush is not scheduled and the next flush will
-     * depend upon the underlying Channel/Endpoint.
-     * For client-side polling Channels the next flush invocation will happen when the client sends
-     * its next poll request at its regular interval.
-     * For client-side Channels that support direct writes to the client a flush invocation is triggered
-     * when the next message is added to the outbound queue.
-     * Negative value assignments are treated as 0.
-     *
-     * @param value The wait time in milliseconds before flush will be invoked.
-     */
-    public void setNextFlushWaitTimeMillis(int value)
-    {
-        nextFlushWaitTimeMillis = (value < 1) ? 0 : value;
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package flex.messaging.client;
+
+import java.util.List;
+
+import flex.messaging.messages.Message;
+
+/**
+ * Stores the messages that should be written to the network as a result of a flush
+ * invocation on a FlexClient's outbound queue.
+ */
+public class FlushResult
+{
+    //--------------------------------------------------------------------------
+    //
+    // Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     * Constructs a <tt>FlushResult</tt> instance to return from a
+     * flush invocation on a FlexClient's outbound queue.
+     * This instance stores the list of messages to write over the network to
+     * the client as well as an optional wait time in milliseconds for when the
+     * next flush should be invoked.
+     */
+    public FlushResult() {}
+
+    //--------------------------------------------------------------------------
+    //
+    // Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  messages
+    //----------------------------------
+
+    private List<Message> messages;
+
+    /**
+     * Returns the messages to write to the network for this flush invocation.
+     * This list may be null, in which case no messages are written.
+     *
+     * @return The messages to write to the network for this flush invocation.
+     */
+    public List<Message> getMessages()
+    {
+        return messages;
+    }
+
+    /**
+     * Sets the messages to write to the network for this flush invocation.
+     *
+     * @param value The messages to write to the network for this flush invocation.
+     */
+    public void setMessages(List<Message> value)
+    {
+        messages = value;
+    }
+
+    //----------------------------------
+    //  nextFlushWaitTimeMillis
+    //----------------------------------
+
+    private int nextFlushWaitTimeMillis = 0;
+
+    /**
+     * Returns the wait time in milliseconds for when the next flush invocation should occur.
+     * If this value is 0, the default, a delayed flush is not scheduled and the next flush will
+     * depend upon the underlying Channel/Endpoint.
+     * For client-side polling Channels the next flush invocation will happen when the client sends
+     * its next poll request at its regular interval.
+     * For client-side Channels that support direct writes to the client a flush invocation is triggered
+     * when the next message is added to the outbound queue.
+     *
+     * @return The wait time in milliseconds before flush is next invoked. A value of 0, the default,
+     *         indicates that the default flush behavior for the underlying Channel/Endpoint should be
+     *         used.
+     */
+    public int getNextFlushWaitTimeMillis()
+    {
+        return nextFlushWaitTimeMillis;
+    }
+
+    /**
+     * Sets the wait time in milliseconds for when the next flush invocation should occur.
+     * If this value is 0, the default, a delayed flush is not scheduled and the next flush will
+     * depend upon the underlying Channel/Endpoint.
+     * For client-side polling Channels the next flush invocation will happen when the client sends
+     * its next poll request at its regular interval.
+     * For client-side Channels that support direct writes to the client a flush invocation is triggered
+     * when the next message is added to the outbound queue.
+     * Negative value assignments are treated as 0.
+     *
+     * @param value The wait time in milliseconds before flush will be invoked.
+     */
+    public void setNextFlushWaitTimeMillis(int value)
+    {
+        nextFlushWaitTimeMillis = (value < 1) ? 0 : value;
+    }
+}

http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/4f6a3052/modules/core/src/flex/messaging/client/OutboundQueueThrottleManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/flex/messaging/client/OutboundQueueThrottleManager.java b/modules/core/src/flex/messaging/client/OutboundQueueThrottleManager.java
old mode 100755
new mode 100644
index e81a249..24a66d0
--- a/modules/core/src/flex/messaging/client/OutboundQueueThrottleManager.java
+++ b/modules/core/src/flex/messaging/client/OutboundQueueThrottleManager.java
@@ -1,269 +1,269 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package flex.messaging.client;
-
-import java.util.concurrent.ConcurrentHashMap;
-
-import flex.messaging.MessageClient.SubscriptionInfo;
-import flex.messaging.config.ThrottleSettings.Policy;
-import flex.messaging.log.Log;
-import flex.messaging.messages.Message;
-import flex.messaging.services.messaging.MessageFrequency;
-import flex.messaging.services.messaging.ThrottleManager;
-import flex.messaging.services.messaging.ThrottleManager.ThrottleResult;
-import flex.messaging.util.StringUtils;
-
-
-/**
- * Used to keep track of and limit outbound message rates of a single FlexClient queue.
- * An outbound FlexClient queue can contain messages from multiple MessageClients
- * across multiple destinations. It can also contain messages for multiple
- * subscriptions (for each subtopic/selector) across the same destination for
- * the same MessageClient.
- */
-public class OutboundQueueThrottleManager
-{
-    //--------------------------------------------------------------------------
-    //
-    // Constructor
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     * Constructs a default outbound queue throttle manager.
-     *
-     * @param processor The outbound queue processor that is using this throttle manager.
-     */
-    public OutboundQueueThrottleManager(FlexClientOutboundQueueProcessor processor)
-    {
-        destinationFrequencies = new ConcurrentHashMap<String, DestinationFrequency>();
-        this.processor = processor;
-    }
-
-    //--------------------------------------------------------------------------
-    //
-    // Variables
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     * Map of destination id and destination message frequencies.
-     */
-    protected final ConcurrentHashMap<String, DestinationFrequency> destinationFrequencies;
-
-    /**
-     * The parent queue processor of the throttle manager.
-     */
-    protected final FlexClientOutboundQueueProcessor processor;
-
-    //--------------------------------------------------------------------------
-    //
-    // Public Methods
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     * Registers the destination with the outbound throttle manager.
-     *
-     * @param destinationId The id of the destination.
-     * @param outboundMaxClientFrequency The outbound max-client-frequency specified
-     * at the destination.
-     * @param outboundPolicy The outbound throttle policy specified at the destination.
-     */
-    public void registerDestination(String destinationId, int outboundMaxClientFrequency, Policy outboundPolicy)
-    {
-        DestinationFrequency frequency = destinationFrequencies.get(destinationId);
-        if (frequency == null)
-        {
-            frequency = new DestinationFrequency(outboundMaxClientFrequency, outboundPolicy);
-            destinationFrequencies.putIfAbsent(destinationId, frequency);
-        }
-    }
-
-    /**
-     * Registers the subscription of a client talking to a destination with the
-     * specified subscription info.
-     *
-     * @param destinationId The destination id.
-     * @param si The subscription information.
-     */
-    public void registerSubscription(String destinationId, SubscriptionInfo si)
-    {
-        DestinationFrequency frequency = destinationFrequencies.get(destinationId);
-        frequency.logMaxFrequencyDuringRegistration(frequency.outboundMaxClientFrequency, si);
-    }
-
-    /**
-     * Unregisters the subscription.
-     *
-     * @param destinationId The destination id.
-     * @param si The subscription information.
-     */
-    public void unregisterSubscription(String destinationId, SubscriptionInfo si)
-    {
-        unregisterDestination(destinationId);
-    }
-
-    /**
-     * Unregisters all subscriptions of the client under the specified destination.
-     *
-     * @param destinationId The destination id.
-     */
-    public void unregisterAllSubscriptions(String destinationId)
-    {
-        unregisterDestination(destinationId);
-    }
-
-    /**
-     * Attempts to throttle the outgoing message.
-     *
-     * @param message The message to consider to throttle.
-     * @return True if the message was throttled; otherwise false.
-     */
-    public ThrottleResult throttleOutgoingClientLevel(Message message)
-    {
-        String destinationId = message.getDestination();
-        if (isDestinationRegistered(destinationId))
-        {
-            DestinationFrequency frequency = destinationFrequencies.get(message.getDestination());
-            int maxFrequency = frequency.getMaxFrequency(message); // Limit to check against.
-            MessageFrequency messageFrequency = frequency.getMessageFrequency(message); // Message rate of the client.
-            if (messageFrequency != null)
-            {
-                ThrottleResult result = messageFrequency.checkLimit(maxFrequency, frequency.outboundPolicy);
-                return result;
-            }
-        }
-        return new ThrottleResult(); // Otherwise, return OK result.
-    }
-
-    /**
-     * Updates the outgoing client level message frequency of the message.
-     *
-     * @param message The message.
-     */
-    public void updateMessageFrequencyOutgoingClientLevel(Message message)
-    {
-        String destinationId = message.getDestination();
-        if (isDestinationRegistered(destinationId))
-        {
-            DestinationFrequency frequency = destinationFrequencies.get(message.getDestination());
-            MessageFrequency messageFrequency = frequency.getMessageFrequency(message);
-            if (messageFrequency != null)
-                messageFrequency.updateMessageFrequency();
-        }
-    }
-
-    //--------------------------------------------------------------------------
-    //
-    // Protected Methods
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     * Determines whether the destination has been registered or not.
-     *
-     * @param destinationId The destination id.
-     * @return True if the destination with the specified id has been registered.
-     */
-    protected boolean isDestinationRegistered(String destinationId)
-    {
-        return destinationFrequencies.containsKey(destinationId);
-    }
-
-    /**
-     * Unregisters the destination from the outbound throttle manager.
-     *
-     * @param destinationId The id of the destination.
-     */
-    protected void unregisterDestination(String destinationId)
-    {
-        if (isDestinationRegistered(destinationId))
-            destinationFrequencies.remove(destinationId);
-    }
-
-    //--------------------------------------------------------------------------
-    //
-    // Inner Classes
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     * Used to keep track of max-client-frequency and outgoing throttle policy
-     * specified at the destination. It also keeps track of outbound message
-     * rates of all MessageClient subscriptions across the destination.
-     */
-    class DestinationFrequency
-    {
-        protected final int outboundMaxClientFrequency; // destination specified client limit.
-        protected final MessageFrequency outboundClientFrequency;
-        protected final Policy outboundPolicy; // destination specified policy.
-
-        /**
-         * Default constructor.
-         *
-         * @param outboundMaxClientFrequency The outbound throttling max-client-frequency of the destination.
-         * @param outboundPolicy The outbound throttling policy of the destination.
-         */
-        DestinationFrequency(int outboundMaxClientFrequency, Policy outboundPolicy)
-        {
-            this.outboundMaxClientFrequency = outboundMaxClientFrequency;
-            this.outboundPolicy = outboundPolicy;
-            outboundClientFrequency = new MessageFrequency(outboundMaxClientFrequency);
-        }
-
-        /**
-         * Returns the max-client-frequency for the subscription the message is
-         * intended for (which is simply the max-client-frequency specified at 
-         * the destination).
-         *
-         * @param message The message.
-         *
-         * @return The max-frequency for the subscription.
-         */
-        int getMaxFrequency(Message message)
-        {
-            return outboundMaxClientFrequency;
-        }
-
-        /**
-         * Given a subscription the message is intended to, returns the message
-         * rate frequency for that subscription.
-         *
-         * @param message The message.
-         * @return The message frequency for the subscription, if it exists; otherwise null.
-         */
-        MessageFrequency getMessageFrequency(Message message)
-        {
-            return outboundClientFrequency;
-        }
-
-        /**
-         * Utility function to log the maxFrequency being used during subscription.
-         *
-         * @param maxFrequency The maxFrequency to log.
-         */
-        void logMaxFrequencyDuringRegistration(int maxFrequency, SubscriptionInfo si)
-        {
-            if (Log.isDebug())
-                Log.getLogger(ThrottleManager.LOG_CATEGORY).debug("Outbound queue throttle manager for FlexClient '"
-                        + processor.getFlexClient().getId() + "' is using '" + maxFrequency
-                        + "' as the throttling limit for its subscription: "
-                        +  StringUtils.NEWLINE + si);
-        }
-    }
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package flex.messaging.client;
+
+import java.util.concurrent.ConcurrentHashMap;
+
+import flex.messaging.MessageClient.SubscriptionInfo;
+import flex.messaging.config.ThrottleSettings.Policy;
+import flex.messaging.log.Log;
+import flex.messaging.messages.Message;
+import flex.messaging.services.messaging.MessageFrequency;
+import flex.messaging.services.messaging.ThrottleManager;
+import flex.messaging.services.messaging.ThrottleManager.ThrottleResult;
+import flex.messaging.util.StringUtils;
+
+
+/**
+ * Used to keep track of and limit outbound message rates of a single FlexClient queue.
+ * An outbound FlexClient queue can contain messages from multiple MessageClients
+ * across multiple destinations. It can also contain messages for multiple
+ * subscriptions (for each subtopic/selector) across the same destination for
+ * the same MessageClient.
+ */
+public class OutboundQueueThrottleManager
+{
+    //--------------------------------------------------------------------------
+    //
+    // Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     * Constructs a default outbound queue throttle manager.
+     *
+     * @param processor The outbound queue processor that is using this throttle manager.
+     */
+    public OutboundQueueThrottleManager(FlexClientOutboundQueueProcessor processor)
+    {
+        destinationFrequencies = new ConcurrentHashMap<String, DestinationFrequency>();
+        this.processor = processor;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    // Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     * Map of destination id and destination message frequencies.
+     */
+    protected final ConcurrentHashMap<String, DestinationFrequency> destinationFrequencies;
+
+    /**
+     * The parent queue processor of the throttle manager.
+     */
+    protected final FlexClientOutboundQueueProcessor processor;
+
+    //--------------------------------------------------------------------------
+    //
+    // Public Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     * Registers the destination with the outbound throttle manager.
+     *
+     * @param destinationId The id of the destination.
+     * @param outboundMaxClientFrequency The outbound max-client-frequency specified
+     * at the destination.
+     * @param outboundPolicy The outbound throttle policy specified at the destination.
+     */
+    public void registerDestination(String destinationId, int outboundMaxClientFrequency, Policy outboundPolicy)
+    {
+        DestinationFrequency frequency = destinationFrequencies.get(destinationId);
+        if (frequency == null)
+        {
+            frequency = new DestinationFrequency(outboundMaxClientFrequency, outboundPolicy);
+            destinationFrequencies.putIfAbsent(destinationId, frequency);
+        }
+    }
+
+    /**
+     * Registers the subscription of a client talking to a destination with the
+     * specified subscription info.
+     *
+     * @param destinationId The destination id.
+     * @param si The subscription information.
+     */
+    public void registerSubscription(String destinationId, SubscriptionInfo si)
+    {
+        DestinationFrequency frequency = destinationFrequencies.get(destinationId);
+        frequency.logMaxFrequencyDuringRegistration(frequency.outboundMaxClientFrequency, si);
+    }
+
+    /**
+     * Unregisters the subscription.
+     *
+     * @param destinationId The destination id.
+     * @param si The subscription information.
+     */
+    public void unregisterSubscription(String destinationId, SubscriptionInfo si)
+    {
+        unregisterDestination(destinationId);
+    }
+
+    /**
+     * Unregisters all subscriptions of the client under the specified destination.
+     *
+     * @param destinationId The destination id.
+     */
+    public void unregisterAllSubscriptions(String destinationId)
+    {
+        unregisterDestination(destinationId);
+    }
+
+    /**
+     * Attempts to throttle the outgoing message.
+     *
+     * @param message The message to consider to throttle.
+     * @return True if the message was throttled; otherwise false.
+     */
+    public ThrottleResult throttleOutgoingClientLevel(Message message)
+    {
+        String destinationId = message.getDestination();
+        if (isDestinationRegistered(destinationId))
+        {
+            DestinationFrequency frequency = destinationFrequencies.get(message.getDestination());
+            int maxFrequency = frequency.getMaxFrequency(message); // Limit to check against.
+            MessageFrequency messageFrequency = frequency.getMessageFrequency(message); // Message rate of the client.
+            if (messageFrequency != null)
+            {
+                ThrottleResult result = messageFrequency.checkLimit(maxFrequency, frequency.outboundPolicy);
+                return result;
+            }
+        }
+        return new ThrottleResult(); // Otherwise, return OK result.
+    }
+
+    /**
+     * Updates the outgoing client level message frequency of the message.
+     *
+     * @param message The message.
+     */
+    public void updateMessageFrequencyOutgoingClientLevel(Message message)
+    {
+        String destinationId = message.getDestination();
+        if (isDestinationRegistered(destinationId))
+        {
+            DestinationFrequency frequency = destinationFrequencies.get(message.getDestination());
+            MessageFrequency messageFrequency = frequency.getMessageFrequency(message);
+            if (messageFrequency != null)
+                messageFrequency.updateMessageFrequency();
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    // Protected Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     * Determines whether the destination has been registered or not.
+     *
+     * @param destinationId The destination id.
+     * @return True if the destination with the specified id has been registered.
+     */
+    protected boolean isDestinationRegistered(String destinationId)
+    {
+        return destinationFrequencies.containsKey(destinationId);
+    }
+
+    /**
+     * Unregisters the destination from the outbound throttle manager.
+     *
+     * @param destinationId The id of the destination.
+     */
+    protected void unregisterDestination(String destinationId)
+    {
+        if (isDestinationRegistered(destinationId))
+            destinationFrequencies.remove(destinationId);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    // Inner Classes
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     * Used to keep track of max-client-frequency and outgoing throttle policy
+     * specified at the destination. It also keeps track of outbound message
+     * rates of all MessageClient subscriptions across the destination.
+     */
+    class DestinationFrequency
+    {
+        protected final int outboundMaxClientFrequency; // destination specified client limit.
+        protected final MessageFrequency outboundClientFrequency;
+        protected final Policy outboundPolicy; // destination specified policy.
+
+        /**
+         * Default constructor.
+         *
+         * @param outboundMaxClientFrequency The outbound throttling max-client-frequency of the destination.
+         * @param outboundPolicy The outbound throttling policy of the destination.
+         */
+        DestinationFrequency(int outboundMaxClientFrequency, Policy outboundPolicy)
+        {
+            this.outboundMaxClientFrequency = outboundMaxClientFrequency;
+            this.outboundPolicy = outboundPolicy;
+            outboundClientFrequency = new MessageFrequency(outboundMaxClientFrequency);
+        }
+
+        /**
+         * Returns the max-client-frequency for the subscription the message is
+         * intended for (which is simply the max-client-frequency specified at 
+         * the destination).
+         *
+         * @param message The message.
+         *
+         * @return The max-frequency for the subscription.
+         */
+        int getMaxFrequency(Message message)
+        {
+            return outboundMaxClientFrequency;
+        }
+
+        /**
+         * Given a subscription the message is intended to, returns the message
+         * rate frequency for that subscription.
+         *
+         * @param message The message.
+         * @return The message frequency for the subscription, if it exists; otherwise null.
+         */
+        MessageFrequency getMessageFrequency(Message message)
+        {
+            return outboundClientFrequency;
+        }
+
+        /**
+         * Utility function to log the maxFrequency being used during subscription.
+         *
+         * @param maxFrequency The maxFrequency to log.
+         */
+        void logMaxFrequencyDuringRegistration(int maxFrequency, SubscriptionInfo si)
+        {
+            if (Log.isDebug())
+                Log.getLogger(ThrottleManager.LOG_CATEGORY).debug("Outbound queue throttle manager for FlexClient '"
+                        + processor.getFlexClient().getId() + "' is using '" + maxFrequency
+                        + "' as the throttling limit for its subscription: "
+                        +  StringUtils.NEWLINE + si);
+        }
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/4f6a3052/modules/core/src/flex/messaging/client/PollFlushResult.java
----------------------------------------------------------------------
diff --git a/modules/core/src/flex/messaging/client/PollFlushResult.java b/modules/core/src/flex/messaging/client/PollFlushResult.java
old mode 100755
new mode 100644
index fe4a76d..dc8e33b
--- a/modules/core/src/flex/messaging/client/PollFlushResult.java
+++ b/modules/core/src/flex/messaging/client/PollFlushResult.java
@@ -1,97 +1,97 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package flex.messaging.client;
-
-/**
- * Extends <tt>FlushResult</tt> and adds additional properties for controlling 
- * client polling behavior.
- */
-public class PollFlushResult extends FlushResult
-{
-    //--------------------------------------------------------------------------
-    //
-    // Properties
-    //
-    //--------------------------------------------------------------------------
-
-    //----------------------------------
-    //  avoidBusyPolling
-    //----------------------------------
-
-    private boolean avoidBusyPolling;
-    
-    /**
-     * Indicates whether the handling of this result should attempt to avoid
-     * potential busy-polling cycles.
-     * This will be set to <code>true</code> in the case of two clients that are both
-     * long-polling the server over the same session.
-     * 
-     * @return <code>true</code> if the handling of this result should attempt to avoid potential
-     *         busy-polling cycles.
-     */
-    public boolean isAvoidBusyPolling()
-    {
-        return avoidBusyPolling;
-    }
-    
-    /**
-     * Set to <code>true</code> to signal that handling for this result should attempt to avoid
-     * potential busy-polling cycles.
-     * 
-     * @param value <code>true</code> to signal that handling for this result should attempt to 
-     *        avoid potential busy-polling cycles.
-     */
-    public void setAvoidBusyPolling(boolean value)
-    {
-        avoidBusyPolling = value;
-    }
-    
-    //----------------------------------
-    //  clientProcessingSuppressed
-    //----------------------------------
-
-    private boolean clientProcessingSuppressed;
-    
-    /**
-     * Indicates whether client processing of this result should be
-     * suppressed.
-     * This should be <code>true</code> for results generated for poll requests
-     * that arrive while a long-poll request from the same client is being serviced
-     * to avoid a busy polling cycle.
-     * 
-     * @return <code>true</code> if client processing of this result should be suppressed;
-     *         otherwise <code>false</code>.
-     */
-    public boolean isClientProcessingSuppressed()
-    {
-        return clientProcessingSuppressed;
-    }
-    
-    /**
-     * Set to <code>true</code> to suppress client processing of this result.
-     * Default is <code>false</code>.
-     * This should be set to <code>true</code> for results generated for poll requests
-     * that arrive while a long-poll request from the same client is being serviced
-     * to avoid a busy polling cycle.
-     * 
-     * @param value <code>true</code> to suppress client processing of the result.
-     */
-    public void setClientProcessingSuppressed(boolean value)
-    {
-        clientProcessingSuppressed = value;
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package flex.messaging.client;
+
+/**
+ * Extends <tt>FlushResult</tt> and adds additional properties for controlling 
+ * client polling behavior.
+ */
+public class PollFlushResult extends FlushResult
+{
+    //--------------------------------------------------------------------------
+    //
+    // Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  avoidBusyPolling
+    //----------------------------------
+
+    private boolean avoidBusyPolling;
+    
+    /**
+     * Indicates whether the handling of this result should attempt to avoid
+     * potential busy-polling cycles.
+     * This will be set to <code>true</code> in the case of two clients that are both
+     * long-polling the server over the same session.
+     * 
+     * @return <code>true</code> if the handling of this result should attempt to avoid potential
+     *         busy-polling cycles.
+     */
+    public boolean isAvoidBusyPolling()
+    {
+        return avoidBusyPolling;
+    }
+    
+    /**
+     * Set to <code>true</code> to signal that handling for this result should attempt to avoid
+     * potential busy-polling cycles.
+     * 
+     * @param value <code>true</code> to signal that handling for this result should attempt to 
+     *        avoid potential busy-polling cycles.
+     */
+    public void setAvoidBusyPolling(boolean value)
+    {
+        avoidBusyPolling = value;
+    }
+    
+    //----------------------------------
+    //  clientProcessingSuppressed
+    //----------------------------------
+
+    private boolean clientProcessingSuppressed;
+    
+    /**
+     * Indicates whether client processing of this result should be
+     * suppressed.
+     * This should be <code>true</code> for results generated for poll requests
+     * that arrive while a long-poll request from the same client is being serviced
+     * to avoid a busy polling cycle.
+     * 
+     * @return <code>true</code> if client processing of this result should be suppressed;
+     *         otherwise <code>false</code>.
+     */
+    public boolean isClientProcessingSuppressed()
+    {
+        return clientProcessingSuppressed;
+    }
+    
+    /**
+     * Set to <code>true</code> to suppress client processing of this result.
+     * Default is <code>false</code>.
+     * This should be set to <code>true</code> for results generated for poll requests
+     * that arrive while a long-poll request from the same client is being serviced
+     * to avoid a busy polling cycle.
+     * 
+     * @param value <code>true</code> to suppress client processing of the result.
+     */
+    public void setClientProcessingSuppressed(boolean value)
+    {
+        clientProcessingSuppressed = value;
+    }
+}

http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/4f6a3052/modules/core/src/flex/messaging/client/PollWaitListener.java
----------------------------------------------------------------------
diff --git a/modules/core/src/flex/messaging/client/PollWaitListener.java b/modules/core/src/flex/messaging/client/PollWaitListener.java
old mode 100755
new mode 100644
index ae4b820..7978e6f
--- a/modules/core/src/flex/messaging/client/PollWaitListener.java
+++ b/modules/core/src/flex/messaging/client/PollWaitListener.java
@@ -1,40 +1,40 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package flex.messaging.client;
-
-/**
- * Used alongside invocations of <code>FlexClient.pollWithWait()</code> to allow calling code to
- * maintain a record of the Objects being used to place waited poll requests into a wait
- * state. This can be used to break the threads out of their wait state separately from the
- * internal waited poll handling within <code>FlexClient</code>.
- */
-public interface PollWaitListener
-{
-    /**
-     * Hook method invoked directly before a wait begins.
-     * 
-     * @param notifier The <tt>Object</tt> being used to <code>wait()/notify()</code>.
-     */
-    void waitStart(Object notifier);
-    
-    /**
-     * Hook method invoked directly after a wait completes.
-     * 
-     * @param notifier The <tt>Object</tt> being used to <code>wait()/notify()</code>.
-     */
-    void waitEnd(Object notifier);
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package flex.messaging.client;
+
+/**
+ * Used alongside invocations of <code>FlexClient.pollWithWait()</code> to allow calling code to
+ * maintain a record of the Objects being used to place waited poll requests into a wait
+ * state. This can be used to break the threads out of their wait state separately from the
+ * internal waited poll handling within <code>FlexClient</code>.
+ */
+public interface PollWaitListener
+{
+    /**
+     * Hook method invoked directly before a wait begins.
+     * 
+     * @param notifier The <tt>Object</tt> being used to <code>wait()/notify()</code>.
+     */
+    void waitStart(Object notifier);
+    
+    /**
+     * Hook method invoked directly after a wait completes.
+     * 
+     * @param notifier The <tt>Object</tt> being used to <code>wait()/notify()</code>.
+     */
+    void waitEnd(Object notifier);
+}


Mime
View raw message