Package flex.messaging

Examples of flex.messaging.MessageException


        {
            // We can't use writeAMFNull here I think since we already added this object
            // to the object table on the server side.  The player won't have any way
            // of knowing we have this reference mapped to null.
            if (newInst == null)
                throw new MessageException("PropertyProxy.getInstanceToSerialize class: " + proxy.getClass() + " returned null for instance class: " + instance.getClass().getName());

            // Grab a new proxy if necessary for the new instance
            proxy = PropertyProxyRegistry.getProxyAndRegister(newInst);
            instance = newInst;
        }
View Full Code Here


        }
        else
        {
            // 0x40000000 - 0xFFFFFFFF : throw range exception
            throw new MessageException("Integer out of range: " + ref);
        }
    }
View Full Code Here

        {
            throw me;
        }       
        catch (Throwable t)
        {
            throw new MessageException(t);
        }
    }
View Full Code Here

            if (endpointPushHandlers == null)
                endpointPushHandlers = new HashMap(1);
           
            if (endpointPushHandlers.containsKey(endpointId))
            {
                MessageException me = new MessageException();
                me.setMessage(ENDPOINT_PUSH_HANDLER_ALREADY_REGISTERED, new Object[] {getId(), endpointId});
                throw me;
            }
           
            endpointPushHandlers.put(endpointId, handler);
        }
View Full Code Here

    {
        synchronized (lock)
        {
            if (!valid)
            {
                MessageException e = new MessageException();
                e.setMessage(FLEX_CLIENT_INVALIDATED);
                throw e;
            }
        }
    }
View Full Code Here

     *
     * @param endpointId The endpoint Id.
     */
    private void throwNotSubscribedException(String endpointId)
    {
        MessageException e = new MessageException();
        e.setMessage(10028, new Object[]{endpointId});
        e.setCode(MessageService.NOT_SUBSCRIBED_CODE);
        throw e;
    }
View Full Code Here

                document = builder.parse(input);
            }
        }
        catch (Exception ex)
        {
            throw new MessageException("Error deserializing XML type " + ex.getMessage());
        }

        return document;
    }
View Full Code Here

                    map = subscribersPerSubtopic;

                topicSub = (TopicSubscription) map.get(subtopic);

                if (topicSub == null)
                    throw new MessageException("Client: " + clientId + " not subscribed to subtopic: " + subtopic);
            }

            if (selector == null)
                subs = topicSub.defaultSubscriptions;
            else
                subs = (Map) topicSub.selectorSubscriptions.get(selector);

            if (subs == null || subs.get(clientId) == null)
                throw new MessageException("Client: " + clientId + " not subscribed to destination with selector: " + selector);

            synchronized (this)
            {
                subs.remove(clientId);
                if (subs.isEmpty() &&
View Full Code Here

                }
                catch (RuntimeException e)
                {
                    String s = "Message throttled: Too many messages sent to destination "
                        + inboundDestinationMark.id + " in too small of a time interval.  " + e.getMessage();
                    MessageException me = new MessageException(s);
                    try
                    {
                        throttleResult = handleError(settings.getInboundPolicy(), me);
                    }
                    catch (MessageException m)
                    {
                        throttleResult = RESULT_ERROR;
                        throw m;
                    }
                    finally
                    {
                        if (throttleResult != RESULT_OK && isManaged())
                            ((ThrottleManagerControl)getControl()).incrementDestinationIncomingMessageThrottleCount();
                    }                   
                }
            }
            else
            {
                try
                {
                    outboundDestinationMark.assertValid(msg, settings.getOutgoingDestinationFrequency());
                }
                catch (RuntimeException e)
                {
                    String s = "Message throttled: Too many messages routed by destination "
                        + outboundDestinationMark.id + " in too small of a time interval";
                    MessageException me = new MessageException(s);
                    try
                    {
                        throttleResult = handleError(settings.getOutboundPolicy(), me);
                    }
                    catch (MessageException m)
View Full Code Here

              }
              catch (RuntimeException e)
                {
                    String s = "Message throttled: Too many messages sent by client "
                        + clientId + " in too small of a time interval";
                    MessageException me = new MessageException(s);
                    try
                    {
                        throttleResult = handleError(settings.getInboundPolicy(), me);
                    }
                    catch (MessageException m)
                    {
                        throttleResult = RESULT_ERROR;
                        throw m;
                    }
                    finally
                    {
                        if ((throttleResult != RESULT_OK) && isManaged())
                            ((ThrottleManagerControl)getControl()).incrementClientIncomingMessageThrottleCount();
                    }                   
                }
              finally
              {
                  inboundClientMarks.put(clientId, clientLevelMark);
              }
            }
          else
          {
              if (outboundClientMarks.get(clientId) != null)
                clientLevelMark = (ThrottleMark) outboundClientMarks.get(clientId);
            else
                clientLevelMark = new ThrottleMark(clientId);
              try
              {
                  clientLevelMark.assertValid(msg, settings.getOutgoingClientFrequency());
              }
                catch (RuntimeException e)
                {
                    String s = "Message throttled: Too many messages sent to client "
                        + clientId + " in too small of a time interval";
                    MessageException me = new MessageException(s);
                    try
                    {
                        throttleResult = handleError(settings.getOutboundPolicy(), me);
                    }
                    catch (MessageException m)
View Full Code Here

TOP

Related Classes of flex.messaging.MessageException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.