Java Code Examples for io.undertow.servlet.api.ThreadSetupHandler#Action
The following examples show how to use
io.undertow.servlet.api.ThreadSetupHandler#Action .
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: ServletContextImpl.java From quarkus-http with Apache License 2.0 | 5 votes |
void invokeAction(HttpServerExchange exchange, ThreadSetupHandler.Action<Void, Object> listener) { try { this.invokeActionTask.call(exchange, listener); } catch (Exception e) { throw new RuntimeException(e); } }
Example 2
Source File: DeploymentImpl.java From quarkus-http with Apache License 2.0 | 5 votes |
public <C, T> ThreadSetupHandler.Action<C, T> createThreadSetupAction(ThreadSetupHandler.Action<C, T> target) { ThreadSetupHandler.Action<C, T> ret = target; for(ThreadSetupHandler wrapper : threadSetupActions) { ret = wrapper.create(ret); } return ret; }
Example 3
Source File: ServerWebSocketContainer.java From quarkus-http with Apache License 2.0 | 5 votes |
public ServerWebSocketContainer(final ClassIntrospecter classIntrospecter, final ClassLoader classLoader, Supplier<EventLoopGroup> eventLoopSupplier, List<ThreadSetupHandler> threadSetupHandlers, boolean dispatchToWorker, InetSocketAddress clientBindAddress, WebSocketReconnectHandler reconnectHandler, Supplier<Executor> executorSupplier, List<Extension> installedExtensions, int maxFrameSize) { this.classIntrospecter = classIntrospecter; this.eventLoopSupplier = eventLoopSupplier; this.dispatchToWorker = dispatchToWorker; this.clientBindAddress = clientBindAddress; this.executorSupplier = executorSupplier; this.installedExtensions = new ArrayList<>(installedExtensions); this.webSocketReconnectHandler = reconnectHandler; this.maxFrameSize = maxFrameSize; ThreadSetupHandler.Action<Void, Runnable> task = new ThreadSetupHandler.Action<Void, Runnable>() { @Override public Void call(HttpServerExchange exchange, Runnable context) throws Exception { context.run(); return null; } }; List<WebsocketClientSslProvider> clientSslProviders = new ArrayList<>(); for (WebsocketClientSslProvider provider : ServiceLoader.load(WebsocketClientSslProvider.class, classLoader)) { clientSslProviders.add(provider); } this.clientSslProviders = Collections.unmodifiableList(clientSslProviders); for (ThreadSetupHandler handler : threadSetupHandlers) { task = handler.create(task); } this.invokeEndpointTask = task; }
Example 4
Source File: ServletContextImpl.java From lams with GNU General Public License v2.0 | 5 votes |
void invokeAction(HttpServerExchange exchange, ThreadSetupHandler.Action<Void, Object> listener) { try { this.invokeActionTask.call(exchange, listener); } catch (Exception e) { throw new RuntimeException(e); } }
Example 5
Source File: DeploymentImpl.java From lams with GNU General Public License v2.0 | 5 votes |
public <C, T> ThreadSetupHandler.Action<C, T> createThreadSetupAction(ThreadSetupHandler.Action<C, T> target) { ThreadSetupHandler.Action<C, T> ret = target; for(ThreadSetupHandler wrapper : threadSetupActions) { ret = wrapper.create(ret); } return ret; }