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);
}