r3321 - trunk/lima-swing/src/main/java/org/chorem/lima/service
Author: echatellier Date: 2012-01-13 14:49:57 +0100 (Fri, 13 Jan 2012) New Revision: 3321 Url: http://chorem.org/repositories/revision/lima/3321 Log: Un peu de doc, ca aide !! Modified: trunk/lima-swing/src/main/java/org/chorem/lima/service/ServiceMonitorableHandler.java Modified: trunk/lima-swing/src/main/java/org/chorem/lima/service/ServiceMonitorableHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/service/ServiceMonitorableHandler.java 2012-01-13 09:56:57 UTC (rev 3320) +++ trunk/lima-swing/src/main/java/org/chorem/lima/service/ServiceMonitorableHandler.java 2012-01-13 13:49:57 UTC (rev 3321) @@ -5,7 +5,7 @@ * $Id$ * $HeadURL$ * %% - * Copyright (C) 2008 - 2010 CodeLutin + * Copyright (C) 2008 - 2012 CodeLutin, Chatellier Eric * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as @@ -35,6 +35,19 @@ import java.util.ArrayList; import java.util.List; +/** + * This class surround a real service, but intercept addServiceListener + * and removeServiceListener that are not defined on delegated service + * object. + * + * All other call are forwarded on notified to registered listeners. + * + * @author chatellier + * @version $Revision$ + * + * Last update : $Date$ + * By : $Author$ + */ public class ServiceMonitorableHandler implements InvocationHandler { private static final Log log = @@ -79,7 +92,8 @@ protected void notifyMethod(Method method) { String methodName = method.getName(); - //TODO tchemit-2011-09-16 Could we have an explanation of this test ? + + // get is removed to only notify write modification if (!methodName.startsWith("get")) { for (ServiceListener serviceListener : listeners) { serviceListener.notifyMethod(service.toString(), methodName); @@ -87,5 +101,4 @@ } } } - }
participants (1)
-
echatellier@users.chorem.org