当前位置: 首页>>代码示例>>Java>>正文


Java Service类代码示例

本文整理汇总了Java中com.yammer.dropwizard.Service的典型用法代码示例。如果您正苦于以下问题:Java Service类的具体用法?Java Service怎么用?Java Service使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Service类属于com.yammer.dropwizard包,在下文中一共展示了Service类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: LifecycleServerCommand

import com.yammer.dropwizard.Service; //导入依赖的package包/类
public LifecycleServerCommand(Service<T> service, Class<T> configurationClass) {
    super(service, COMMAND_LINE_NAME, "Test version of the server command, which enables server shutdown.");
    this.configurationClass = configurationClass;
}
 
开发者ID:yammer,项目名称:dropwizard-testing-integration,代码行数:5,代码来源:LifecycleServerCommand.java

示例2: EmbeddedServerCommand

import com.yammer.dropwizard.Service; //导入依赖的package包/类
public EmbeddedServerCommand(Service<T> service) {
    super(service, "embedded-server", "Starts an HTTP server for running within a larger application");
    this.configurationClass = service.getConfigurationClass();
}
 
开发者ID:wrightmikea,项目名称:pluot,代码行数:5,代码来源:EmbeddedServerCommand.java

示例3: getSingletonService

import com.yammer.dropwizard.Service; //导入依赖的package包/类
/**
 * Override to provide your particular Dropwizard Service.
 *
 * @return your {@link Service}
 */
public abstract Service getSingletonService();
 
开发者ID:twilio,项目名称:wiztowar,代码行数:7,代码来源:DWAdapter.java

示例4: create

import com.yammer.dropwizard.Service; //导入依赖的package包/类
/**
 *
 * @param testClass the class of the test
 * @param serviceUnderTest an instance of {@link com.yammer.dropwizard.Service} under test. As explained in the documentation for
 * {@link LifecycleService#LifecycleService(com.yammer.dropwizard.Service)} the {@link com.yammer.dropwizard.Service#run(String[])} method should not
 *                         have been executed.
 * @param configFile the path to the config file
 * @param additionalFiles filenames of additional files to be available at the same path as the server run directory. They are expected to be found in
 *                        the resources for the class under test.
 * @param <T>
 * @param <S>
 * @return
 * @throws Exception
 */
public static <T extends Configuration, S extends Service<T>> TestServer<T, S>
create(Class<?> testClass, S serviceUnderTest, final String configFile, String... additionalFiles) throws Exception {
    return new TestServer<>(testClass, new LifecycleService<>(serviceUnderTest), configFile, additionalFiles);
}
 
开发者ID:yammer,项目名称:dropwizard-testing-integration,代码行数:19,代码来源:TestServer.java

示例5: getDelegate

import com.yammer.dropwizard.Service; //导入依赖的package包/类
protected abstract Service<C> getDelegate(); 
开发者ID:yammer,项目名称:dropwizard-testing-integration,代码行数:2,代码来源:ServiceWrapper.java


注:本文中的com.yammer.dropwizard.Service类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。