當前位置: 首頁>>代碼示例>>Java>>正文


Java RetryException類代碼示例

本文整理匯總了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);
}
 
開發者ID:statefulj,項目名稱:statefulj-persistence-mongo-demo,代碼行數:9,代碼來源:HelloAction.java

示例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));
}
 
開發者ID:Steve973,項目名稱:camel-standalone,代碼行數:7,代碼來源:StopAction.java

示例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));
}
 
開發者ID:Steve973,項目名稱:camel-standalone,代碼行數:7,代碼來源:ResumeAction.java

示例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));
}
 
開發者ID:Steve973,項目名稱:camel-standalone,代碼行數:7,代碼來源:StartAction.java

示例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));
}
 
開發者ID:Steve973,項目名稱:camel-standalone,代碼行數:7,代碼來源:InitializeAction.java

示例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));
}
 
開發者ID:Steve973,項目名稱:camel-standalone,代碼行數:7,代碼來源:ShutdownAction.java

示例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));
}
 
開發者ID:Steve973,項目名稱:camel-standalone,代碼行數:7,代碼來源:SuspendAction.java

示例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);
}
 
開發者ID:statefulj,項目名稱:statefulj,代碼行數:4,代碼來源:MethodInvocationAction.java

示例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);
}
 
開發者ID:statefulj,項目名稱:statefulj,代碼行數:5,代碼來源:DomainEntityMethodInvocationAction.java

示例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);
}
 
開發者ID:statefulj,項目名稱:statefulj,代碼行數:42,代碼來源:ReloadTest.java

示例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);
	}
}
 
開發者ID:statefulj,項目名稱:statefulj,代碼行數:6,代碼來源:CompositeActionImpl.java

示例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);
}
 
開發者ID:statefulj,項目名稱:statefulj,代碼行數:5,代碼來源:WaitAndRetryActionImpl.java

示例13: execute

import org.statefulj.fsm.RetryException; //導入依賴的package包/類
public void execute(Order order, String event, Object... args) throws RetryException {
}
 
開發者ID:statefulj,項目名稱:statefulj,代碼行數:3,代碼來源:ActionA.java

示例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;
 
開發者ID:statefulj,項目名稱:statefulj,代碼行數:10,代碼來源:Action.java

示例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;
 
開發者ID:statefulj,項目名稱:statefulj,代碼行數:14,代碼來源:Transition.java


注:本文中的org.statefulj.fsm.RetryException類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。