Examples of StackTraceElementCodec


Examples of org.apache.twill.internal.json.StackTraceElementCodec

    private final Gson gson;

    private LogEventConverter(String hostname) {
      gson = new GsonBuilder()
        .registerTypeAdapter(StackTraceElement.class, new StackTraceElementCodec())
        .registerTypeAdapter(LogThrowable.class, new LogThrowableCodec())
        .registerTypeAdapter(ILoggingEvent.class, new ILoggingEventSerializer(hostname))
        .create();
    }
View Full Code Here

Examples of org.apache.twill.internal.json.StackTraceElementCodec

    return new DecoratedServiceListener();
  }

  private <V> byte[] encode(V data, Class<? extends V> clz) {
    return new GsonBuilder().registerTypeAdapter(StateNode.class, new StateNodeCodec())
                            .registerTypeAdapter(StackTraceElement.class, new StackTraceElementCodec())
                            .create()
      .toJson(data, clz).getBytes(Charsets.UTF_8);
  }
View Full Code Here

Examples of org.apache.twill.internal.json.StackTraceElementCodec

        if (data == null) {
          stateNodeUpdated(null);
          return;
        }
        StateNode stateNode = new GsonBuilder().registerTypeAdapter(StateNode.class, new StateNodeCodec())
          .registerTypeAdapter(StackTraceElement.class, new StackTraceElementCodec())
          .create()
          .fromJson(new String(data, Charsets.UTF_8), StateNode.class);

        stateNodeUpdated(stateNode);
      }
View Full Code Here

Examples of org.apache.twill.internal.json.StackTraceElementCodec

    return new DecoratedServiceListener();
  }

  private <V> byte[] encode(V data, Class<? extends V> clz) {
    return new GsonBuilder().registerTypeAdapter(StateNode.class, new StateNodeCodec())
                            .registerTypeAdapter(StackTraceElement.class, new StackTraceElementCodec())
                            .create()
      .toJson(data, clz).getBytes(Charsets.UTF_8);
  }
View Full Code Here

Examples of org.apache.twill.internal.json.StackTraceElementCodec

      if (data == null) {
        stateNodeUpdated(null);
        return;
      }
      StateNode stateNode = new GsonBuilder().registerTypeAdapter(StateNode.class, new StateNodeCodec())
        .registerTypeAdapter(StackTraceElement.class, new StackTraceElementCodec())
        .create()
        .fromJson(new String(data, Charsets.UTF_8), StateNode.class);

      stateNodeUpdated(stateNode);
    }
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.