本文整理匯總了Java中com.optimaize.command4j.ext.extensions.timeout.configurabletimeout.TimeoutExtension類的典型用法代碼示例。如果您正苦於以下問題:Java TimeoutExtension類的具體用法?Java TimeoutExtension怎麽用?Java TimeoutExtension使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
TimeoutExtension類屬於com.optimaize.command4j.ext.extensions.timeout.configurabletimeout包,在下文中一共展示了TimeoutExtension類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: create
import com.optimaize.command4j.ext.extensions.timeout.configurabletimeout.TimeoutExtension; //導入依賴的package包/類
public static CommandExecutor create() {
return new CommandExecutorBuilder()
.withExtension(new TimeoutExtension())
.withExtension(new StdoutLoggingExtension())
.withExtension(new ExceptionTranslationExtension())
.withExtension(new AutoRetryExtension())
.build();
//could add name-api specific extensions here ...
}
示例2: create
import com.optimaize.command4j.ext.extensions.timeout.configurabletimeout.TimeoutExtension; //導入依賴的package包/類
public static CommandExecutor create() {
return new CommandExecutorBuilder()
.withExtension(new TimeoutExtension())
.withExtension(new StdoutLoggingExtension())
.withExtension(new ExceptionTranslationExtension())
.withExtension(new AutoRetryExtension())
.build();
//could add my own here, or remove some...
}
示例3: soapDefaultMode
import com.optimaize.command4j.ext.extensions.timeout.configurabletimeout.TimeoutExtension; //導入依賴的package包/類
@NotNull
public Mode soapDefaultMode() {
return Mode.create()
.with(TimeoutExtension.TIMEOUT, Duration.millis(5000))
.with(ExceptionTranslationExtension.TRANSLATOR, new SoapDefaultServerExceptionTranslator())
.with(CustomLoggingExtension.LOGGER, new CommandExecutionLoggerFactoryImpl(logger))
;
}
示例4: restDefaultMode
import com.optimaize.command4j.ext.extensions.timeout.configurabletimeout.TimeoutExtension; //導入依賴的package包/類
@NotNull
public Mode restDefaultMode() {
return Mode.create()
.with(TimeoutExtension.TIMEOUT, Duration.millis(5000))
.with(ExceptionTranslationExtension.TRANSLATOR, new RestDefaultServerExceptionTranslator())
.with(CustomLoggingExtension.LOGGER, new CommandExecutionLoggerFactoryImpl(logger))
;
}
示例5: create
import com.optimaize.command4j.ext.extensions.timeout.configurabletimeout.TimeoutExtension; //導入依賴的package包/類
private CommandExecutor create() {
return new CommandExecutorBuilder()
.withExtension(new TimeoutExtension())
.withExtension(new ExceptionTranslationExtension())
.withExtension(new CustomLoggingExtension())
.build();
}