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

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


    }
  //  else : unsupported GWT map
  //
    else
    {
      throw new SerializationException("Unsupported collection type : " + object.getClass());
    }
   
  //  Copy map contents
  //
    for (Map.Entry<Serializable, Serializable> item : objectMap.entrySet())
View Full Code Here


    }
  //  else : unsupported GWT map
  //
    else
    {
      throw new SerializationException("Unsupported collection type : " + object.getClass());
    }
   
  //  Copy map contents
  //
    for (Map.Entry<IGwtSerializableParameter, IGwtSerializableParameter> item : objectMap.entrySet())
View Full Code Here

      return false;
    }

    @Override
    public void validateDeserialize(Class<?> clazz) throws SerializationException {
      SerializationException se = null;
      for (SerializationPolicy p : policies) {
        try {
          p.validateDeserialize(clazz);
          return;
        } catch (SerializationException e) {
View Full Code Here

      throw se;
    }

    @Override
    public void validateSerialize(Class<?> clazz) throws SerializationException {
      SerializationException se = null;
      for (SerializationPolicy p : policies) {
        try {
          p.validateSerialize(clazz);
          return;
        } catch (SerializationException e) {
View Full Code Here

      StringConcatEvaler stringConcatEvaler = new StringConcatEvaler();
      stringConcatEvaler.acceptList(stmts);
      decoder = new RpcDecoder();
      decoder.acceptList(stmts);
    } catch (Exception e) {
      throw new SerializationException("Failed to parse RPC payload", e);
    }

    index = decoder.getValues().size();
    super.prepareToRead(encoded);
View Full Code Here

    if (customFieldSerializer == null) {
      if (CustomFieldSerializer.class.isAssignableFrom(customSerializerClass)) {
        try {
          customFieldSerializer = (CustomFieldSerializer<?>) customSerializerClass.newInstance();
        } catch (InstantiationException e) {
          throw new SerializationException(e);

        } catch (IllegalAccessException e) {
          throw new SerializationException(e);
        }
      } else {
        customFieldSerializer = NO_SUCH_SERIALIZER;
      }
      CLASS_TO_SERIALIZER_INSTANCE.put(customSerializerClass, customFieldSerializer);
View Full Code Here

      public void validateSerialize(Class<?> clazz) throws SerializationException {
      }
     
      @Override
      public void validateDeserialize(Class<?> clazz) throws SerializationException {
        throw new SerializationException("Should only be used for serialization!");
      }
     
      @Override
      public boolean shouldSerializeFields(Class<?> clazz) {
        return clazz.getSuperclass() != null; // We'll allow anything but java.lang.Object, I guess
View Full Code Here

        EventNotificationTestHandler theEventNotification = new EventNotificationTestHandler();

        final String theSerializedEvent = "corrupt_serialized_event";

        SerializationStreamReader theSerializationStreamReaderMock = mock(SerializationStreamReader.class);
        when(theSerializationStreamReaderMock.readObject()).thenThrow(new SerializationException("The event is corrupt and can not be deserialized!"));

        mockInitSerializationStreamFactory(theSerializationStreamReaderMock, theSerializedEvent);

        myGWTStreamingClientConnector.listen(theEventNotification, null);
        assertFalse(theEventNotification.isNotified());
View Full Code Here

            log.info( "USER:" + getCurrentUserName() + " REMOVING SNAPSHOT for package: [" + packageName + "] snapshot: [" + snapshotName + "]" );
            getRulesRepository().removePackageSnapshot( packageName,
                    snapshotName );
        } else {
            if ( newSnapshotName.equals( "" ) ) {
                throw new SerializationException( "Need to have a new snapshot name." );
            }
            log.info( "USER:" + getCurrentUserName() + " COPYING SNAPSHOT for package: [" + packageName + "] snapshot: [" + snapshotName + "] to [" + newSnapshotName + "]" );

            getRulesRepository().copyPackageSnapshot( packageName,
                    snapshotName,
View Full Code Here

    if (hasFlags(FLAG_ELIDE_TYPE_NAMES)) {
      if (serializationPolicy instanceof TypeNameObfuscator) {
        return ((TypeNameObfuscator) serializationPolicy).getTypeIdForClass(clazz);
      }

      throw new SerializationException("The GWT module was compiled with RPC "
          + "type name elision enabled, but "
          + serializationPolicy.getClass().getName() + " does not implement "
          + TypeNameObfuscator.class.getName());
    } else {
      return SerializabilityUtil.encodeSerializedInstanceReference(clazz, serializationPolicy);
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.