@Override public S id(String id) { return super.id(id); }
/** * Configure the component identifier. Used as the {@code beanName} to register the * bean in the application context for this component. * @param id the id. * @return the spec. */ protected S id(String id) { this.id = id; return _this(); }
/** * @return the configured component. */ public T get() { if (this.target == null) { this.target = doGet(); } return this.target; }
@Override public Class<?> getObjectType() { return get().getClass(); }
@Override public void start() { T instance = get(); if (instance instanceof Lifecycle) { ((Lifecycle) instance).start(); } }
@Override protected S id(String id) { return super.id(id); }
@Override public boolean isAutoStartup() { T instance = get(); return instance instanceof SmartLifecycle && ((SmartLifecycle) instance).isAutoStartup(); }
/** * Configure the component identifier. Used as the {@code beanName} to register the * bean in the application context for this component. * @param id the id. * @return the spec. */ protected S id(String id) { this.id = id; return _this(); }
/** * @return the configured component. */ public T get() { if (this.target == null) { this.target = doGet(); } return this.target; }
@Override public S id(String id) { return super.id(id); }
@Override public int getPhase() { T instance = get(); if (instance instanceof SmartLifecycle) { return ((SmartLifecycle) instance).getPhase(); } else { return 0; } }
@Override public S id(String id) { this.endpointFactoryBean.setBeanName(id); return super.id(id); }
@Override public void stop(Runnable callback) { T instance = get(); if (instance instanceof SmartLifecycle) { ((SmartLifecycle) instance).stop(callback); } else { callback.run(); } }
@Override public S id(String id) { this.target.setBeanName(id); return super.id(id); }
@Override public void stop() { T instance = get(); if (instance instanceof Lifecycle) { ((Lifecycle) instance).stop(); } }
/** * {@inheritDoc} * Configure the message producer's bean name. */ @Override public S id(String id) { this.target.setBeanName(id); return super.id(id); }
@Override public boolean isRunning() { T instance = get(); return !(instance instanceof Lifecycle) || ((Lifecycle) instance).isRunning(); }
@Override public S id(String id) { return super.id(id); }
@Override protected T createInstance() { T instance = get(); if (instance instanceof InitializingBean) { try { ((InitializingBean) instance).afterPropertiesSet(); } catch (Exception e) { throw new IllegalStateException("Cannot initialize bean: " + instance, e); } } return instance; }
@Override public KafkaMessageListenerContainerSpec<K, V> id(String id) { return super.id(id); }