Package net.sf.ehcache.management
Class ManagementServerLoader
- java.lang.Object
-
- net.sf.ehcache.management.ManagementServerLoader
-
public class ManagementServerLoader extends java.lang.ObjectManagementServerLoader is a facility class to access the rest management interface One would use it from EhCache or QuartzScheduler to start or stop a new rest management interface or to simply register a cache or a scheduler to an already started management interface.It uses internally a ResourceClassLoader to load classes from a rest agent jar.
- Author:
- Anthony Dahanne
-
-
Constructor Summary
Constructors Constructor Description ManagementServerLoader()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisManagementAvailable()Check if the ehcache-rest-agent jar is on the classpathstatic voidregister(CacheManager cacheManager, java.lang.String clientUUID, ManagementRESTServiceConfiguration managementRESTServiceConfiguration)Register a cacheManager to management rest server.static voidunregister(java.lang.String registeredMgmtSvrBind, CacheManager cacheManager)Unregister a cache manager from a management rest server If it is the last cache manager bound to this server, stops the server too.
-
-
-
Method Detail
-
isManagementAvailable
public static boolean isManagementAvailable()
Check if the ehcache-rest-agent jar is on the classpath- Returns:
- true if ehcache-rest-agent is available, false otherwise.
-
register
public static void register(CacheManager cacheManager, java.lang.String clientUUID, ManagementRESTServiceConfiguration managementRESTServiceConfiguration)
Register a cacheManager to management rest server. If the server does not exist, starts it.- Parameters:
cacheManager- the cacheManager to registerclientUUID- the client UUIDmanagementRESTServiceConfiguration- the management configuration
-
unregister
public static void unregister(java.lang.String registeredMgmtSvrBind, CacheManager cacheManager)Unregister a cache manager from a management rest server If it is the last cache manager bound to this server, stops the server too.- Parameters:
registeredMgmtSvrBind- the bind identifying what to un-register fromcacheManager- the cacheManager to un-register
-
-