Java Code Examples for io.undertow.client.UndertowClient#getInstance()
The following examples show how to use
io.undertow.client.UndertowClient#getInstance() .
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: UndertowXhrTransport.java From spring-analysis-note with MIT License | 5 votes |
public UndertowXhrTransport(OptionMap optionMap) throws IOException { Assert.notNull(optionMap, "OptionMap is required"); this.optionMap = optionMap; this.httpClient = UndertowClient.getInstance(); this.worker = Xnio.getInstance().createWorker(optionMap); this.bufferPool = new DefaultByteBufferPool(false, 1024, -1, 2); }
Example 2
Source File: UndertowXhrTransport.java From java-technology-stack with MIT License | 5 votes |
public UndertowXhrTransport(OptionMap optionMap) throws IOException { Assert.notNull(optionMap, "OptionMap is required"); this.optionMap = optionMap; this.httpClient = UndertowClient.getInstance(); this.worker = Xnio.getInstance().createWorker(optionMap); this.bufferPool = new DefaultByteBufferPool(false, 1024, -1, 2); }
Example 3
Source File: MultiAppProxyClient.java From bouncr with Eclipse Public License 1.0 | 5 votes |
public MultiAppProxyClient(BouncrConfiguration config, KeyValueStore store, RealmCache realmCache, JsonWebToken jwt) { client = UndertowClient.getInstance(); this.config = config; this.store = store; this.realmCache = realmCache; this.jwt = jwt; this.jwtHeader = BeanBuilder.builder(new JwtHeader()) .set(JwtHeader::setAlg, "none") .build(); }
Example 4
Source File: UndertowXhrTransport.java From spring4-understanding with Apache License 2.0 | 5 votes |
public UndertowXhrTransport(OptionMap optionMap) throws IOException { Assert.notNull(optionMap, "OptionMap is required"); this.optionMap = optionMap; this.httpClient = UndertowClient.getInstance(); this.worker = Xnio.getInstance().createWorker(optionMap); this.undertowBufferSupport = (undertow13Present ? new Undertow13BufferSupport() : new UndertowXnioBufferSupport()); }
Example 5
Source File: TokenAuthenticator.java From hawkular-metrics with Apache License 2.0 | 5 votes |
private ConnectionFactory(URI kubernetesMasterUri) { this.kubernetesMasterUri = kubernetesMasterUri; undertowClient = UndertowClient.getInstance(); Xnio xnio = Xnio.getInstance(Undertow.class.getClassLoader()); try { ssl = new UndertowXnioSsl(xnio, OptionMap.EMPTY); } catch (Exception e) { throw new RuntimeException(e); } byteBufferPool = createByteBufferPool(); }
Example 6
Source File: SNICombinedWithALPNTestCase.java From wildfly-core with GNU Lesser General Public License v2.1 | 5 votes |
@Test public void testSimpleViaHostname() throws Exception { Assume.assumeFalse("There is no ALPN implementation in IBM JDK 8 and less; also ALPN-hack that serves" + " as a workaround for other JDKs does not work with IBM JDK.", isIbmJdk() && jdkLessThan9()); XnioSsl ssl = createClientSSL(hostNameKeystore); UndertowClient client = UndertowClient.getInstance(); DefaultByteBufferPool pool = new DefaultByteBufferPool(false, 1024); ClientConnection connection = client.connect(new URI("https", null, "localhost", TestSuiteEnvironment.getHttpPort(), "", null, null), XnioWorker.getContextManager().get(), ssl, pool, OptionMap.create(UndertowOptions.ENABLE_HTTP2, true)).get(); performSimpleTest(pool, connection); }
Example 7
Source File: SNICombinedWithALPNTestCase.java From wildfly-core with GNU Lesser General Public License v2.1 | 5 votes |
@Test public void testHttpsViaIp() throws Exception { Assume.assumeFalse("There is no ALPN implementation in IBM JDK 8 and less; also ALPN-hack that serves" + " as a workaround for other JDKs does not work with IBM JDK.", isIbmJdk() && jdkLessThan9()); XnioSsl ssl = createClientSSL(ipKeystore); UndertowClient client = UndertowClient.getInstance(); DefaultByteBufferPool pool = new DefaultByteBufferPool(false, 1024); ClientConnection connection = client.connect(new URI("https", null, "127.0.0.1", TestSuiteEnvironment.getHttpPort(), "", null, null), XnioWorker.getContextManager().get(), ssl, pool, OptionMap.create(UndertowOptions.ENABLE_HTTP2, true)).get(); performSimpleTest(pool, connection); }
Example 8
Source File: ExtendedLoadBalancingProxyClient.java From galeb with Apache License 2.0 | 4 votes |
public ExtendedLoadBalancingProxyClient() { this(UndertowClient.getInstance()); }
Example 9
Source File: ExtendedLoadBalancingProxyClient.java From galeb with Apache License 2.0 | 4 votes |
public ExtendedLoadBalancingProxyClient(ExclusivityChecker client) { this(UndertowClient.getInstance(), client, null); }
Example 10
Source File: SimpleProxyClientProvider.java From lams with GNU General Public License v2.0 | 4 votes |
public SimpleProxyClientProvider(URI uri) { this.uri = uri; client = UndertowClient.getInstance(); }
Example 11
Source File: LoadBalancingProxyClient.java From lams with GNU General Public License v2.0 | 4 votes |
public LoadBalancingProxyClient() { this(UndertowClient.getInstance()); }
Example 12
Source File: LoadBalancingProxyClient.java From lams with GNU General Public License v2.0 | 4 votes |
public LoadBalancingProxyClient(ExclusivityChecker client) { this(UndertowClient.getInstance(), client, null); }