コード例 #1
0
 @Override
 public void exitIntegrationFlowDefStatement(WUMLParser.IntegrationFlowDefStatementContext ctx) {
   // Create the integration flow when definition is found
   integrationFlow =
       new WUMLConfigurationBuilder.IntegrationFlow(ctx.INTEGRATIONFLOWNAME().getText());
   super.exitIntegrationFlowDefStatement(ctx);
 }
コード例 #2
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);
 }
コード例 #3
0
 @Override
 public void exitIfStatement(WUMLParser.IfStatementContext ctx) {
   // ctx.expression().EXPRESSIONX()
   ifMultiThenBlockStarted = false;
   ifElseBlockStarted = false;
   if (!filterMediatorStack.isEmpty()) {
     filterMediatorStack.pop();
   }
   super.exitIfStatement(ctx);
 }
コード例 #4
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);
 }
コード例 #5
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);
  }
コード例 #6
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);
 }
コード例 #7
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);
 }
コード例 #8
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);
  }
コード例 #9
0
 @Override
 public void exitScript(WUMLParser.ScriptContext ctx) {
   super.exitScript(ctx);
 }
コード例 #10
0
 @Override
 public void exitHandler(WUMLParser.HandlerContext ctx) {
   super.exitHandler(ctx);
 }
コード例 #11
0
 @Override
 public void exitRefStatement(WUMLParser.RefStatementContext ctx) {
   pipelineStack.push(ctx.PIPELINENAME().getText());
   super.exitRefStatement(ctx);
 }
コード例 #12
0
 @Override
 public void exitExpression(WUMLParser.ExpressionContext ctx) {
   super.exitExpression(ctx);
 }
コード例 #13
0
 @Override
 public void enterIfElseBlock(WUMLParser.IfElseBlockContext ctx) {
   ifMultiThenBlockStarted = false;
   ifElseBlockStarted = true;
   super.enterIfElseBlock(ctx);
 }
コード例 #14
0
 @Override
 public void exitIfElseBlock(WUMLParser.IfElseBlockContext ctx) {
   ifElseBlockStarted = false;
   super.exitIfElseBlock(ctx);
 }
コード例 #15
0
 @Override
 public void exitPipelineDef(WUMLParser.PipelineDefContext ctx) {
   super.exitPipelineDef(ctx);
 }
コード例 #16
0
 @Override
 public void exitProcessingStatement(WUMLParser.ProcessingStatementContext ctx) {
   super.exitProcessingStatement(ctx);
 }
コード例 #17
0
 @Override
 public void exitPipelineDefStatement(WUMLParser.PipelineDefStatementContext ctx) {
   Pipeline pipeline = new Pipeline(ctx.PIPELINENAME().getText());
   integrationFlow.getEsbConfigHolder().addPipeline(pipeline);
   super.exitPipelineDefStatement(ctx);
 }
コード例 #18
0
 @Override
 public void exitParElseBlock(WUMLParser.ParElseBlockContext ctx) {
   super.exitParElseBlock(ctx);
 }
コード例 #19
0
 @Override
 public void exitMediatorDef(WUMLParser.MediatorDefContext ctx) {
   super.exitMediatorDef(ctx);
 }
コード例 #20
0
 @Override
 public void exitInvokeFromTarget(WUMLParser.InvokeFromTargetContext ctx) {
   String pipelineName = ctx.PIPELINENAME().getText();
   pipelineStack.push(pipelineName);
   super.exitInvokeFromTarget(ctx);
 }
コード例 #21
0
 @Override
 public void exitOutboundEndpointDef(WUMLParser.OutboundEndpointDefContext ctx) {
   super.exitOutboundEndpointDef(ctx);
 }
コード例 #22
0
 @Override
 public void exitStatement(WUMLParser.StatementContext ctx) {
   super.exitStatement(ctx);
 }
コード例 #23
0
 @Override
 public void exitMediatorDefStatement(WUMLParser.MediatorDefStatementContext ctx) {
   super.exitMediatorDefStatement(ctx);
 }
コード例 #24
0
 @Override
 public void exitParticipantStatement(WUMLParser.ParticipantStatementContext ctx) {
   super.exitParticipantStatement(ctx);
 }
コード例 #25
0
 @Override
 public void exitIntegrationFlowDef(WUMLParser.IntegrationFlowDefContext ctx) {
   super.exitIntegrationFlowDef(ctx);
 }
コード例 #26
0
 @Override
 public void exitTitleStatement(WUMLParser.TitleStatementContext ctx) {
   // Create the integration flow when definition is found
   integrationFlow = new WUMLConfigurationBuilder.IntegrationFlow(ctx.IDENTIFIER().getText());
   super.exitTitleStatement(ctx);
 }
コード例 #27
0
 @Override
 public void exitParMultiThenBlock(WUMLParser.ParMultiThenBlockContext ctx) {
   super.exitParMultiThenBlock(ctx);
 }