String path = _baseAddress;
String contextPath = _config.getContextPath();
if ((contextPath != null) && !ResourcePublisherFactory.ignoreContext()) {
path = path + "/" + contextPath;
}
MethodInvokerFactory invokerFactory = ProviderRegistry.getProvider(MethodInvokerFactory.class);
if (invokerFactory == null) {
invokerFactory = new DefaultMethodInvokerFactory();
}
StringTokenizer st = new StringTokenizer(resourceIntfs, ",");
while (st.hasMoreTokens()) {
String className = st.nextToken().trim();
Class<?> clazz = Classes.forName(className);
for (Method method : clazz.getMethods()) {
// ignore the as method to allow declaration in client interfaces
if (!("as".equals(method.getName()) && Arrays.equals(method.getParameterTypes(), CLASS_ARG_ARRAY))) {
_methodMap.put(method.getName(), invokerFactory.createInvoker(path, clazz, method, _config));
}
}
}
// Create and configure the RESTEasy message composer
_messageComposer = RESTEasyComposition.getMessageComposer(_config);