* the url
* @return the XML loader
*/
public static IXMLLoader getXMLLoader(String url) {
if (url == null) {
return new DefaultXMLLoader();
}
int questionMarkPos = url.indexOf("?");
if (questionMarkPos > 0) {
url = url.substring(0, questionMarkPos);
}
if (url.equals("/services")) {
return new ServicesXMLLoader();
} else if (url.equals("/sessions")) {
return new SessionsXMLLoader();
} else if (url.equals("/subscriptions")) {
return new SubscriptionsXMLLoader();
} else if (url.equals("/servers")) {
return new ServersXMLLoader();
} else if (url.equals("/listeners")) {
return new RespondersXMLLoader();
} else if (url.equals("/resource")) {
return new ResourceXMLLoader();
} else if (url.equals("/logs")) {
return new LogsXMLLoader();
} else if (url.equals("/cache")) {
return new CacheXMLLoader();
} else if (url.equals("/maintenance")) {
return new MaintenanceXMLLoader();
} else if (url.equals("/dump")) {
return new DumpXMLLoader();
} else if (url.equals("/ajax/resource")) {
return new AjaxResourceXMLLoader();
} else if (url.equals("/ajax/timer")) {
return new TimerXMLLoader();
} else if (url.equals("/ajax/system")) {
return new AjaxSystemXMLLoader();
} else if (url.equals("/ajax/content")) {
return new AjaxContentXMLLoader();
} else if (url.equals("/ajax/maintenance")) {
return new AjaxMaintenanceXMLLoader();
} else {
return new DefaultXMLLoader();
}
}