Examples of ASObject


Examples of flex.messaging.io.amf.ASObject

            Object response = responseBody.getData();

            if (response instanceof ErrorMessage)
            {
                ErrorMessage error = (ErrorMessage)response;
                ASObject aso = new ASObject();
                aso.put("message", error.faultString);
                aso.put("code", error.faultCode);
                aso.put("details", error.faultDetail);
                aso.put("rootCause", error.rootCause);
                response = aso;
            }
            else if (response instanceof Message)
            {
                response = ((Message)response).getBody();
View Full Code Here

Examples of flex.messaging.io.amf.ASObject

        {
            Object obj = oldParams.get(0);

            if (obj != null && obj instanceof ASObject)
            {
                ASObject aso = (ASObject)obj;

                // Unwrap legacy Flex 1.5 Envelope type
                if (isEnvelope(aso))
                {
                    body = aso.get("data");

                    // Envelope level headers
                    Object h = aso.get("headers");
                    if (h != null && h instanceof List)
                    {
                        readEnvelopeHeaders((List)h, headerMap);
                        envelopeCredentials(headerMap);
                    }
View Full Code Here

Examples of flex.messaging.io.amf.ASObject

    {
        // Process Legacy Security Credentials
        Object obj = headers.get(LEGACY_SECURITY_HEADER_NAME);
        if (obj != null && obj instanceof ASObject)
        {
            ASObject header = (ASObject)obj;
            String principal = (String)header.get(LEGACY_SECURITY_PRINCIPAL);
            Object credentials = header.get(LEGACY_SECURITY_CREDENTIALS);
            endpoint.getMessageBroker().getLoginManager().login(principal, credentials.toString());
        }
        headers.remove(LEGACY_SECURITY_HEADER_NAME);
    }
View Full Code Here

Examples of flex.messaging.io.amf.ASObject

            if (context.isLegacy())
            {
                if (methodResult instanceof ErrorMessage)
                {
                    ErrorMessage error = (ErrorMessage)methodResult;
                    ASObject aso = new ASObject();
                    aso.put("message", error.faultString);
                    aso.put("code", error.faultCode);
                    aso.put("details", error.faultDetail);
                    aso.put("rootCause", error.rootCause);
                    methodResult = aso;
                }
                else if (methodResult instanceof Message)
                {
                    methodResult = ((Message)methodResult).getBody();
View Full Code Here

Examples of flex.messaging.io.amf.ASObject

    {
        Object instance;

        if (className == null || className.length() == 0)
        {
            instance = new ASObject();
        }
        else if (className.startsWith(">")) // Handle [RemoteClass] (no server alias)
        {
            instance = new ASObject();
            ((ASObject)instance).setType(className);
        }
        else
        {
            SerializationContext context = getSerializationContext();
            if (context.instantiateTypes || className.startsWith("flex."))
            {
                return createInstanceFromClassName(className);
            }
            else
            {
                // Just return type info with an ASObject...
                instance = new ASObject();
                ((ASObject)instance).setType(className);
            }
        }
        return instance;
    }
View Full Code Here

Examples of flex.messaging.io.amf.ASObject

            Map map = (Map)obj;

            //Check for an Object.registerClass Typed ASObject
            if (map instanceof ASObject)
            {
                ASObject aso = (ASObject)map;
                type = aso.getType();
            }

            SerializationContext sc = SerializationContext.getSerializationContext();
           
            if (type == null && sc.supportRemoteClass)
View Full Code Here

Examples of flex.messaging.io.amf.ASObject

            if (aliasedClass != null)
                type = aliasedClass;

            if (type == null || type.length() == 0)
            {
                object = new ASObject();
            }
            else if (type.startsWith(">")) // Handle [RemoteClass] (no server alias)
            {
                object = new ASObject();
                ((ASObject)object).setType(type);
            }
            else if (context.instantiateTypes || type.startsWith("flex."))
            {
                Class desiredClass = AbstractProxy.getClassFromClassName(type);

                proxy = PropertyProxyRegistry.getRegistry().getProxyAndRegister(desiredClass);

                if (proxy == null)
                    object = ClassUtil.createDefaultInstance(desiredClass, null);
                else
                    object = proxy.createInstance(type);
            }
            else
            {
                // Just return type info with an ASObject...
                object = new ASObject();
                ((ASObject)object).setType(type);
            }
        }
        else
        {
            // TODO: QUESTION: Pete, Investigate why setValue for ASObject is delayed to endObject
            object = new ASObject(type);
        }

        if (proxy == null)
            proxy = PropertyProxyRegistry.getProxyAndRegister(object);
View Full Code Here

Examples of flex.messaging.io.amf.ASObject

            catch (IndexOutOfBoundsException ex)
            {
                throw new MessageException("Object has no trait info for value: " + value);
            }

            ASObject aso = (ASObject)obj;
            aso.put(prop, value);

            if (isDebug)
                trace.namedElement(prop);
        }
View Full Code Here

Examples of flex.messaging.io.amf.ASObject

      } else if (object instanceof ASObject) {
    if (DEBUG)
        System.out.println(((ASObject) object).getType());
    AMFTreeTableNode objectsNode = new AMFTreeTableNode(new AMFData("", ((ASObject) object).getType(), "", message));
    node.add(objectsNode);
    ASObject o = ((ASObject) object);

    Iterator it = o.entrySet().iterator();
    while (it.hasNext()) {
        Map.Entry pairs = (Map.Entry) it.next();
        Object getValue = pairs.getValue();
        if (getValue instanceof Object[]) {
      Object[] array = (Object[]) getValue;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.