Package org.jboss.errai.marshalling.server

Examples of org.jboss.errai.marshalling.server.EncodingSession


    if (o == null) {
      outstream.write("null".getBytes());
      return;
    }

    EncodingSession ctx = (EncodingSession) mSession;
    Class cls = o.getClass();

    if (o instanceof Enum) {
      Enum enumer = (Enum) o;

      outstream.write(("{\"" + SerializationParts.ENCODED_TYPE + "\":\""
              + enumer.getDeclaringClass().getName() + "\""
              + ",\"" + SerializationParts.ENUM_STRING_VALUE + "\":\"" + enumer.name() + "\"}")
              .getBytes());

      return;
    }


    boolean enc = ctx.isEncoded(o);
    String hash = ctx.getObjectHash(o);

    if (enc) {
      /**
       * If this object is referencing a duplicate object in the graph, we only provide an ID reference.
       */
 
View Full Code Here


    if (o == null) {
      outstream.write("null".getBytes());
      return;
    }

    EncodingSession ctx = (EncodingSession) mSession;
    Class cls = o.getClass();

    if (o instanceof Enum) {
      Enum enumer = (Enum) o;

      outstream.write(("{\"" + SerializationParts.ENCODED_TYPE + "\":\""
              + enumer.getDeclaringClass().getName() + "\""
              + ",\"" + SerializationParts.ENUM_STRING_VALUE + "\":\"" + enumer.name() + "\"}")
              .getBytes());

      return;
    }


    boolean enc = ctx.isEncoded(o);
    String hash = ctx.getObjectHash(o);

    if (enc) {
      /**
       * If this object is referencing a duplicate object in the graph, we only provide an ID reference.
       */
 
View Full Code Here

    if (o == null) {
      outstream.write("null".getBytes(UTF_8));
      return;
    }

    EncodingSession ctx = (EncodingSession) mSession;
    Class cls = o.getClass();

    if (o instanceof Enum) {
      Enum enumer = (Enum) o;

      outstream.write(("{\"" + SerializationParts.ENCODED_TYPE + "\":\""
              + enumer.getDeclaringClass().getName() + "\""
              + ",\"" + SerializationParts.ENUM_STRING_VALUE + "\":\"" + enumer.name() + "\"}")
              .getBytes(UTF_8));

      return;
    }


    boolean enc = ctx.isEncoded(o);
    String hash = ctx.getObjectHash(o);

    if (enc) {
      /**
       * If this object is referencing a duplicate object in the graph, we only provide an ID reference.
       */
 
View Full Code Here

    if (o == null) {
      outstream.write("null".getBytes(UTF_8));
      return;
    }

    final EncodingSession ctx = (EncodingSession) mSession;
    final Class cls = o.getClass();

    if (definition.getMappingClass().isEnum()) {
      final Enum enumer = (Enum) o;

      outstream.write(("{\"" + SerializationParts.ENCODED_TYPE + "\":\""
              + enumer.getDeclaringClass().getName() + "\""
              + ",\"" + SerializationParts.ENUM_STRING_VALUE + "\":\"" + enumer.name() + "\"}")
              .getBytes(UTF_8));

      return;
    }

    final boolean enc = ctx.hasObject(o);
    final String hash = ctx.getObject(o);

    if (enc) {
      /**
       * If this object is referencing a duplicate object in the graph, we only provide an ID reference.
       */
 
View Full Code Here

    if (o == null) {
      outstream.write("null".getBytes(UTF_8));
      return;
    }

    final EncodingSession ctx = (EncodingSession) mSession;
    final Class cls = o.getClass();

    if (definition.getMappingClass().isEnum()) {
      final Enum enumer = (Enum) o;

      outstream.write(("{\"" + SerializationParts.ENCODED_TYPE + "\":\""
              + enumer.getDeclaringClass().getName() + "\""
              + ",\"" + SerializationParts.ENUM_STRING_VALUE + "\":\"" + enumer.name() + "\"}")
              .getBytes(UTF_8));

      return;
    }

    final boolean enc = ctx.hasObject(o);
    final String hash = ctx.getObject(o);

    if (enc) {
      /**
       * If this object is referencing a duplicate object in the graph, we only provide an ID reference.
       */
 
View Full Code Here

    if (o == null) {
      outstream.write("null".getBytes(UTF_8));
      return;
    }

    final EncodingSession ctx = (EncodingSession) mSession;
    final Class cls = o.getClass();

    if (definition.getMappingClass().isEnum()) {
      final Enum enumer = (Enum) o;

      outstream.write(("{\"" + SerializationParts.ENCODED_TYPE + "\":\""
              + enumer.getDeclaringClass().getName() + "\""
              + ",\"" + SerializationParts.ENUM_STRING_VALUE + "\":\"" + enumer.name() + "\"}")
              .getBytes(UTF_8));

      return;
    }

    final boolean enc = ctx.hasObject(o);
    final String hash = ctx.getObject(o);

    if (enc) {
      /**
       * If this object is referencing a duplicate object in the graph, we only provide an ID reference.
       */
 
View Full Code Here

    if (o == null) {
      outstream.write("null".getBytes(UTF_8));
      return;
    }

    EncodingSession ctx = (EncodingSession) mSession;
    Class cls = o.getClass();

    if (o instanceof Enum) {
      Enum enumer = (Enum) o;

      outstream.write(("{\"" + SerializationParts.ENCODED_TYPE + "\":\""
              + enumer.getDeclaringClass().getName() + "\""
              + ",\"" + SerializationParts.ENUM_STRING_VALUE + "\":\"" + enumer.name() + "\"}")
              .getBytes(UTF_8));

      return;
    }


    boolean enc = ctx.isEncoded(o);
    String hash = ctx.getObjectHash(o);

    if (enc) {
      /**
       * If this object is referencing a duplicate object in the graph, we only provide an ID reference.
       */
 
View Full Code Here

    if (o == null) {
      outstream.write("null".getBytes(UTF_8));
      return;
    }

    final EncodingSession ctx = (EncodingSession) mSession;
    final Class cls = o.getClass();

    if (definition.getMappingClass().isEnum()) {
      final Enum enumer = (Enum) o;

      outstream.write(("{\"" + SerializationParts.ENCODED_TYPE + "\":\""
              + enumer.getDeclaringClass().getName() + "\""
              + ",\"" + SerializationParts.ENUM_STRING_VALUE + "\":\"" + enumer.name() + "\"}")
              .getBytes(UTF_8));

      return;
    }

    final boolean enc = ctx.hasObject(o);
    final String hash = ctx.getObject(o);

    if (enc) {
      /**
       * If this object is referencing a duplicate object in the graph, we only provide an ID reference.
       */
 
View Full Code Here

TOP

Related Classes of org.jboss.errai.marshalling.server.EncodingSession

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.