Class AdapterManager

java.lang.Object
org.frankframework.lifecycle.AbstractConfigurableLifecyle
org.frankframework.configuration.AdapterManager
All Implemented Interfaces:
AutoCloseable, ConfigurableLifecycle, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle

public class AdapterManager extends AbstractConfigurableLifecyle implements org.springframework.context.ApplicationContextAware, AutoCloseable
Manager which holds all adapters within a Configuration. The manager will start/stop adapters, in a different thread.

Configure/start/stop lifecycles are managed by Spring.

See Also:
  • Constructor Details

    • AdapterManager

      public AdapterManager()
  • Method Details

    • getPhase

      public int getPhase()
      Specified by:
      getPhase in interface ConfigurableLifecycle
      Specified by:
      getPhase in interface org.springframework.context.Phased
      Specified by:
      getPhase in interface org.springframework.context.SmartLifecycle
    • addAdapter

      public void addAdapter(Adapter adapter)
    • removeAdapter

      public void removeAdapter(Adapter adapter)
    • setAdapterLifecycleWrappers

      public void setAdapterLifecycleWrappers(List<? extends AbstractAdapterLifecycleWrapper> adapterLifecycleWrappers)
    • addStartAdapterThread

      public void addStartAdapterThread(Runnable runnable)
    • removeStartAdapterThread

      public void removeStartAdapterThread(Runnable runnable)
    • addStopAdapterThread

      public void addStopAdapterThread(Runnable runnable)
    • removeStopAdapterThread

      public void removeStopAdapterThread(Runnable runnable)
    • getAdapter

      public Adapter getAdapter(String name)
    • getAdapters

      public final Map<String,Adapter> getAdapters()
    • getAdapterList

      @Nonnull public List<Adapter> getAdapterList()
    • configure

      public void configure()
      Description copied from interface: ConfigurableLifecycle
      Configure this component.

      In the case of a container, this will propagate the start signal to all components that apply.

      Specified by:
      configure in interface ConfigurableLifecycle
    • start

      public void start()
      Inherited from the Spring Lifecycle interface. Upon registering all Beans in the ApplicationContext (Configuration) the LifecycleProcessor will trigger this method. Starts all Adapters registered in this manager.
      Specified by:
      start in interface org.springframework.context.Lifecycle
    • stop

      public void stop()
      Stops all Adapters registered in this manager.
      Specified by:
      stop in interface org.springframework.context.Lifecycle
    • close

      public void close()
      Closes this AdapterManager. All adapters are removed from the Manager and you're unable to (re-)start after it's been closed!
      Specified by:
      close in interface AutoCloseable
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getApplicationContext

      public org.springframework.context.ApplicationContext getApplicationContext()
    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware