INNER CODE UNIT · Java

serializeInvocation

gruelbox/transaction-outbox · transactionoutbox-core/src/main/java/com/gruelbox/transactionoutbox/DefaultInvocationSerializer.java:90

  public void serializeInvocation(Invocation invocation, Writer writer) {
    try {
      gson.toJson(invocation, writer);
    } catch (Exception e) {
      throw new IllegalArgumentException("Cannot serialize " + invocation, e);
    }
  }

  @Override
  public Invocation deserializeInvocation(Reader reader) throws IOException {
    try {
      return gson.fromJson(reader, Invocation.class);
    } catch (JsonIOException | JsonSyntaxException exception) {
      throw new IOException(exception);
    }
  }

  private static final class InvocationJsonSerializer

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…