Examples of SerializationException


Examples of com.esotericsoftware.kryo.SerializationException

      Context context = Kryo.getContext();
      context.put("connection", connection);
      if (connection != null) context.setRemoteEntityID(connection.id);
      Object object = kryo.readClassAndObject(readBuffer);
      if (readBuffer.hasRemaining())
        throw new SerializationException("Incorrect number of bytes (" + readBuffer.remaining()
          + " remaining) used to deserialize object: " + object);
      return object;
    } finally {
      readBuffer.clear();
    }
View Full Code Here

Examples of com.github.ghetolay.jwamp.message.SerializationException

      case WampMessage.WELCOME :
        return welcomeMsg((WampWelcomeMessage) msg);

      default :
        throw new SerializationException("Unknown message type : " + msg.getMessageType());
      }
    } catch(SerializationException e){
      throw e;
    } catch(Exception e){
      throw new SerializationException(e);
    }
  }
View Full Code Here

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

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

        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

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

                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

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

      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

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

          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

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

     * @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

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

     * @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

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

                objects.add(event);

            } catch (RuntimeException e) {

                throw new SerializationException(e);

            }
        }
        return objects;
    }
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.