Examples of InboundVariable


Examples of org.directwebremoting.extend.InboundVariable

        // Convert all the parameters to the correct types
        Object[] params = new Object[method.getParameterTypes().length];
        for (int j = 0; j < method.getParameterTypes().length; j++)
        {
            Class<?> paramType = method.getParameterTypes()[j];
            InboundVariable param = inboundContext.getParameter(0, j);
            Property property = new ParameterProperty(method, j);

            try
            {
                params[j] = converterManager.convertInbound(paramType, param, property);
View Full Code Here

Examples of org.directwebremoting.extend.InboundVariable

                int destParamCount = method.getParameterTypes().length;
                Object[] arguments = new Object[destParamCount];
                int inboundArgIndex = 0;
                for (int outboundArgIndex = 0; outboundArgIndex < destParamCount; outboundArgIndex++)
                {
                    InboundVariable param;
                    if (method.isVarArgs() && outboundArgIndex + 1 == destParamCount)
                    {
                        param = inctx.createArrayWrapper(callNum, destParamCount);
                    }
                    else
View Full Code Here

Examples of org.directwebremoting.extend.InboundVariable

        try
        {
            Method method = Callback.class.getMethod("dataReturned", type);

            Property property = new ParameterProperty(new MethodDeclaration(method), 0);
            InboundVariable iv = data.getInboundVariable();
            Object callbackData  = converterManager.convertInbound(type, iv, property);

            Map<String, Callback<T>> callbackMap = (Map<String, Callback<T>>) session.getAttribute(KEY_TYPE);
            Callback<T> callback = callbackMap.remove(key);
            session.removeAttribute(KEY_TYPE);
View Full Code Here

Examples of org.directwebremoting.extend.InboundVariable

        {
            converterManager = ServerContextFactory.get().getContainer().getBean(ConverterManager.class);
        }

        RealRawData realRawData = (RealRawData) rawData;
        InboundVariable inboundVariable = realRawData.getInboundVariable();
        T value = converterManager.convertInbound(type, inboundVariable, null);
        return value;
    }
View Full Code Here

Examples of org.directwebremoting.extend.InboundVariable

        {
            converterManager = ServerContextFactory.get().getContainer().getBean(ConverterManager.class);
        }

        RealRawData realRawData = (RealRawData) rawData;
        InboundVariable inboundVariable = realRawData.getInboundVariable();
        Object value = converterManager.convertInbound(toType, inboundVariable, null);
        return value;
    }
View Full Code Here

Examples of org.directwebremoting.extend.InboundVariable

                // type and value (as passed in by Javascript)
                String valStr = token.substring(colonpos + 1).trim();
                String[] splitIv = ConvertUtil.splitInbound(valStr);
                String splitIvValue = splitIv[ConvertUtil.INBOUND_INDEX_VALUE];
                String splitIvType = splitIv[ConvertUtil.INBOUND_INDEX_TYPE];
                InboundVariable valIv = new InboundVariable(incx, null, splitIvType, splitIvValue);
                valIv.dereference();
                Object val = converterManager.convertInbound(valType, valIv, valProp);

                // Keys (unlike values) do not have type info passed with them
                // Could we have recursive key? - I don't think so because keys
                // must be strings in Javascript
                String keyStr = token.substring(0, colonpos).trim();
                //String[] keySplit = LocalUtil.splitInbound(keyStr);
                //InboundVariable keyIv = new InboundVariable(incx, splitIv[LocalUtil.INBOUND_INDEX_TYPE], splitIv[LocalUtil.INBOUND_INDEX_VALUE]);
                InboundVariable keyIv = new InboundVariable(incx, null, ProtocolConstants.TYPE_STRING, keyStr);
                keyIv.dereference();

                Object key = converterManager.convertInbound(keyType, keyIv, keyProp);

                map.put(key, val);
            }
View Full Code Here

Examples of org.directwebremoting.extend.InboundVariable

                String[] split = ConvertUtil.splitInbound(token);
                String splitType = split[ConvertUtil.INBOUND_INDEX_TYPE];
                String splitValue = split[ConvertUtil.INBOUND_INDEX_VALUE];

                InboundVariable nested = new InboundVariable(data.getContext(), null, splitType, splitValue);
                nested.dereference();

                Object output = converterManager.convertInbound(subtype, nested, child);
                col.add(output);
            }
View Full Code Here

Examples of org.directwebremoting.extend.InboundVariable

            String token = st.nextToken();
            String[] split = ConvertUtil.splitInbound(token);
            String splitType = split[ConvertUtil.INBOUND_INDEX_TYPE];
            String splitValue = split[ConvertUtil.INBOUND_INDEX_VALUE];

            InboundVariable nested = new InboundVariable(incx, null, splitType, splitValue);
            nested.dereference();
            Object output = converterManager.convertInbound(componentType, nested, data.getContext().getCurrentProperty());
            Array.set(array, i, output);
        }
        return array;
    }
View Full Code Here

Examples of org.directwebremoting.extend.InboundVariable

     * @see org.directwebremoting.extend.ConverterManager#convertInbound(java.lang.Class, org.directwebremoting.io.RawData)
     */
    public <T> T convertInbound(Class<T> paramType, RawData rawData) throws ConversionException
    {
        RealRawData realRawData = (RealRawData) rawData;
        InboundVariable inboundVariable = realRawData.getInboundVariable();
        return convertInbound(paramType, inboundVariable, null);
    }
View Full Code Here

Examples of org.directwebremoting.extend.InboundVariable

    {
        String[] split = ConvertUtil.splitInbound(val);
        String splitValue = split[ConvertUtil.INBOUND_INDEX_VALUE];
        String splitType = split[ConvertUtil.INBOUND_INDEX_TYPE];

        InboundVariable nested = new InboundVariable(inboundContext, null, splitType, splitValue);
        nested.dereference();
        Property incc = createTypeHintContext(inboundContext, property);

        return converterManager.convertInbound(propType, nested, incc);
    }
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.