/* * (non-Javadoc) * @see org.springframework.context.Lifecycle#start() */ @Override public void start() { if (!ObjectUtils.isEmpty(gatewaySenders)) { synchronized (gatewaySenders) { for (Object obj : gatewaySenders) { GatewaySender gatewaySender = (GatewaySender) obj; if (!(gatewaySender.isManualStart() || gatewaySender.isRunning())) { gatewaySender.start(); } } } } this.running = true; }
/* * (non-Javadoc) * @see org.springframework.context.Lifecycle#stop() */ @Override public void stop() { if (!ObjectUtils.isEmpty(gatewaySenders)) { synchronized (gatewaySenders) { for (Object gatewaySender : gatewaySenders) { ((GatewaySender) gatewaySender).stop(); } } } this.running = false; }