@Override protected void doStart(URL url) { String bindIp = url.getParameter(Constants.BIND_IP_KEY, url.getHost()); if (!url.isAnyHost() && NetUtils.isValidLocalHost(bindIp)) { server.setHostname(bindIp); } server.setPort(url.getParameter(Constants.BIND_PORT_KEY, url.getPort())); Map<ChannelOption, Object> channelOption = new HashMap<ChannelOption, Object>(); channelOption.put(ChannelOption.SO_KEEPALIVE, url.getParameter(Constants.KEEP_ALIVE_KEY, Constants.DEFAULT_KEEP_ALIVE)); server.setChildChannelOptions(channelOption); server.setExecutorThreadCount(url.getParameter(Constants.THREADS_KEY, Constants.DEFAULT_THREADS)); server.setIoWorkerCount(url.getParameter(Constants.IO_THREADS_KEY, Constants.DEFAULT_IO_THREADS)); server.setMaxRequestSize(url.getParameter(Constants.PAYLOAD_KEY, Constants.DEFAULT_PAYLOAD)); server.start(); }
@Override public void stop() { server.stop(); }
@Override protected RestServer innerCreateServer(URL url) { NettyJaxrsServer server = new NettyJaxrsServer(); server.setMaxRequestSize(url.getIntParameter(URLParamType.maxContentLength.getName(), URLParamType.maxContentLength.getIntValue())); ResteasyDeployment deployment = new ResteasyDeployment(); server.setDeployment(deployment); server.setExecutorThreadCount(url.getIntParameter(URLParamType.maxWorkerThread.getName(), URLParamType.maxWorkerThread.getIntValue())); server.setPort(url.getPort()); server.setRootResourcePath(""); server.setSecurityDomain(null); deployment.setInjectorFactoryClass(RestfulInjectorFactory.class.getName()); deployment.getProviderClasses().add(RpcExceptionMapper.class.getName()); return new EmbedRestServer(server); }
public static ResteasyDeployment start(String bindPath, SecurityDomain domain, ResteasyDeployment deployment) throws Exception { netty = new NettyJaxrsServer(); netty.setDeployment(deployment); netty.setPort(PortProvider.getPort()); netty.setRootResourcePath(bindPath); netty.setSecurityDomain(domain); netty.start(); return netty.getDeployment(); }
protected void doStart(URL url) { server.setPort(url.getPort()); server.setKeepAlive(url.getParameter(Constants.KEEP_ALIVE_KEY, Constants.DEFAULT_KEEP_ALIVE)); server.setExecutorThreadCount(url.getParameter(Constants.THREADS_KEY, Constants.DEFAULT_THREADS)); server.setIoWorkerCount(url.getParameter(Constants.IO_THREADS_KEY, Constants.DEFAULT_IO_THREADS)); server.start(); }
@Override protected ResteasyDeployment getDeployment() { return server.getDeployment(); } }
setRootResourcePath(path); .childHandler(createChannelInitializer()) .option(ChannelOption.SO_BACKLOG, backlog) .childOption(ChannelOption.SO_KEEPALIVE, true);
@Override public void start() { super.start(); Injector injector = Guice.createInjector(new GossipLogModule(configPath), new GossipConfigModule(configPath, configFile), new GossipDataModule(), new GossipResourceModule()); ModuleProcessor processor = new ModuleProcessor(deployment.getRegistry(), deployment.getProviderFactory()); processor.processInjector(injector); log.info("Successfully launched gossip server"); } }
public static ResteasyDeployment start(String bindPath, SecurityDomain domain, ResteasyDeployment deployment) throws Exception { netty = new NettyJaxrsServer(); netty.setDeployment(deployment); netty.setPort(PortProvider.getPort()); netty.setRootResourcePath(bindPath); netty.setSecurityDomain(domain); netty.start(); return netty.getDeployment(); }
protected void doStart(URL url) { server.setPort(url.getPort()); server.setKeepAlive(url.getParameter(Constants.KEEP_ALIVE_KEY, Constants.DEFAULT_KEEP_ALIVE)); server.setExecutorThreadCount(url.getParameter(Constants.THREADS_KEY, Constants.DEFAULT_THREADS)); server.setIoWorkerCount(url.getParameter(Constants.IO_THREADS_KEY, Constants.DEFAULT_IO_THREADS)); server.start(); }
@Override protected ResteasyDeployment getDeployment() { return server.getDeployment(); } }
setRootResourcePath(path); .childHandler(createChannelInitializer()) .option(ChannelOption.SO_BACKLOG, backlog) .childOption(ChannelOption.SO_KEEPALIVE, true);
public static void start(ResteasyDeployment deployment) throws Exception { netty = new NettyJaxrsServer(); netty.setDeployment(deployment); netty.setPort(PortProvider.getPort()); netty.setRootResourcePath(""); netty.setSecurityDomain(null); netty.start(); }
@Override protected void doStart(URL url) { String bindIp = url.getParameter(Constants.BIND_IP_KEY, url.getHost()); if (!url.isAnyHost() && NetUtils.isValidLocalHost(bindIp)) { server.setHostname(bindIp); } server.setPort(url.getParameter(Constants.BIND_PORT_KEY, url.getPort())); Map<ChannelOption, Object> channelOption = new HashMap<ChannelOption, Object>(); channelOption.put(ChannelOption.SO_KEEPALIVE, url.getParameter(Constants.KEEP_ALIVE_KEY, Constants.DEFAULT_KEEP_ALIVE)); server.setChildChannelOptions(channelOption); server.setExecutorThreadCount(url.getParameter(Constants.THREADS_KEY, Constants.DEFAULT_THREADS)); server.setIoWorkerCount(url.getParameter(Constants.IO_THREADS_KEY, Constants.DEFAULT_IO_THREADS)); server.setMaxRequestSize(url.getParameter(Constants.PAYLOAD_KEY, Constants.DEFAULT_PAYLOAD)); server.start(); }
@Override public void stop() { server.stop(); }
@Override protected ResteasyDeployment getDeployment() { return server.getDeployment(); } }
public static void start(ResteasyDeployment deployment) throws Exception { netty = new NettyJaxrsServer(); netty.setDeployment(deployment); netty.setPort(PortProvider.getPort()); netty.setRootResourcePath(""); netty.setSecurityDomain(null); netty.start(); }
@Override protected void doStart(URL url) { String bindIp = url.getParameter(Constants.BIND_IP_KEY, url.getHost()); if (!url.isAnyHost() && NetUtils.isValidLocalHost(bindIp)) { server.setHostname(bindIp); } server.setPort(url.getParameter(Constants.BIND_PORT_KEY, url.getPort())); Map<ChannelOption, Object> channelOption = new HashMap<ChannelOption, Object>(); channelOption.put(ChannelOption.SO_KEEPALIVE, url.getParameter(Constants.KEEP_ALIVE_KEY, Constants.DEFAULT_KEEP_ALIVE)); server.setChildChannelOptions(channelOption); server.setExecutorThreadCount(url.getParameter(Constants.THREADS_KEY, Constants.DEFAULT_THREADS)); server.setIoWorkerCount(url.getParameter(Constants.IO_THREADS_KEY, Constants.DEFAULT_IO_THREADS)); server.setMaxRequestSize(url.getParameter(Constants.PAYLOAD_KEY, Constants.DEFAULT_PAYLOAD)); server.start(); }