Package org.apache.uima.ducc.ws

Examples of org.apache.uima.ducc.ws.WebServerComponent


   * @throws Exception
   */
  @Bean
  public WebServerComponent webServer() throws Exception {
    String methodName = "webServer";
    WebServerComponent ws = null;
    try {
      ws = new WebServerComponent(common.camelContext(), common);
      DuccBoot.boot(common);
      //  Instantiate delegate listener to receive incoming messages.
      WebServerEventListener delegateListener = this.webServerDelegateListener(ws);
      //  Inject a dispatcher into the listener in case it needs to send
      //  a message to another component
      delegateListener.setDuccEventDispatcher(webServerTransport.duccEventDispatcher(common.orchestratorStateUpdateEndpoint, ws.getContext()));
      //  Inject Camel Router that will delegate messages to WebServer delegate listener
      ws.getContext().addRoutes(this.routeBuilderForIncomingRequests(common.orchestratorStateUpdateEndpoint, delegateListener));
      ws.getContext().addRoutes(this.routeBuilderForIncomingRequests(common.nodeMetricsEndpoint, delegateListener));
      ws.getContext().addRoutes(this.routeBuilderForIncomingRequests(common.rmStateUpdateEndpoint, delegateListener));
      ws.getContext().addRoutes(this.routeBuilderForIncomingRequests(common.smStateUpdateEndpoint, delegateListener));
      ws.getContext().addRoutes(this.routeBuilderForIncomingRequests(common.pmStateUpdateEndpoint, delegateListener));
    }
    catch(Throwable t) {
      duccLogger.error(methodName, jobid, t);
    }
    return ws;
View Full Code Here

TOP

Related Classes of org.apache.uima.ducc.ws.WebServerComponent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.