本文整理匯總了Java中org.statefulj.fsm.RetryException類的典型用法代碼示例。如果您正苦於以下問題:Java RetryException類的具體用法?Java RetryException怎麽用?Java RetryException使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
RetryException類屬於org.statefulj.fsm包,在下文中一共展示了RetryException類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: execute
import org.statefulj.fsm.RetryException; //導入依賴的package包/類
@Override
public void execute(
Foo foo,
String event,
Object ... args) throws RetryException {
logger.debug("Hello {}", what);
logger.debug("Received event={}, for Foo={}", event, foo);
}
示例2: execute
import org.statefulj.fsm.RetryException; //導入依賴的package包/類
@Override
public void execute(Standalone standalone, String event, Object... args) throws RetryException {
standalone.getListeners().forEach(standaloneListener -> standaloneListener.beforeStop(standalone));
standalone.stop();
standalone.getListeners().forEach(standaloneListener -> standaloneListener.afterStop(standalone));
}
示例3: execute
import org.statefulj.fsm.RetryException; //導入依賴的package包/類
@Override
public void execute(Standalone standalone, String event, Object... args) throws RetryException {
standalone.getListeners().forEach(standaloneListener -> standaloneListener.beforeResume(standalone));
standalone.resume();
standalone.getListeners().forEach(standaloneListener -> standaloneListener.afterResume(standalone));
}
示例4: execute
import org.statefulj.fsm.RetryException; //導入依賴的package包/類
@Override
public void execute(Standalone standalone, String event, Object... args) throws RetryException {
standalone.getListeners().forEach(standaloneListener -> standaloneListener.beforeStart(standalone));
standalone.start();
standalone.getListeners().forEach(standaloneListener -> standaloneListener.afterStart(standalone));
}
示例5: execute
import org.statefulj.fsm.RetryException; //導入依賴的package包/類
@Override
public void execute(Standalone standalone, String event, Object... args) throws RetryException {
standalone.getListeners().forEach(standaloneListener -> standaloneListener.beforeInitialize(standalone));
standalone.initialize();
standalone.getListeners().forEach(standaloneListener -> standaloneListener.afterInitialize(standalone));
}
示例6: execute
import org.statefulj.fsm.RetryException; //導入依賴的package包/類
@Override
public void execute(Standalone standalone, String event, Object... args) throws RetryException {
standalone.getListeners().forEach(standaloneListener -> standaloneListener.beforeShutdown(standalone));
standalone.shutdown();
standalone.getListeners().forEach(standaloneListener -> standaloneListener.afterShutdown(standalone));
}
示例7: execute
import org.statefulj.fsm.RetryException; //導入依賴的package包/類
@Override
public void execute(Standalone standalone, String event, Object... args) throws RetryException {
standalone.getListeners().forEach(standaloneListener -> standaloneListener.beforeSuspend(standalone));
standalone.suspend();
standalone.getListeners().forEach(standaloneListener -> standaloneListener.afterSuspend(standalone));
}
示例8: invoke
import org.statefulj.fsm.RetryException; //導入依賴的package包/類
protected Object invoke(Object stateful, String event, List<Object> invokeParmList) throws RetryException, SecurityException, IllegalArgumentException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
return invoke(this.controller, invokeParmList);
}
示例9: invoke
import org.statefulj.fsm.RetryException; //導入依賴的package包/類
@Override
protected Object invoke(Object stateful, String event, List<Object> invokeParmList) throws RetryException, SecurityException, IllegalArgumentException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
return invoke(stateful, invokeParmList);
}
示例10: testReload
import org.statefulj.fsm.RetryException; //導入依賴的package包/類
@SuppressWarnings("unchecked")
@Test
public void testReload() throws RetryException {
Identifiable value = new Identifiable(1L);
Class<Identifiable> clazz = Identifiable.class;
String event = "pow";
Finder<Identifiable, Object> finder = mock(Finder.class);
Object context = new Object();
ContextWrapper<Object> cw = new ContextWrapper<Object>(context);
when(finder.find(clazz, 1L, event, context)).thenReturn(value);
State<Identifiable> from = mock(State.class);
State<Identifiable> to = mock(State.class);
Persister<Identifiable> persister = mock(Persister.class);
ApplicationContext appContext = mock(ApplicationContext.class);
when(appContext.getAutowireCapableBeanFactory()).thenReturn(mock(AutowireCapableBeanFactory.class));
TransitionImpl<Identifiable> transition = new TransitionImpl<Identifiable>(
from,
to,
event,
null,
false,
true);
FSM<Identifiable, Object> fsm = new FSM<Identifiable, Object>(
"fsm",
persister,
1,
1,
Identifiable.class,
Id.class,
appContext,
finder);
fsm.transition(value, from, event, transition, cw);
verify(finder).find(clazz, 1L, event, context);
}
示例11: execute
import org.statefulj.fsm.RetryException; //導入依賴的package包/類
public void execute(T stateful, String event, Object ... args) throws RetryException{
for(Action<T> action : this.actions) {
action.execute(stateful, event, args);
}
}
示例12: execute
import org.statefulj.fsm.RetryException; //導入依賴的package包/類
@Override
public void execute(T obj, String event, Object... args) throws RetryException {
throw new WaitAndRetryException(this.wait);
}
示例13: execute
import org.statefulj.fsm.RetryException; //導入依賴的package包/類
public void execute(Order order, String event, Object... args) throws RetryException {
}
示例14: execute
import org.statefulj.fsm.RetryException; //導入依賴的package包/類
/**
* Called to execute an action based off a State Transition.
*
* @param stateful The Stateful Entity
* @param event The ocurring Event
* @param args A set of optional arguments passed into the onEvent method of the {@link org.statefulj.fsm.FSM}
* @throws RetryException thrown when the event must be retried due to Stale state or some other error condition
*/
void execute(T stateful, String event, Object ... args) throws RetryException;
示例15: getStateActionPair
import org.statefulj.fsm.RetryException; //導入依賴的package包/類
/**
* Return the {@link org.statefulj.fsm.model.StateActionPair}
*
* @param stateful the Stateful Entity
*
* @return the {@link org.statefulj.fsm.model.StateActionPair}
* @param event The occurring Event
* @param args Optional parameters that was passed into the FSM
*
* @throws RetryException is thrown if there is an error determining the next State and Action and the FSM should
* re-process the event
*/
StateActionPair<T> getStateActionPair(T stateful, String event, Object ... args) throws RetryException;