private void registerNetworkStack() { try { try { final Class<?> vertxFactory = Class.forName("io.advantageous.qbit.vertx.RegisterVertxWithQBit"); ClassMeta.classMeta(vertxFactory).invokeStatic("registerVertxWithQBit"); } catch (Exception ex) { if (debug) { System.out.println("Unable to load vertx network stack, trying Jetty" + ex); } } } catch (Exception ex) { FactorySPI.setHttpServerFactory((options, name, systemManager, serviceDiscovery, healthServiceAsync, a, b, c, d, e) -> { throw new IllegalStateException("Unable to load Vertx network libs"); }); FactorySPI.setHttpClientFactory((host, port, timeOutInMilliseconds, poolSize, autoFlush, flushRate, keepAlive, pipeLine, ssl, verifyHost, trustAll, maxWebSocketFrameSize, tryUseCompression, trustStorePath, trustStorePassword, tcpNoDelay, soLinger, errorHandler) -> { throw new IllegalStateException("Unable to load Vertx network libs"); }); } }
public static void registerVertxWithQBit() { FactorySPI.setHttpServerFactory(new HttpServerVertxFactory()); FactorySPI.setHttpClientFactory(new HttpVertxClientFactory()); } }
@After public void tearDown() throws Exception { FactorySPI.setFactory(null); FactorySPI.setHttpClientFactory(null); }
@Before public void setUp() throws Exception { client = new BoonClientFactory().create("/uri", new HttpClientMock(), 10, new BeforeMethodSent() { }); FactorySPI.setHttpClientFactory((host, port, timeOutInMilliseconds, poolSize, autoFlush, flushRate, keepAlive, pipeLine, ssl, verifyHost, trustAll, maxWebSocketFrameSize, tryUseCompression, trustStorePath, trustStorePassword, tcpNoDelay, soLinger, throwableConsumer) -> new HttpClientMock()); }
FactorySPI.setHttpClientFactory( (host, port, timeOutInMilliseconds, poolSize, autoFlush, flushRate, keepAlive, pipeLine, ssl, verifyHost, trustAll, maxWebSocketFrameSize,
private void registerNetworkStack() { try { try { final Class<?> vertxFactory = Class.forName("io.advantageous.qbit.vertx.RegisterVertxWithQBit"); ClassMeta.classMeta(vertxFactory).invokeStatic("registerVertxWithQBit"); } catch (Exception ex) { if (debug) { System.out.println("Unable to load vertx network stack, trying Jetty" + ex); } } } catch (Exception ex) { FactorySPI.setHttpServerFactory((options, name, systemManager, serviceDiscovery, healthServiceAsync, a, b, c, d) -> { throw new IllegalStateException("Unable to load Vertx network libs"); }); FactorySPI.setHttpClientFactory((host, port, timeOutInMilliseconds, poolSize, autoFlush, flushRate, keepAlive, pipeLine, ssl, verifyHost, trustAll, maxWebSocketFrameSize, tryUseCompression, trustStorePath, trustStorePassword, tcpNoDelay, soLinger) -> { throw new IllegalStateException("Unable to load Vertx network libs"); }); } }
private void registerNetworkStack() { try { try { final Class<?> vertxFactory = Class.forName("io.advantageous.qbit.vertx.RegisterVertxWithQBit"); ClassMeta.classMeta(vertxFactory).invokeStatic("registerVertxWithQBit"); } catch (Exception ex) { if (debug) { System.out.println("Unable to load vertx network stack, trying Jetty" + ex); } } } catch (Exception ex) { FactorySPI.setHttpServerFactory((options, name, systemManager, serviceDiscovery, healthServiceAsync, a, b, c, d, e) -> { throw new IllegalStateException("Unable to load Vertx network libs"); }); FactorySPI.setHttpClientFactory((host, port, timeOutInMilliseconds, poolSize, autoFlush, flushRate, keepAlive, pipeLine, ssl, verifyHost, trustAll, maxWebSocketFrameSize, tryUseCompression, trustStorePath, trustStorePassword, tcpNoDelay, soLinger, errorHandler) -> { throw new IllegalStateException("Unable to load Vertx network libs"); }); } }
public static void registerVertxWithQBit() { FactorySPI.setHttpServerFactory(new HttpServerVertxFactory()); FactorySPI.setHttpClientFactory(new HttpVertxClientFactory()); } }