Java Code Examples for org.jboss.resteasy.spi.ResteasyDeployment#getProviderFactory()
The following examples show how to use
org.jboss.resteasy.spi.ResteasyDeployment#getProviderFactory() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: VertxRequestHandler.java From quarkus with Apache License 2.0 | 6 votes |
public VertxRequestHandler(Vertx vertx, BeanContainer beanContainer, ResteasyDeployment deployment, String rootPath, BufferAllocator allocator, Executor executor, long readTimeout) { this.vertx = vertx; this.beanContainer = beanContainer; this.dispatcher = new RequestDispatcher((SynchronousDispatcher) deployment.getDispatcher(), deployment.getProviderFactory(), null, Thread.currentThread().getContextClassLoader()); this.rootPath = rootPath; this.allocator = allocator; this.executor = executor; this.readTimeout = readTimeout; Instance<CurrentIdentityAssociation> association = CDI.current().select(CurrentIdentityAssociation.class); this.association = association.isResolvable() ? association.get() : null; currentVertxRequest = CDI.current().select(CurrentVertxRequest.class).get(); }
Example 2
Source File: RestServer.java From sofa-rpc with Apache License 2.0 | 6 votes |
protected SofaNettyJaxrsServer buildServer() { // 生成Server对象 SofaNettyJaxrsServer httpServer = new SofaNettyJaxrsServer(serverConfig); int bossThreads = serverConfig.getIoThreads(); if (bossThreads > 0) { httpServer.setIoWorkerCount(bossThreads); // 其实是boss+worker线程 默认cpu*2 } httpServer.setExecutorThreadCount(serverConfig.getMaxThreads()); // 业务线程 httpServer.setMaxRequestSize(serverConfig.getPayload()); httpServer.setHostname(serverConfig.getBoundHost()); httpServer.setPort(serverConfig.getPort()); ResteasyDeployment resteasyDeployment = httpServer.getDeployment(); resteasyDeployment.start(); ResteasyProviderFactory providerFactory = resteasyDeployment.getProviderFactory(); registerProvider(providerFactory); return httpServer; }
Example 3
Source File: VertxPluginRequestHandler.java From redpipe with Apache License 2.0 | 5 votes |
public VertxPluginRequestHandler(Vertx vertx, ResteasyDeployment deployment, String servletMappingPrefix, SecurityDomain domain, List<Plugin> plugins) { this.vertx = vertx; this.dispatcher = new PluginRequestDispatcher((SynchronousDispatcher) deployment.getDispatcher(), deployment.getProviderFactory(), domain, plugins); this.servletMappingPrefix = servletMappingPrefix; appGlobals = AppGlobals.get(); }