com.terracotta.management.ApplicationEhCache Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of management-ehcache-common Show documentation
Show all versions of management-ehcache-common Show documentation
A common library shared between different management-ehcache implementation versions
/*
* All content copyright (c) 2003-2012 Terracotta, Inc., except as may otherwise be noted in a separate copyright
* notice. All rights reserved.
*/
package com.terracotta.management;
import java.util.HashSet;
import java.util.ServiceLoader;
import java.util.Set;
import javax.ws.rs.core.Application;
public class ApplicationEhCache extends Application {
@Override
public Set> getClasses() {
Set> restResourcesClasses = new HashSet>();
ServiceLoader loader = ServiceLoader.load(ApplicationEhCacheService.class, ApplicationEhCacheService.class.getClassLoader());
for (ApplicationEhCacheService applicationEhCacheService : loader) {
restResourcesClasses.addAll(applicationEhCacheService.getRestResourceClasses());
}
return restResourcesClasses;
}
}