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


Java TimeoutExtension類代碼示例

本文整理匯總了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 ...
}
 
開發者ID:optimaize,項目名稱:nameapi-client-java,代碼行數:10,代碼來源:NameApiRemoteExecutors.java

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

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

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

示例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();
}
 
開發者ID:optimaize,項目名稱:anythingworks,代碼行數:8,代碼來源:RequestRunningCommandExecutor.java


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