From 3c4df318af849754a8b7c81378153e3a442b7699 Mon Sep 17 00:00:00 2001 From: crusader Date: Wed, 25 Apr 2018 22:48:57 +0900 Subject: [PATCH] ing --- .../general/server/GeneralContainerServer.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/loafle/overflow/container/general/server/GeneralContainerServer.java b/src/main/java/com/loafle/overflow/container/general/server/GeneralContainerServer.java index a16e4a9..8000e39 100644 --- a/src/main/java/com/loafle/overflow/container/general/server/GeneralContainerServer.java +++ b/src/main/java/com/loafle/overflow/container/general/server/GeneralContainerServer.java @@ -38,19 +38,19 @@ public class GeneralContainerServer extends ContainerServer { this.services.put(bean.getClass(), bean); }); - this.execServices(this.services, "initService", Service.OrderedServices, false); + this.execServices(this.services, com.loafle.overflow.core.interfaces.Service.ServiceMethodType.INIT, Service.OrderedServices, false); } @Override protected void onStart() throws Exception { super.onStart(); - this.execServices(this.services, "startService", Service.OrderedServices, false); + this.execServices(this.services, com.loafle.overflow.core.interfaces.Service.ServiceMethodType.START, Service.OrderedServices, false); } @Override protected void onStop() throws Exception { - this.execServices(this.services, "stopService", Service.OrderedServices, true); + this.execServices(this.services, com.loafle.overflow.core.interfaces.Service.ServiceMethodType.STOP, Service.OrderedServices, true); super.onStop(); @@ -58,13 +58,13 @@ public class GeneralContainerServer extends ContainerServer { @Override protected void destroy() throws Exception { - this.execServices(this.services, "destroyService", Service.OrderedServices, true); + this.execServices(this.services, com.loafle.overflow.core.interfaces.Service.ServiceMethodType.DESTROY, Service.OrderedServices, true); super.destroy(); } - private void execServices(Map, Object> services, String methodName, Class[] orderedTypes, boolean reverse) throws Exception { + private void execServices(Map, Object> services, com.loafle.overflow.core.interfaces.Service.ServiceMethodType methodType, Class[] orderedTypes, boolean reverse) throws Exception { if (null == services || 0 == services.size()) { return; } @@ -101,7 +101,7 @@ public class GeneralContainerServer extends ContainerServer { for (int i = 0; i < orderedServices.size(); i++) { Object service = orderedServices.get(i); Class clazz = service.getClass(); - Method method = clazz.getMethod(methodName, parameterTypes); + Method method = clazz.getMethod(methodType.toString(), parameterTypes); if (null == method) { continue; }