public class Project extends Object implements XProject
Constructor and Description |
---|
Project(org.springframework.context.ApplicationContext projectContext,
ClassLoader classLoader,
File artifactPath,
ServerConfig serverConfig) |
Modifier and Type | Method and Description |
---|---|
void |
addTransportListener(TransportListener transportListener) |
void |
addTransportSender(TransportSender transportSender) |
void |
destroy() |
void |
environmentChanged(XEnvironment environment)
XEnvironment 's tag changes will be notified through this method. |
ClassLoader |
getClassLoader() |
<T> T |
getFeature(Class<T> clazz) |
List<XIntegrationFlow> |
getIntegrationFlows() |
XMetricsEngine |
getMetricsEngine() |
ProjectConfig |
getProjectConfig() |
XServerConfig |
getServerConfig() |
Status |
getStatus()
Returns the current status of this Project
|
List<TransportListener> |
getTransportListeners() |
List<TransportSender> |
getTransportSenders() |
void |
init(org.springframework.context.ApplicationContext context) |
void |
pauseProject()
This method can be used to pause the project.
|
CompletableFuture<Boolean> |
readyForShutdown()
This method can be used to instruct the project to get ready for a shutdown operation.
|
void |
resumeProject()
This method can be used to resume the project from a paused state
|
void |
start() |
void |
stop() |
protected volatile Status status
public Project(org.springframework.context.ApplicationContext projectContext, ClassLoader classLoader, File artifactPath, ServerConfig serverConfig)
public void init(org.springframework.context.ApplicationContext context)
init
in interface Initializable
public void destroy()
destroy
in interface Initializable
public ProjectConfig getProjectConfig()
getProjectConfig
in interface XProject
public XServerConfig getServerConfig()
getServerConfig
in interface XProject
public List<TransportListener> getTransportListeners()
getTransportListeners
in interface XProject
public List<TransportSender> getTransportSenders()
getTransportSenders
in interface XProject
public void addTransportListener(TransportListener transportListener)
addTransportListener
in interface XProject
public void addTransportSender(TransportSender transportSender)
addTransportSender
in interface XProject
public List<XIntegrationFlow> getIntegrationFlows()
getIntegrationFlows
in interface XProject
public XMetricsEngine getMetricsEngine()
getMetricsEngine
in interface XProject
public <T> T getFeature(Class<T> clazz)
getFeature
in interface XProject
public ClassLoader getClassLoader()
getClassLoader
in interface XProject
public void environmentChanged(XEnvironment environment)
XEnvironmentListener
XEnvironment
's tag changes will be notified through this method. The concrete classes implementing this
method should know that some tags has changed (may be added ot removed). Therefore, it is the implementing method's
responsibility to make sure it browse the tag container again to determine what should be done. This design is introduced
to make sure that the listeners of the XEnvironment
can be configured to be acted upon multiple tags at the same
timeenvironmentChanged
in interface XEnvironmentListener
environment
- XEnvironment
of this nodepublic Status getStatus()
XProject
public void resumeProject()
XProject
resumeProject
in interface XProject
public void pauseProject()
XProject
pauseProject
in interface XProject
public CompletableFuture<Boolean> readyForShutdown()
XProject
readyForShutdown
in interface XProject
CompletableFuture
which will be completed when the project becomes idle and ready to
be shutdownCopyright © 2016–2019 AdroitLogic. All rights reserved.