RestletEndpoint endpoint = (RestletEndpoint)consumer.getEndpoint();
addServerIfNeccessary(endpoint);
MethodBasedRouter router = getMethodRouter(endpoint.getUriPattern());
Map<String, String> realm = endpoint.getRestletRealm();
Restlet target = consumer.getRestlet();
if (realm != null && realm.size() > 0) {
Guard guard = new Guard(component.getContext().createChildContext(),
ChallengeScheme.HTTP_BASIC, "Camel-Restlet Endpoint Realm");
for (Map.Entry<String, String> entry : realm.entrySet()) {
guard.getSecrets().put(entry.getKey(), entry.getValue().toCharArray());