@Test public void serializeTest() { UnregisterMessage unregisterMessage = new UnregisterMessage(14, 23); assertThat(unregisterMessage.getCode()).isEqualTo(66); assertThat(unregisterMessage.getRequestId()).isEqualTo(14); assertThat(unregisterMessage.getRegistrationId()).isEqualTo(23); String json = serializeToJson(unregisterMessage); assertThat(json).isEqualTo("[66,14,23]"); }
@Override public void serialize(JsonGenerator generator) throws IOException { generator.writeNumber(getCode()); generator.writeNumber(this.requestId); generator.writeNumber(this.registrationId); }
UnregisterMessage extends WampMessage { @Override public void serialize(JsonGenerator generator) throws IOException { generator.writeNumber(getCode()); generator.writeNumber(this.requestId); generator.writeNumber(this.registrationId); } }
UnregisterMessage extends WampMessage { @Override public void serialize(JsonGenerator generator) throws IOException { generator.writeNumber(getCode()); generator.writeNumber(this.requestId); generator.writeNumber(this.registrationId); } UnregisterMessage(long requestId, long registrationId); }
UnregisterMessage extends WampMessage { @Override public void serialize(JsonGenerator generator) throws IOException { generator.writeNumber(getCode()); generator.writeNumber(this.requestId); generator.writeNumber(this.registrationId); } UnregisterMessage(long requestId, long registrationId); static UnregisterMessage deserialize(JsonParser jp); @Override void serialize(JsonGenerator generator); long getRequestId(); long getRegistrationId(); @Override String toString(); }
UnregisterMessage extends WampMessage { @Override public void serialize(JsonGenerator generator) throws IOException { generator.writeNumber(getCode()); generator.writeNumber(this.requestId); generator.writeNumber(this.registrationId); } UnregisterMessage(long requestId, long registrationId); static UnregisterMessage deserialize(JsonParser jp); @Override void serialize(JsonGenerator generator); long getRequestId(); long getRegistrationId(); @Override String toString();  }