Examples of ASObject


Examples of flashgateway.io.ASObject

            map.put(key,toAMFObject(value));
        }
        return map;
    }
    private Object toAMFObject(Component c) throws PageException {
      ASObject aso = new ASObject();
      if(c instanceof ComponentAccess) {
        Property[] prop = c.getProperties(false);
          if(prop!=null)for(int i=0;i<prop.length;i++) {
            aso.put(prop[i].getName().toUpperCase(), toAMFObject(c.get(prop[i].getName(),null)));
          }
      }
      return aso;
    }
View Full Code Here

Examples of flex.messaging.io.amf.ASObject

        {
            message.append("with value '").append(object.toString()).append("' ");
        }
        else if (object instanceof ASObject)
        {
            ASObject aso = (ASObject)object;
            message.append("with remote type specified as '").append(aso.getType()).append("' ");
        }

        message.append("to an instance of ").append(desiredClass.toString());

        TranslationException ex = new TranslationException(message.toString());
View Full Code Here

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);
            loginManager.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 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

    {
        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

    {
        // 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
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.