Package com.google.gwt.user.client.rpc

Examples of com.google.gwt.user.client.rpc.SerializationException


        if (message == null || message.isEmpty()) {
            return null;
        }
        AtmosphereGWTSerializer serializer = client.getSerializer();
        if (serializer == null) {
            throw new SerializationException("Can not deserialize message with no serializer: " + message);
        }
        else {
            return serializer.parse(message);
        }
    }
View Full Code Here


        ClientSerializationStreamReader reader = new ClientSerializationStreamReader(serializer);
        reader.prepareToRead(message);
        return (T) reader.readObject();
      }
      catch (RuntimeException e) {
        throw new SerializationException(e);
      }
    }
    else if (getMode() == SerialMode.DE_RPC) {
      try {
        SerializationStreamReader reader = ClientWriterFactory.createReader(message);
        return (T) reader.readObject();
      }
      catch (RuntimeException e) {
        throw new SerializationException(e);
      }
    } else if (getMode() == SerialMode.PLAIN) {
            return (T) message;
        else {
      throw new UnsupportedOperationException("Not implemented yet");
View Full Code Here

                writer.prepareToWrite();
                writer.writeObject(message);
        return writer.toString();
      }
      catch (RuntimeException e) {
        throw new SerializationException(e);
      }
    } else if (getPushMode() == SerialMode.PLAIN) {
            return message.toString();
        } else {
      throw new UnsupportedOperationException("Not implemented yet");
View Full Code Here

      try {
        value = declField.get(instance);
        serializeValue(value, declField.getType());

      } catch (IllegalArgumentException e) {
        throw new SerializationException(e);

      } catch (IllegalAccessException e) {
        throw new SerializationException(e);
      }
    }

    Class<?> superClass = instanceClass.getSuperclass();
    if (serializationPolicy.shouldSerializeFields(superClass)) {
View Full Code Here

          return;
        }
      }
      throw new NoSuchMethodException("serialize");
    } catch (SecurityException e) {
      throw new SerializationException(e);

    } catch (NoSuchMethodException e) {
      throw new SerializationException(e);

    } catch (IllegalArgumentException e) {
      throw new SerializationException(e);

    } catch (IllegalAccessException e) {
      throw new SerializationException(e);

    } catch (InvocationTargetException e) {
      throw new SerializationException(e);
    }
  }
View Full Code Here

     * @see com.google.gwt.user.server.rpc.SerializationPolicy#validateDeserialize(java.lang.String)
     */
    public void validateDeserialize(Class clazz)
            throws SerializationException {
        if (!isInstantiable(clazz)) {
            throw new SerializationException(
                    "Type '"
                            + clazz.getName()
                            + "' was not assignable to '"
                            + IsSerializable.class.getName()
                            + "' and did not have a custom field serializer.  For security purposes, this type will not be deserialized.");
View Full Code Here

     * @see com.google.gwt.user.server.rpc.SerializationPolicy#validateSerialize(java.lang.String)
     */
    public void validateSerialize(Class clazz)
            throws SerializationException {
        if (!isInstantiable(clazz)) {
            throw new SerializationException(
                    "Type '"
                            + clazz.getName()
                            + "' was not assignable to '"
                            + IsSerializable.class.getName()
                            + "' and did not have a custom field serializer.  For security purposes, this type will not be serialized.");
View Full Code Here

                objects.add(event);

            } catch (RuntimeException e) {

                throw new SerializationException(e);

            }
        }
        return objects;
    }
View Full Code Here

            return AutoBeanCodex.encode(bean).getPayload();

        } catch (RuntimeException e) {

            throw new SerializationException(e);

        }
    }
View Full Code Here

                Serializer serializer = getRPCSerializer();
                ClientSerializationStreamReader reader = new ClientSerializationStreamReader(serializer);
                reader.prepareToRead(message);
                objects.add(reader.readObject());
            } catch (RuntimeException e) {
                throw new SerializationException(e);
            }
        }

        return objects;
    }
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.rpc.SerializationException

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.