@Test public void testFollowUpEndpointContextNoneHandshake() { EndpointContext messageContext = new AddressEndpointContext(ADDRESS); messageContext = MapBasedEndpointContext.addEntries(messageContext, DtlsEndpointContext.KEY_HANDSHAKE_MODE, DtlsEndpointContext.HANDSHAKE_MODE_NONE); EndpointContext connectionContext = new AddressEndpointContext(ADDRESS, "myserver", null); EndpointContext followUp = EndpointContextUtil.getFollowUpEndpointContext(messageContext, connectionContext); assertThat(followUp.get(DtlsEndpointContext.KEY_HANDSHAKE_MODE), is(DtlsEndpointContext.HANDSHAKE_MODE_NONE)); }
public static EndpointContext getFollowUpEndpointContext(EndpointContext messageContext, EndpointContext connectionContext) { EndpointContext followUpEndpointContext; String mode = messageContext.get(DtlsEndpointContext.KEY_HANDSHAKE_MODE); if (mode != null && mode.equals(DtlsEndpointContext.HANDSHAKE_MODE_NONE)) { followUpEndpointContext = MapBasedEndpointContext.addEntries(connectionContext, DtlsEndpointContext.KEY_HANDSHAKE_MODE, DtlsEndpointContext.HANDSHAKE_MODE_NONE); } else { followUpEndpointContext = connectionContext; } return followUpEndpointContext; }
EndpointContextUtil { public static EndpointContext getFollowUpEndpointContext(EndpointContext messageContext, EndpointContext connectionContext) { EndpointContext followUpEndpointContext; String mode = messageContext.get(DtlsEndpointContext.KEY_HANDSHAKE_MODE); if (mode != null && mode.equals(DtlsEndpointContext.HANDSHAKE_MODE_NONE)) { followUpEndpointContext = MapBasedEndpointContext.addEntries(connectionContext, DtlsEndpointContext.KEY_HANDSHAKE_MODE, DtlsEndpointContext.HANDSHAKE_MODE_NONE); } else { followUpEndpointContext = connectionContext; } return followUpEndpointContext; } }
EndpointContextUtil { public static EndpointContext getFollowUpEndpointContext(EndpointContext messageContext, EndpointContext connectionContext) { EndpointContext followUpEndpointContext; String mode = messageContext.get(DtlsEndpointContext.KEY_HANDSHAKE_MODE); if (mode != null && mode.equals(DtlsEndpointContext.HANDSHAKE_MODE_NONE)) { followUpEndpointContext = MapBasedEndpointContext.addEntries(connectionContext, DtlsEndpointContext.KEY_HANDSHAKE_MODE, DtlsEndpointContext.HANDSHAKE_MODE_NONE); } else { followUpEndpointContext = connectionContext; } return followUpEndpointContext; }  }
EndpointContextUtil { public static EndpointContext getFollowUpEndpointContext(EndpointContext messageContext, EndpointContext connectionContext) { EndpointContext followUpEndpointContext; String mode = messageContext.get(DtlsEndpointContext.KEY_HANDSHAKE_MODE); if (mode != null && mode.equals(DtlsEndpointContext.HANDSHAKE_MODE_NONE)) { followUpEndpointContext = MapBasedEndpointContext.addEntries(connectionContext, DtlsEndpointContext.KEY_HANDSHAKE_MODE, DtlsEndpointContext.HANDSHAKE_MODE_NONE); } else { followUpEndpointContext = connectionContext; } return followUpEndpointContext; }  static boolean match(String name, Set<String> keys, EndpointContext context1, EndpointContext context2); static EndpointContext getFollowUpEndpointContext(EndpointContext messageContext,
			EndpointContext connectionContext); }
EndpointContextUtil { public static EndpointContext getFollowUpEndpointContext(EndpointContext messageContext, EndpointContext connectionContext) { EndpointContext followUpEndpointContext; String mode = messageContext.get(DtlsEndpointContext.KEY_HANDSHAKE_MODE); if (mode != null && mode.equals(DtlsEndpointContext.HANDSHAKE_MODE_NONE)) { followUpEndpointContext = MapBasedEndpointContext.addEntries(connectionContext, DtlsEndpointContext.KEY_HANDSHAKE_MODE, DtlsEndpointContext.HANDSHAKE_MODE_NONE); } else { followUpEndpointContext = connectionContext; } return followUpEndpointContext; }  static boolean match(String name, Set<String> keys, EndpointContext context1, EndpointContext context2); static EndpointContext getFollowUpEndpointContext(EndpointContext messageContext,
			EndpointContext connectionContext);  }