예제 #1
0
 @Override
 public void exitInvokeFromSource(WUMLParser.InvokeFromSourceContext ctx) {
   // String inbountEndpointName = ctx.INBOUNDENDPOINTNAME().getText();
   String pipelineName = ctx.PIPELINENAME().getText();
   integrationFlow.getEsbConfigHolder().getInboundEndpoint().setPipeline(pipelineName);
   pipelineStack.push(pipelineName);
   // activePipeline = pipelineName;
   super.exitInvokeFromSource(ctx);
 }
예제 #2
0
 @Override
 public void exitOutboundEndpointDefStatement(WUMLParser.OutboundEndpointDefStatementContext ctx) {
   String protocolName =
       StringParserUtil.getValueWithinDoubleQuotes(
           ctx.outboundEndpointDef().PROTOCOLDEF().getText());
   String uri =
       StringParserUtil.getValueWithinDoubleQuotes(ctx.outboundEndpointDef().HOSTDEF().getText());
   OutboundEndpoint outboundEndpoint =
       OutboundEndpointFactory.getOutboundEndpoint(
           OutboundEndpointType.valueOf(protocolName), ctx.OUTBOUNDENDPOINTNAME().getText(), uri);
   integrationFlow.getEsbConfigHolder().addOutboundEndpoint(outboundEndpoint);
   super.exitOutboundEndpointDefStatement(ctx);
 }
예제 #3
0
  @Override
  public void exitMessageProcessingDef(WUMLParser.MessageProcessingDefContext ctx) {
    String mediatorName = ctx.MEDIATORNAME().getText();
    String configurations =
        StringParserUtil.getValueWithinDoubleQuotes(ctx.ARGUMENTLISTDEF().getText());
    Mediator mediator = MediatorFactory.getInstance().getMediator(mediatorName, configurations);
    if (ifMultiThenBlockStarted) {
      filterMediatorStack.peek().addThenMediator(mediator);

    } else if (ifElseBlockStarted) {
      filterMediatorStack.peek().addOtherwiseMediator(mediator);

    } else {
      integrationFlow.getEsbConfigHolder().getPipeline(pipelineStack.peek()).addMediator(mediator);
    }
    super.exitMessageProcessingDef(ctx);
  }
예제 #4
0
 @Override
 public void exitConditionStatement(WUMLParser.ConditionStatementContext ctx) {
   String sourceDefinition =
       StringParserUtil.getValueWithinDoubleQuotes(ctx.conditionDef().SOURCEDEF().getText());
   Source source = new Source(sourceDefinition);
   Condition condition =
       new Condition(
           source,
           Pattern.compile(
               StringParserUtil.getValueWithinDoubleQuotes(
                   ctx.conditionDef().PATTERNDEF().getText())));
   FilterMediator filterMediator = new FilterMediator(condition);
   integrationFlow
       .getEsbConfigHolder()
       .getPipeline(pipelineStack.peek())
       .addMediator(filterMediator);
   filterMediatorStack.push(filterMediator);
   super.exitConditionStatement(ctx);
 }
예제 #5
0
 @Override
 public void exitInboundEndpointDefStatement(WUMLParser.InboundEndpointDefStatementContext ctx) {
   String protocolName =
       StringParserUtil.getValueWithinDoubleQuotes(
           ctx.inboundEndpointDef().PROTOCOLDEF().getText());
   int port =
       Integer.parseInt(
           StringParserUtil.getValueWithinBrackets(ctx.inboundEndpointDef().PORTDEF().getText()));
   String context =
       StringParserUtil.getValueWithinDoubleQuotes(
           ctx.inboundEndpointDef().CONTEXTDEF().getText());
   InboundEndpoint inboundEndpoint =
       InboundEndpointFactory.getInboundEndpoint(
           InboundEndpointType.valueOf(protocolName), ctx.INBOUNDENDPOINTNAME().getText(), port);
   if (inboundEndpoint instanceof HTTPInboundEP) {
     ((HTTPInboundEP) inboundEndpoint).setContext(context);
   }
   integrationFlow.getEsbConfigHolder().setInboundEndpoint(inboundEndpoint);
   super.exitInboundEndpointDefStatement(ctx);
 }
예제 #6
0
  @Override
  public void exitInvokeToSource(WUMLParser.InvokeToSourceContext ctx) {
    Mediator mediator = MediatorFactory.getInstance().getMediator("respond", null);
    if (ifMultiThenBlockStarted) {
      filterMediatorStack.peek().addThenMediator(mediator);

    } else if (ifElseBlockStarted) {
      filterMediatorStack.peek().addOtherwiseMediator(mediator);

    } else {
      //            String mediatorName =
      // StringParserUtil.getValueWithinDoubleQuotes(ctx.MEDIATORNAMESTRINGX().getText());
      //            String configurations =
      // StringParserUtil.getValueWithinDoubleQuotes(ctx.CONFIGSDEF().getText());
      //            Mediator mediator =
      // MediatorFactory.getMediator(MediatorType.valueOf(mediatorName), configurations);
      integrationFlow.getEsbConfigHolder().getPipeline(pipelineStack.peek()).addMediator(mediator);
    }
    pipelineStack.pop();
    super.exitInvokeToSource(ctx);
  }
예제 #7
0
 @Override
 public void exitPipelineDefStatement(WUMLParser.PipelineDefStatementContext ctx) {
   Pipeline pipeline = new Pipeline(ctx.PIPELINENAME().getText());
   integrationFlow.getEsbConfigHolder().addPipeline(pipeline);
   super.exitPipelineDefStatement(ctx);
 }