@Test public void testCreateAcknowledgement() { CoAPResponse ack = resp.createAcknowledgement(); assertEquals(ack.getMessageId(), resp.getMessageId()); Assert.assertArrayEquals(ack.getToken(), resp.getToken()); assertEquals(ack.getMessageType(), CoAPMessageType.ACKNOWLEDGEMENT); assertEquals(ack.getSocketAddress(), resp.getSocketAddress()); }
public CoAPResponse createAcknowledgement() { CoAPResponse resp = new CoAPResponse(1, CoAPMessageType.ACKNOWLEDGEMENT, CoAPResponseCode.EMPTY, this.getMessageId(), getToken()); resp.setSocketAddress(getSocketAddress()); return resp; }
CoAPResponse extends CoAPMessage { public CoAPResponse createAcknowledgement() { CoAPResponse resp = new CoAPResponse(1, CoAPMessageType.ACKNOWLEDGEMENT, CoAPResponseCode.EMPTY, this.getMessageId(), getToken()); resp.setSocketAddress(getSocketAddress()); return resp; } }
CoAPResponse extends CoAPMessage { public CoAPResponse createAcknowledgement() { CoAPResponse resp = new CoAPResponse(1, CoAPMessageType.ACKNOWLEDGEMENT, CoAPResponseCode.EMPTY, this.getMessageId(), getToken()); resp.setSocketAddress(getSocketAddress()); return resp; } CoAPResponse(int version, CoAPMessageType messageType, CoAPResponseCode responseCode, int messageId, byte[] token);  CoAPResponse(int version, CoAPMessageType messageType, CoAPResponseCode responseCode, int messageId);  CoAPResponse(CoAPMessageType messageType, CoAPResponseCode responseCode, int messageId, byte[] token);  CoAPResponse(CoAPMessageType messageType, CoAPResponseCode responseCode, int messageId);  CoAPResponse(int version, CoAPRequest request, CoAPMessageType messageType, CoAPResponseCode responseCode); }
CoAPResponse extends CoAPMessage { public CoAPResponse createAcknowledgement() { CoAPResponse resp = new CoAPResponse(1, CoAPMessageType.ACKNOWLEDGEMENT, CoAPResponseCode.EMPTY, this.getMessageId(), getToken()); resp.setSocketAddress(getSocketAddress()); return resp; } CoAPResponse(int version, CoAPMessageType messageType, CoAPResponseCode responseCode, int messageId, byte[] token);  CoAPResponse(int version, CoAPMessageType messageType, CoAPResponseCode responseCode, int messageId);  CoAPResponse(CoAPMessageType messageType, CoAPResponseCode responseCode, int messageId, byte[] token);  CoAPResponse(CoAPMessageType messageType, CoAPResponseCode responseCode, int messageId);  CoAPResponse(int version, CoAPRequest request, CoAPMessageType messageType, CoAPResponseCode responseCode); @Override CoAPResponseCode getCode(); CoAPResponse createAcknowledgement(); CoAPResponse createReset(); boolean isCacheable(); }
CoAPResponse extends CoAPMessage { public CoAPResponse createAcknowledgement() { CoAPResponse resp = new CoAPResponse(1, CoAPMessageType.ACKNOWLEDGEMENT, CoAPResponseCode.EMPTY, this.getMessageId(), getToken()); resp.setSocketAddress(getSocketAddress()); return resp; } CoAPResponse(int version, CoAPMessageType messageType, CoAPResponseCode responseCode, int messageId, byte[] token);  CoAPResponse(int version, CoAPMessageType messageType, CoAPResponseCode responseCode, int messageId);  CoAPResponse(CoAPMessageType messageType, CoAPResponseCode responseCode, int messageId, byte[] token);  CoAPResponse(CoAPMessageType messageType, CoAPResponseCode responseCode, int messageId);  CoAPResponse(int version, CoAPRequest request, CoAPMessageType messageType, CoAPResponseCode responseCode); @Override CoAPResponseCode getCode(); CoAPResponse createAcknowledgement(); CoAPResponse createReset(); boolean isCacheable();  }