org.springframework.webflow.engine.Flow.handleEvent()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(108)

本文整理了Java中org.springframework.webflow.engine.Flow.handleEvent()方法的一些代码示例,展示了Flow.handleEvent()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Flow.handleEvent()方法的具体详情如下:
包路径:org.springframework.webflow.engine.Flow
类名称:Flow
方法名:handleEvent

Flow.handleEvent介绍

[英]Handle the last event that occurred against an active session of this flow.
[中]处理针对此流的活动会话发生的最后一个事件。

代码示例

代码示例来源:origin: org.springframework.webflow/spring-webflow

public boolean handleEvent(Event event) {
  setCurrentEvent(event);
  return ((Flow) getActiveFlow()).handleEvent(this);
}

代码示例来源:origin: org.springframework.webflow/spring-webflow

boolean handleEvent(Event event, RequestControlContext context) {
  listeners.fireEventSignaled(context, event);
  return getActiveSessionInternal().getFlow().handleEvent(context);
}

代码示例来源:origin: org.springframework.webflow/org.springframework.webflow

public boolean handleEvent(Event event) {
  setCurrentEvent(event);
  return ((Flow) getActiveFlow()).handleEvent(this);
}

代码示例来源:origin: spring-projects/spring-webflow

public boolean handleEvent(Event event) {
  setCurrentEvent(event);
  return ((Flow) getActiveFlow()).handleEvent(this);
}

代码示例来源:origin: org.springframework.webflow/org.springframework.webflow

boolean handleEvent(Event event, RequestControlContext context) {
  listeners.fireEventSignaled(context, event);
  return getActiveSessionInternal().getFlow().handleEvent(context);
}

代码示例来源:origin: spring-projects/spring-webflow

boolean handleEvent(Event event, RequestControlContext context) {
  listeners.fireEventSignaled(context, event);
  return getActiveSessionInternal().getFlow().handleEvent(context);
}

代码示例来源:origin: spring-projects/spring-webflow

public void testOnEventNullCurrentState() {
  MockRequestControlContext context = new MockRequestControlContext(flow);
  Event event = new Event(this, "foo");
  try {
    context.setCurrentEvent(event);
    flow.handleEvent(context);
  } catch (IllegalStateException e) {
  }
}

代码示例来源:origin: spring-projects/spring-webflow

public void testOnEventInvalidCurrentState() {
  MockRequestControlContext context = new MockRequestControlContext(flow);
  context.setCurrentState(flow.getStateInstance("myState2"));
  Event event = new Event(this, "submit");
  context.setCurrentEvent(event);
  try {
    context.setCurrentEvent(event);
    flow.handleEvent(context);
  } catch (IllegalStateException e) {
  }
}

代码示例来源:origin: spring-projects/spring-webflow

public void testOnEventNoTransition() {
  MockRequestControlContext context = new MockRequestControlContext(flow);
  context.setCurrentState(flow.getStateInstance("myState1"));
  Event event = new Event(this, "bogus");
  context.setCurrentEvent(event);
  try {
    context.setCurrentEvent(event);
    flow.handleEvent(context);
  } catch (NoMatchingTransitionException e) {
  }
}

代码示例来源:origin: spring-projects/spring-webflow

public void testOnEvent() {
  MockRequestControlContext context = new MockRequestControlContext(flow);
  context.setCurrentState(flow.getStateInstance("myState1"));
  Event event = new Event(this, "submit");
  context.setCurrentEvent(event);
  assertTrue(context.getFlowExecutionContext().isActive());
  context.setCurrentEvent(event);
  flow.handleEvent(context);
  assertTrue(!context.getFlowExecutionContext().isActive());
}

代码示例来源:origin: spring-projects/spring-webflow

public void testOnEventGlobalTransition() {
  MockRequestControlContext context = new MockRequestControlContext(flow);
  context.setCurrentState(flow.getStateInstance("myState1"));
  Event event = new Event(this, "globalEvent");
  context.setCurrentEvent(event);
  assertTrue(context.getFlowExecutionContext().isActive());
  context.setCurrentEvent(event);
  flow.handleEvent(context);
  assertTrue(!context.getFlowExecutionContext().isActive());
}

相关文章