Package org.frankframework.configuration
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:
-
Field Summary
Fields inherited from class org.frankframework.lifecycle.AbstractConfigurableLifecyle
log
Fields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAdapter
(Adapter adapter) void
addStartAdapterThread
(Runnable runnable) void
addStopAdapterThread
(Runnable runnable) void
close()
Closes this AdapterManager.void
Configure this component.getAdapter
(String name) org.springframework.context.ApplicationContext
int
getPhase()
void
removeAdapter
(Adapter adapter) void
removeStartAdapterThread
(Runnable runnable) void
removeStopAdapterThread
(Runnable runnable) void
setAdapterLifecycleWrappers
(List<? extends AbstractAdapterLifecycleWrapper> adapterLifecycleWrappers) void
setApplicationContext
(org.springframework.context.ApplicationContext applicationContext) void
start()
Inherited from the SpringLifecycle
interface.void
stop()
Stops all Adapters registered in this manager.toString()
Methods inherited from class org.frankframework.lifecycle.AbstractConfigurableLifecyle
getState, inState, isRunning, updateState
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.frankframework.lifecycle.ConfigurableLifecycle
isAutoStartup
Methods inherited from interface org.springframework.context.SmartLifecycle
stop
-
Constructor Details
-
AdapterManager
public AdapterManager()
-
-
Method Details
-
getPhase
public int getPhase()- Specified by:
getPhase
in interfaceConfigurableLifecycle
- Specified by:
getPhase
in interfaceorg.springframework.context.Phased
- Specified by:
getPhase
in interfaceorg.springframework.context.SmartLifecycle
-
addAdapter
-
removeAdapter
-
setAdapterLifecycleWrappers
public void setAdapterLifecycleWrappers(List<? extends AbstractAdapterLifecycleWrapper> adapterLifecycleWrappers) -
addStartAdapterThread
-
removeStartAdapterThread
-
addStopAdapterThread
-
removeStopAdapterThread
-
getAdapter
-
getAdapters
-
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 interfaceConfigurableLifecycle
-
start
public void start()Inherited from the SpringLifecycle
interface. Upon registering all Beans in the ApplicationContext (Configuration) theLifecycleProcessor
will trigger this method. Starts all Adapters registered in this manager.- Specified by:
start
in interfaceorg.springframework.context.Lifecycle
-
stop
public void stop()Stops all Adapters registered in this manager.- Specified by:
stop
in interfaceorg.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 interfaceAutoCloseable
-
toString
-
getApplicationContext
public org.springframework.context.ApplicationContext getApplicationContext() -
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) - Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
-