Class SpringMicroservicesRunner

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware

    @Component
    public class SpringMicroservicesRunner
    extends org.wso2.msf4j.MicroservicesRunner
    implements org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean
    This runner initializes the microservices runtime based on provided Spring configuration, deploys microservices, service interceptors and starts the relevant transports.
    Since:
    2.0.0
    • Field Summary

      • Fields inherited from class org.wso2.msf4j.MicroservicesRunner

        serverConnectors
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void afterPropertiesSet()  
      protected void configureTransport()  
      protected void configureTransport​(java.util.Collection<org.wso2.transport.http.netty.contract.config.ListenerConfiguration> listeners, java.util.Collection<TransportConfig> transportConfigs)  
      void init()  
      void setApplicationContext​(org.springframework.context.ApplicationContext applicationContext)  
      • Methods inherited from class org.wso2.msf4j.MicroservicesRunner

        addExceptionMapper, addGlobalRequestInterceptor, addGlobalResponseInterceptor, addInterceptor, configureTransport, configureTransport, deploy, deploy, deployWebSocketEndpoint, getMsRegistry, handleServiceLifecycleMethods, setSessionManager, start, stop
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SpringMicroservicesRunner

        public SpringMicroservicesRunner()
      • SpringMicroservicesRunner

        public SpringMicroservicesRunner​(int... ports)
    • Method Detail

      • init

        public void init()
      • setApplicationContext

        public void setApplicationContext​(org.springframework.context.ApplicationContext applicationContext)
                                   throws org.springframework.beans.BeansException
        Specified by:
        setApplicationContext in interface org.springframework.context.ApplicationContextAware
        Throws:
        org.springframework.beans.BeansException
      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws java.lang.Exception
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Throws:
        java.lang.Exception
      • configureTransport

        protected void configureTransport()
        Overrides:
        configureTransport in class org.wso2.msf4j.MicroservicesRunner
      • configureTransport

        protected void configureTransport​(java.util.Collection<org.wso2.transport.http.netty.contract.config.ListenerConfiguration> listeners,
                                          java.util.Collection<TransportConfig> transportConfigs)