@Test public void deserializeTest() throws IOException { String json = "[34, 85346237, 5512315355]"; UnsubscribeMessage unsubscribeMessage = WampMessage.deserialize(getJsonFactory(), json.getBytes(StandardCharsets.UTF_8)); assertThat(unsubscribeMessage.getCode()).isEqualTo(34); assertThat(unsubscribeMessage.getRequestId()).isEqualTo(85346237L); assertThat(unsubscribeMessage.getSubscriptionId()).isEqualTo(5512315355L); }
public static UnsubscribeMessage deserialize(JsonParser jp) throws IOException { jp.nextToken(); long request = jp.getLongValue(); jp.nextToken(); long subscription = jp.getLongValue(); return new UnsubscribeMessage(request, subscription); }
UnsubscribeMessage extends WampMessage { public static UnsubscribeMessage deserialize(JsonParser jp) throws IOException { jp.nextToken(); long request = jp.getLongValue(); jp.nextToken(); long subscription = jp.getLongValue(); return new UnsubscribeMessage(request, subscription); } }
UnsubscribeMessage extends WampMessage { public static UnsubscribeMessage deserialize(JsonParser jp) throws IOException { jp.nextToken(); long request = jp.getLongValue(); jp.nextToken(); long subscription = jp.getLongValue(); return new UnsubscribeMessage(request, subscription); } UnsubscribeMessage(long requestId, long subscriptionId); }
UnsubscribeMessage extends WampMessage { public static UnsubscribeMessage deserialize(JsonParser jp) throws IOException { jp.nextToken(); long request = jp.getLongValue(); jp.nextToken(); long subscription = jp.getLongValue(); return new UnsubscribeMessage(request, subscription); } UnsubscribeMessage(long requestId, long subscriptionId); static UnsubscribeMessage deserialize(JsonParser jp); @Override void serialize(JsonGenerator generator); long getRequestId(); long getSubscriptionId(); @Override String toString(); }
UnsubscribeMessage extends WampMessage { public static UnsubscribeMessage deserialize(JsonParser jp) throws IOException { jp.nextToken(); long request = jp.getLongValue(); jp.nextToken(); long subscription = jp.getLongValue(); return new UnsubscribeMessage(request, subscription); } UnsubscribeMessage(long requestId, long subscriptionId); static UnsubscribeMessage deserialize(JsonParser jp); @Override void serialize(JsonGenerator generator); long getRequestId(); long getSubscriptionId(); @Override String toString();  }