public GrizzlyAdapter exposeContext(Set classes, ServerContext sc, Habitat habitat)
throws EndpointRegistrationException {
Adapter adapter = null;
Reloader r = new Reloader();
ResourceConfig rc = new DefaultResourceConfig(classes);
rc.getMediaTypeMappings().put("xml", MediaType.APPLICATION_XML_TYPE);
rc.getMediaTypeMappings().put("json", MediaType.APPLICATION_JSON_TYPE);
rc.getMediaTypeMappings().put("html", MediaType.TEXT_HTML_TYPE);