return new Endpoint(publicAddress, EndpointCategory.PUBLIC);
}
private Endpoint createEndpointFromAttributes(final Message registerMessage) {
final XorMappedAddress address = registerMessage.getAttribute(XorMappedAddress.class);
EndpointCategory category = EndpointCategory.PRIVATE;
if (registerMessage.hasAttribute(EndpointClass.class)) {
category = registerMessage.getAttribute(EndpointClass.class).getEndpointCategory();
}
return new Endpoint(address.getEndpoint(), category);
}