本文整理汇总了Java中com.netflix.governator.guice.BootstrapModule类的典型用法代码示例。如果您正苦于以下问题:Java BootstrapModule类的具体用法?Java BootstrapModule怎么用?Java BootstrapModule使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BootstrapModule类属于com.netflix.governator.guice包,在下文中一共展示了BootstrapModule类的34个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: main
点赞 3
import com.netflix.governator.guice.BootstrapModule; //导入依赖的package包/类
public static void main(String[] args) throws Exception {
final Injector injector = LifecycleInjector.builder()
.withBootstrapModule(new BootstrapModule() {
@Override
public void configure(BootstrapBinder binder) {
try {
binder.bindConfigurationProvider().toInstance(getConfigurationProvider());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
})
.withModules(new MqttBotModule()).createInjector();
LifecycleManager manager = injector.getInstance(LifecycleManager.class);
manager.start();
final BotController instance = injector.getInstance(BotController.class);
instance.startAndWait();
}
开发者ID:dobermai,
项目名称:mqtt-irc-bot,
代码行数:25,
代码来源:Main.java
示例2: createInjector
点赞 3
import com.netflix.governator.guice.BootstrapModule; //导入依赖的package包/类
private Injector createInjector(final Properties properties) {
injector = LifecycleInjector
.builder()
.withBootstrapModule(
new BootstrapModule() {
@Override
public void configure(BootstrapBinder binder) {
binder.bindConfigurationProvider().toInstance(
new PropertiesConfigurationProvider(properties));
}
}
)
.withModules(new SuroClientModule())
.build().createInjector();
LifecycleManager manager = injector.getInstance(LifecycleManager.class);
try {
manager.start();
} catch (Exception e) {
throw new RuntimeException("LifecycleManager cannot start with an exception: " + e.getMessage(), e);
}
return injector;
}
开发者ID:Netflix,
项目名称:suro,
代码行数:24,
代码来源:SuroClient.java
示例3: setup
点赞 3
import com.netflix.governator.guice.BootstrapModule; //导入依赖的package包/类
@Before
public void setup() throws Exception {
servers = TestConnectionPool.startServers(3);
final Properties props = new Properties();
props.setProperty(ClientConfig.LB_SERVER, TestConnectionPool.createConnectionString(servers));
props.setProperty(ClientConfig.MINIMUM_RECONNECT_TIME_INTERVAL, "1");
props.setProperty(ClientConfig.RECONNECT_INTERVAL, "1");
props.setProperty(ClientConfig.RECONNECT_TIME_INTERVAL, "1");
props.setProperty(ClientConfig.APP, "app");
injector = LifecycleInjector.builder()
.withBootstrapModule(new BootstrapModule() {
@Override
public void configure(BootstrapBinder binder) {
binder.bindConfigurationProvider().toInstance(new PropertiesConfigurationProvider(props));
binder.bind(ILoadBalancer.class).to(StaticLoadBalancer.class);
}
}).build().createInjector();
injector.getInstance(LifecycleManager.class).start();
}
开发者ID:Netflix,
项目名称:suro,
代码行数:22,
代码来源:TestSyncSuroClient.java
示例4: setupFile
点赞 3
import com.netflix.governator.guice.BootstrapModule; //导入依赖的package包/类
private void setupFile(final Properties props, String filePath) throws Exception {
servers = TestConnectionPool.startServers(3);
props.put(ClientConfig.LB_SERVER, TestConnectionPool.createConnectionString(servers));
props.put(ClientConfig.ASYNC_FILEQUEUE_PATH, filePath);
props.put(ClientConfig.ASYNC_QUEUE_TYPE, "file");
injector = LifecycleInjector.builder()
.withBootstrapModule(new BootstrapModule() {
@Override
public void configure(BootstrapBinder binder) {
binder.bindConfigurationProvider().toInstance(new PropertiesConfigurationProvider(props));
binder.bind(ILoadBalancer.class).to(StaticLoadBalancer.class);
}
}).build().createInjector();
injector.getInstance(LifecycleManager.class).start();
}
开发者ID:Netflix,
项目名称:suro,
代码行数:19,
代码来源:TestAsyncSuroClientWithNonExistentFilePath.java
示例5: setup
点赞 3
import com.netflix.governator.guice.BootstrapModule; //导入依赖的package包/类
public void setup() throws Exception {
servers = TestConnectionPool.startServers(1);
props.put(ClientConfig.LB_SERVER, TestConnectionPool.createConnectionString(servers));
props.put(ClientConfig.CONNECTION_TIMEOUT, Integer.toString(Integer.MAX_VALUE));
injector = LifecycleInjector.builder()
.withBootstrapModule(new BootstrapModule() {
@Override
public void configure(BootstrapBinder binder) {
binder.bindConfigurationProvider().toInstance(new PropertiesConfigurationProvider(props));
}
})
.withAdditionalModules(new AbstractModule() {
@Override
protected void configure() {
bind(ILoadBalancer.class).to(StaticLoadBalancer.class);
}
})
.build().createInjector();
injector.getInstance(LifecycleManager.class).start();
pool = injector.getInstance(ConnectionPool.class);
assertEquals(pool.getPoolSize(), 1);
}
开发者ID:Netflix,
项目名称:suro,
代码行数:26,
代码来源:TestConnectionOutPool.java
示例6: create
点赞 3
import com.netflix.governator.guice.BootstrapModule; //导入依赖的package包/类
public static void create(AtomicReference<Injector> injector, final Properties properties, Module... modules) throws Exception {
// Create the injector
injector.set(LifecycleInjector.builder()
.withBootstrapModule(
new BootstrapModule() {
@Override
public void configure(BootstrapBinder binder) {
binder.bindConfigurationProvider().toInstance(
new PropertiesConfigurationProvider(properties));
}
}
)
.withModules(
new RoutingPlugin(),
new ServerSinkPlugin(),
new SuroInputPlugin(),
new SuroDynamicPropertyModule(),
new SuroModule(),
StatusServer.createJerseyServletModule()
)
.withAdditionalModules(modules)
.build().createInjector());
}
开发者ID:Netflix,
项目名称:suro,
代码行数:24,
代码来源:SuroServer.java
示例7: setupMemory
点赞 2
import com.netflix.governator.guice.BootstrapModule; //导入依赖的package包/类
private void setupMemory(final Properties props) throws Exception {
injector = LifecycleInjector.builder()
.withBootstrapModule(new BootstrapModule() {
@Override
public void configure(BootstrapBinder binder) {
binder.bindConfigurationProvider().toInstance(new PropertiesConfigurationProvider(props));
binder.bind(ILoadBalancer.class).to(StaticLoadBalancer.class);
}
}).build().createInjector();
injector.getInstance(LifecycleManager.class).start();
}
开发者ID:Netflix,
项目名称:suro,
代码行数:12,
代码来源:TestAsyncSuroClient.java
示例8: setupFile
点赞 2
import com.netflix.governator.guice.BootstrapModule; //导入依赖的package包/类
private void setupFile(final Properties props) throws Exception {
props.put(ClientConfig.LB_SERVER, TestConnectionPool.createConnectionString(servers));
props.put(ClientConfig.ASYNC_FILEQUEUE_PATH, tempDir.newFolder().getAbsolutePath());
props.put(ClientConfig.ASYNC_QUEUE_TYPE, "file");
injector = LifecycleInjector.builder()
.withBootstrapModule(new BootstrapModule() {
@Override
public void configure(BootstrapBinder binder) {
binder.bindConfigurationProvider().toInstance(new PropertiesConfigurationProvider(props));
binder.bind(ILoadBalancer.class).to(StaticLoadBalancer.class);
}
}).build().createInjector();
injector.getInstance(LifecycleManager.class).start();
}
开发者ID:Netflix,
项目名称:suro,
代码行数:16,
代码来源:TestAsyncSuroClient.java
示例9: createInjector
点赞 2
import com.netflix.governator.guice.BootstrapModule; //导入依赖的package包/类
private void createInjector() throws Exception {
props.put(ClientConfig.LB_SERVER, createConnectionString(servers));
injector = LifecycleInjector.builder()
.withBootstrapModule(new BootstrapModule() {
@Override
public void configure(BootstrapBinder binder) {
binder.bindConfigurationProvider().toInstance(new PropertiesConfigurationProvider(props));
binder.bind(ILoadBalancer.class).to(StaticLoadBalancer.class);
}
}).build().createInjector();
injector.getInstance(LifecycleManager.class).start();
}
开发者ID:Netflix,
项目名称:suro,
代码行数:14,
代码来源:TestConnectionPool.java
示例10: testQueue
点赞 2
import com.netflix.governator.guice.BootstrapModule; //导入依赖的package包/类
private void testQueue(final Properties props) throws Exception {
injector = LifecycleInjector.builder()
.withBootstrapModule(new BootstrapModule() {
@Override
public void configure(BootstrapBinder binder) {
binder.bindConfigurationProvider().toInstance(new PropertiesConfigurationProvider(props));
}
}).build().createInjector();
injector.getInstance(LifecycleManager.class).start();
MessageSetProcessor queue = injector.getInstance(MessageSetProcessor.class);
assertEquals(queue.getQueueSize(), 0);
assertEquals(queue.getStatus(), ServiceStatus.ALIVE);
TMessageSet messageSet = TestConnectionPool.createMessageSet(100);
assertEquals(queue.process(messageSet).getResultCode(), ResultCode.OK);
assertEquals(queue.getQueueSize(), 1);
assertEquals(queue.poll(1, TimeUnit.MILLISECONDS), messageSet);
assertEquals(queue.getQueueSize(), 0);
queue.stopTakingTraffic();
assertEquals(queue.process(messageSet).getResultCode(), ResultCode.OTHER_ERROR);
queue.startTakingTraffic();
assertEquals(queue.getStatus(), ServiceStatus.ALIVE);
assertEquals(queue.process(messageSet).getResultCode(), ResultCode.OK);
injector.getInstance(LifecycleManager.class).close();
}
开发者ID:Netflix,
项目名称:suro,
代码行数:33,
代码来源:TestMessageSetProcessor.java
示例11: startWithAdditionalBootstrapModules
点赞 2
import com.netflix.governator.guice.BootstrapModule; //导入依赖的package包/类
public final void startWithAdditionalBootstrapModules(BootstrapModule... additionalBootstrapModules) {
BootstrapModule[] applicableBootstrapModules = this.bootstrapModules;
if (null != additionalBootstrapModules && additionalBootstrapModules.length != 0) {
applicableBootstrapModules = Arrays.copyOf(bootstrapModules, bootstrapModules.length + additionalBootstrapModules.length);
System.arraycopy(additionalBootstrapModules, 0, applicableBootstrapModules, bootstrapModules.length, additionalBootstrapModules.length);
}
injector = newInjector(applicableBootstrapModules);
startLifecycleManager();
_start();
}
开发者ID:Netflix,
项目名称:karyon,
代码行数:13,
代码来源:AbstractKaryonServer.java
示例12: forRequestHandler
点赞 2
import com.netflix.governator.guice.BootstrapModule; //导入依赖的package包/类
/**
* Creates a new {@link KaryonServer} that has a single HTTP server instance which delegates all request
* handling to {@link RequestHandler}.
* The {@link HttpServer} is created using {@link KaryonTransport#newHttpServer(int, HttpRequestHandler)}
*
* @param port Port for the server.
* @param handler Request Handler
* @param bootstrapModules Additional bootstrapModules if any.
*
* @return {@link KaryonServer} which is to be used to start the created server.
*/
public static KaryonServer forRequestHandler(int port, final RequestHandler<ByteBuf, ByteBuf> handler,
BootstrapModule... bootstrapModules) {
HttpServer<ByteBuf, ByteBuf> httpServer =
KaryonTransport.newHttpServer(port, new RequestHandler<ByteBuf, ByteBuf>() {
@Override
public Observable<Void> handle(HttpServerRequest<ByteBuf> request,
HttpServerResponse<ByteBuf> response) {
return handler.handle(request, response);
}
});
return new RxNettyServerBackedServer(httpServer, bootstrapModules);
}
开发者ID:Netflix,
项目名称:karyon,
代码行数:24,
代码来源:Karyon.java
示例13: toBootstrapModule
点赞 2
import com.netflix.governator.guice.BootstrapModule; //导入依赖的package包/类
public static BootstrapModule toBootstrapModule(final Module... modules) {
if (null == modules) {
return null;
}
return new BootstrapModule() {
@Override
public void configure(BootstrapBinder binder) {
binder.includeModules(modules);
}
};
}
开发者ID:Netflix,
项目名称:karyon,
代码行数:13,
代码来源:Karyon.java
示例14: bootStrapModule
点赞 2
import com.netflix.governator.guice.BootstrapModule; //导入依赖的package包/类
private static BootstrapModule bootStrapModule(String secretPath, Map<String, String> variableValues) throws VaultConfigurationException {
return new VaultConfigurationProviderBoostrapModule(
secretPath, variableValues,
vaultConfig(VAULT_TOKEN));
}
开发者ID:sheinbergon,
项目名称:governator-vault,
代码行数:6,
代码来源:InitalizationUtils.java
示例15: test
点赞 2
import com.netflix.governator.guice.BootstrapModule; //导入依赖的package包/类
@Test
public void test() throws Exception {
int statusPort = TestUtils.pickPort();
int serverPort = TestUtils.pickPort();
final Properties props = new Properties();
props.put("SuroServer.statusServerPort", Integer.toString(statusPort));
props.put("SuroServer.port", Integer.toString(serverPort));
Injector injector = LifecycleInjector.builder().withBootstrapModule(new BootstrapModule() {
@Override
public void configure(BootstrapBinder binder) {
binder.bindConfigurationProvider().toInstance(new PropertiesConfigurationProvider(props));
}
}).withModules(
new SuroInputPlugin(),
new AbstractModule() {
@Override
protected void configure() {
bind(ObjectMapper.class).to(DefaultObjectMapper.class);
}
}
).build().createInjector();
LifecycleManager lifecycleManager = injector.getInstance(LifecycleManager.class);
lifecycleManager.start();
InputManager inputManager = new InputManager();
List<SuroInput> inputList = injector.getInstance(ObjectMapper.class).readValue(
inputConfig,
new TypeReference<List<SuroInput>>() {
});
inputManager.set(inputList);
assertNotNull(inputManager.getInput("thrift"));
assertNotNull(inputManager.getInput("kafka_topic-kafka1"));
inputList = injector.getInstance(ObjectMapper.class).readValue(
addInputConfig,
new TypeReference<List<SuroInput>>() {
});
inputManager.set(inputList);
assertNotNull(inputManager.getInput("thrift"));
assertNotNull(inputManager.getInput("kafka_topic-kafka1"));
assertNotNull(inputManager.getInput("kafka_topic-kafka2"));
inputList = injector.getInstance(ObjectMapper.class).readValue(
inputConfig,
new TypeReference<List<SuroInput>>() {
});
inputManager.set(inputList);
assertNotNull(inputManager.getInput("thrift"));
assertNotNull(inputManager.getInput("kafka_topic-kafka1"));
}
开发者ID:Netflix,
项目名称:suro,
代码行数:55,
代码来源:TestInputManager.java
示例16: asBootstrapModule
点赞 2
import com.netflix.governator.guice.BootstrapModule; //导入依赖的package包/类
public static BootstrapModule asBootstrapModule() {
return Karyon.toBootstrapModule(KaryonServoModule.class);
}
开发者ID:Netflix,
项目名称:karyon,
代码行数:4,
代码来源:KaryonServoModule.java
示例17: AbstractKaryonServer
点赞 2
import com.netflix.governator.guice.BootstrapModule; //导入依赖的package包/类
public AbstractKaryonServer(BootstrapModule... bootstrapModules) {
this.bootstrapModules = bootstrapModules;
}
开发者ID:Netflix,
项目名称:karyon,
代码行数:4,
代码来源:AbstractKaryonServer.java
示例18: RxNettyServerBackedServer
点赞 2
import com.netflix.governator.guice.BootstrapModule; //导入依赖的package包/类
RxNettyServerBackedServer(AbstractServer rxNettyServer, BootstrapModule... bootstrapModules) {
super(RxNettyServerBackedServer.class, bootstrapModules);
this.rxNettyServer = rxNettyServer;
}
开发者ID:Netflix,
项目名称:karyon,
代码行数:5,
代码来源:RxNettyServerBackedServer.java
示例19: KaryonServerBackedServer
点赞 2
import com.netflix.governator.guice.BootstrapModule; //导入依赖的package包/类
KaryonServerBackedServer(AbstractKaryonServer delegate, BootstrapModule... bootstrapModules) {
this.delegate = delegate;
this.bootstrapModules = bootstrapModules;
}
开发者ID:Netflix,
项目名称:karyon,
代码行数:5,
代码来源:KaryonServerBackedServer.java
示例20: asBootstrapModule
点赞 2
import com.netflix.governator.guice.BootstrapModule; //导入依赖的package包/类
public static BootstrapModule asBootstrapModule() {
return asBootstrapModule(7002);
}
开发者ID:Netflix,
项目名称:karyon,
代码行数:4,
代码来源:ShutdownModule.java
示例21: MainClassBasedServer
点赞 2
import com.netflix.governator.guice.BootstrapModule; //导入依赖的package包/类
protected MainClassBasedServer(Class<?> mainClass, BootstrapModule... bootstrapModules) {
super(bootstrapModules);
this.mainClass = mainClass;
}
开发者ID:Netflix,
项目名称:karyon,
代码行数:5,
代码来源:MainClassBasedServer.java
示例22: newInjector
点赞 2
import com.netflix.governator.guice.BootstrapModule; //导入依赖的package包/类
@Override
protected Injector newInjector(BootstrapModule... applicableBootstrapModules) {
return LifecycleInjector.bootstrap(mainClass, applicableBootstrapModules);
}
开发者ID:Netflix,
项目名称:karyon,
代码行数:5,
代码来源:MainClassBasedServer.java
示例23: setUpBefore
点赞 2
import com.netflix.governator.guice.BootstrapModule; //导入依赖的package包/类
@BeforeClass
public static void setUpBefore() throws Exception {
server = Karyon.forApplication( JerseyBlockingModule.class, (BootstrapModule[])null );
server.start();
}
开发者ID:Netflix,
项目名称:karyon,
代码行数:7,
代码来源:JerseyBlockingTest.java
示例24: asBootstrapModule
点赞 2
import com.netflix.governator.guice.BootstrapModule; //导入依赖的package包/类
public static BootstrapModule asBootstrapModule() {
return Karyon.toBootstrapModule(KaryonEurekaModule.class);
}
开发者ID:Netflix,
项目名称:karyon,
代码行数:4,
代码来源:KaryonEurekaModule.java
示例25: forTcpConnectionHandler
点赞 1
import com.netflix.governator.guice.BootstrapModule; //导入依赖的package包/类
/**
* Creates a new {@link KaryonServer} that has a single TCP server instance which delegates all connection
* handling to {@link ConnectionHandler}.
* The {@link RxServer} is created using {@link RxNetty#newTcpServerBuilder(int, ConnectionHandler)}
*
* @param port Port for the server.
* @param handler Connection Handler
* @param bootstrapModules Additional bootstrapModules if any.
*
* @return {@link KaryonServer} which is to be used to start the created server.
*/
public static KaryonServer forTcpConnectionHandler(int port, ConnectionHandler<ByteBuf, ByteBuf> handler,
BootstrapModule... bootstrapModules) {
RxServer<ByteBuf, ByteBuf> server = RxNetty.newTcpServerBuilder(port, handler).build();
return new RxNettyServerBackedServer(server, bootstrapModules);
}
开发者ID:Netflix,
项目名称:karyon,
代码行数:17,
代码来源:Karyon.java
示例26: forUdpConnectionHandler
点赞 1
import com.netflix.governator.guice.BootstrapModule; //导入依赖的package包/类
/**
* Creates a new {@link KaryonServer} that has a single UDP server instance which delegates all connection
* handling to {@link ConnectionHandler}.
* The {@link RxServer} is created using {@link RxNetty#newUdpServerBuilder(int, ConnectionHandler)}
*
* @param port Port for the server.
* @param handler Connection Handler
* @param bootstrapModules Additional bootstrapModules if any.
*
* @return {@link KaryonServer} which is to be used to start the created server.
*/
public static KaryonServer forUdpConnectionHandler(int port, ConnectionHandler<ByteBuf, ByteBuf> handler,
BootstrapModule... bootstrapModules) {
UdpServer<ByteBuf, ByteBuf> server = RxNetty.newUdpServerBuilder(port, handler).build();
return new RxNettyServerBackedServer(server, bootstrapModules);
}
开发者ID:Netflix,
项目名称:karyon,
代码行数:17,
代码来源:Karyon.java
示例27: forTcpServer
点赞 1
import com.netflix.governator.guice.BootstrapModule; //导入依赖的package包/类
/**
* Creates a new {@link KaryonServer} which combines lifecycle of the passed {@link RxServer} with
* it's own lifecycle.
*
* @param server TCP server
* @param bootstrapModules Additional bootstrapModules if any.
*
* @return {@link KaryonServer} which is to be used to start the created server.
*/
public static KaryonServer forTcpServer(RxServer<?, ?> server, BootstrapModule... bootstrapModules) {
return new RxNettyServerBackedServer(server, bootstrapModules);
}
开发者ID:Netflix,
项目名称:karyon,
代码行数:13,
代码来源:Karyon.java
示例28: forHttpServer
点赞 1
import com.netflix.governator.guice.BootstrapModule; //导入依赖的package包/类
/**
* Creates a new {@link KaryonServer} which combines lifecycle of the passed {@link HttpServer} with
* it's own lifecycle.
*
* @param server HTTP server
* @param bootstrapModules Additional bootstrapModules if any.
*
* @return {@link KaryonServer} which is to be used to start the created server.
*/
public static KaryonServer forHttpServer(HttpServer<?, ?> server,
BootstrapModule... bootstrapModules) {
return new RxNettyServerBackedServer(server, bootstrapModules);
}
开发者ID:Netflix,
项目名称:karyon,
代码行数:14,
代码来源:Karyon.java
示例29: forWebSocketServer
点赞 1
import com.netflix.governator.guice.BootstrapModule; //导入依赖的package包/类
/**
* Creates a new {@link KaryonServer} which combines lifecycle of the passed WebSockets {@link RxServer} with
* it's own lifecycle.
*
* @param server WebSocket server
* @param bootstrapModules Additional bootstrapModules if any.
*
* @return {@link KaryonServer} which is to be used to start the created server.
*/
public static KaryonServer forWebSocketServer(RxServer<? extends WebSocketFrame, ? extends WebSocketFrame> server,
BootstrapModule... bootstrapModules) {
return new RxNettyServerBackedServer(server, bootstrapModules);
}
开发者ID:Netflix,
项目名称:karyon,
代码行数:14,
代码来源:Karyon.java
示例30: forUdpServer
点赞 1
import com.netflix.governator.guice.BootstrapModule; //导入依赖的package包/类
/**
* Creates a new {@link KaryonServer} which combines lifecycle of the passed {@link UdpServer} with
* it's own lifecycle.
*
* @param server UDP server
* @param bootstrapModules Additional bootstrapModules if any.
*
* @return {@link KaryonServer} which is to be used to start the created server.
*/
public static KaryonServer forUdpServer(UdpServer<?, ?> server, BootstrapModule... bootstrapModules) {
return new RxNettyServerBackedServer(server, bootstrapModules);
}
开发者ID:Netflix,
项目名称:karyon,
代码行数:13,
代码来源:Karyon.java
示例31: forServer
点赞 1
import com.netflix.governator.guice.BootstrapModule; //导入依赖的package包/类
/**
* Creates a new {@link KaryonServer} which combines lifecycle of the passed {@link KaryonServer} with
* it's own lifecycle. This is useful when a {@link KaryonServer} is already present and the passed
* {@link BootstrapModule}s are to be added to that server.
*
* @param server An existing karyon server
* @param bootstrapModules Additional bootstrapModules.
*
* @return {@link KaryonServer} which is to be used to start the created server.
*/
public static KaryonServer forServer(KaryonServer server, BootstrapModule... bootstrapModules) {
return new KaryonServerBackedServer((AbstractKaryonServer)server, bootstrapModules);
}
开发者ID:Netflix,
项目名称:karyon,
代码行数:14,
代码来源:Karyon.java
示例32: forApplication
点赞 1
import com.netflix.governator.guice.BootstrapModule; //导入依赖的package包/类
/**
* Creates a new {@link KaryonServer} which uses the passed class to detect any modules.
*
* @param mainClass Any class/interface containing governator's {@link Bootstrap} annotations.
* @param bootstrapModules Additional bootstrapModules if any.
*
* @return {@link KaryonServer} which is to be used to start the created server.
*/
public static KaryonServer forApplication(Class<?> mainClass, BootstrapModule... bootstrapModules) {
return new MainClassBasedServer(mainClass, bootstrapModules);
}
开发者ID:Netflix,
项目名称:karyon,
代码行数:12,
代码来源:Karyon.java
示例33: forSuites
点赞 1
import com.netflix.governator.guice.BootstrapModule; //导入依赖的package包/类
/**
* Creates a new {@link KaryonServer} from the passed bootstrapModules.
*
* @param bootstrapModules Bootstrap modules to use for the server.
*
* @return {@link KaryonServer} which is to be used to start the created server.
*/
public static KaryonServer forSuites(BootstrapModule... bootstrapModules) {
return new MainClassBasedServer(KaryonServer.class, bootstrapModules);
}
开发者ID:Netflix,
项目名称:karyon,
代码行数:11,
代码来源:Karyon.java
示例34: newInjector
点赞 1
import com.netflix.governator.guice.BootstrapModule; //导入依赖的package包/类
protected abstract Injector newInjector(BootstrapModule... applicableBootstrapModules);
开发者ID:Netflix,
项目名称:karyon,
代码行数:2,
代码来源:AbstractKaryonServer.java