@Override protected void init() { super.init(); }
@Override protected IoFuture dispose0() throws Exception { scheduler.shutdownNow(); return super.dispose0(); }
@Override public final ConnectFuture connect(ResourceAddress address, IoHandler handler, IoSessionInitializer<? extends ConnectFuture> initializer) { // connect only address with matching scheme URI location = address.getResource(); String schemeName = location.getScheme(); if (!canConnect(schemeName)) { throw new IllegalArgumentException(format("Unexpected scheme \"%s\" for URI: %s", schemeName, location)); } if (!started.get()) { synchronized (started) { if (!started.get()) { init(); started.set(true); } } } return connectInternal(address, handler, initializer); }
protected AbstractBridgeConnector(IoSessionConfigEx sessionConfig) { super(sessionConfig); this.logger = LoggerFactory.getLogger(String.format("transport.%s.connect", getTransportMetadata().getName())); started = new AtomicBoolean(false); }
@Override public void init() { super.init(); sseCodec = new SseConnectCodecFilter(); }
@Override protected IoFuture dispose0() throws Exception { for (IoSessionIdleTracker tracker : sessionIdleTrackers) { tracker.dispose(); } return super.dispose0(); }
@Override protected void init() { super.init(); try { sslContext = sslContextFactory.newInstance(); } catch (Exception e) { logger.error("Exception while creating SSL context: ", e); } certificateSelection = new SslCertificateSelectionFilter(true); }