public class StandaloneContainerRunnable extends Object implements Runnable
BeanLevelProperties
, ClusterInfo
, and a list of config locations).
This runnable allows to start a processing unit container within a running thread, mainly
allowing for custom class loader created based on the processing unit structure to be scoped only
within the running thread. When using StandaloneProcessingUnitContainer.main(String[])
this feature is not required but when integrating the standalone container within another
application this allows not to corrupt the external environment thread context class loader.
Constructor and Description |
---|
StandaloneContainerRunnable(BeanLevelProperties beanLevelProperties,
ClusterInfo clusterInfo,
List<String> configLocations)
Constructs a new standalone container runnable based on the provided configuration set
parameters.
|
Modifier and Type | Method and Description |
---|---|
org.springframework.context.ApplicationContext |
getApplicationContext()
Returns Spring application context used as the backend for this container.
|
Throwable |
getException() |
boolean |
hasException() |
boolean |
isInitialized()
Returns
true if the application context initialized successfully. |
boolean |
isRunning()
Return
true if this runnable is currently running. |
void |
run()
Constructs a new Spring
ApplicationContext based on the
configured list of config locations. |
void |
stop()
Stop this currently running container runnable.
|
public StandaloneContainerRunnable(BeanLevelProperties beanLevelProperties, ClusterInfo clusterInfo, List<String> configLocations)
beanLevelProperties
- The properties based configuration for Spring contextclusterInfo
- The cluster info configurationconfigLocations
- List of config locations (string based)public void run()
ApplicationContext
based on the
configured list of config locations. Also uses the provided ClusterInfo
and BeanLevelProperties
in order to further config the application context.public boolean isInitialized()
true
if the application context initialized successfully.public boolean isRunning()
true
if this runnable is currently running.public void stop()
public org.springframework.context.ApplicationContext getApplicationContext()
public boolean hasException()
public Throwable getException()
Copyright © GigaSpaces.