public static Reactor reactor(final ReactorHandler reactorHandler, final int maxFrameSize) throws IOException { final ReactorOptions reactorOptions = new ReactorOptions(); reactorOptions.setMaxFrameSize(maxFrameSize); reactorOptions.setEnableSaslByDefault(true); final Reactor reactor = Proton.reactor(reactorOptions, reactorHandler); reactor.setGlobalHandler(new CustomIOHandler()); return reactor; } }
options.setEnableSaslByDefault(false); reactor = Proton.reactor(options, this);
/** * Create a Proton reactor * * @return the Proton reactor * @throws TransportException if Proton throws */ private Reactor createReactor() throws TransportException { try { if (this.deviceClientConfig.getAuthenticationType() == DeviceClientConfig.AuthType.X509_CERTIFICATE) { //Codes_SRS_AMQPSIOTHUBCONNECTION_34_053: [If the config is using x509 Authentication, the created Proton reactor shall not have SASL enabled by default.] ReactorOptions options = new ReactorOptions(); options.setEnableSaslByDefault(false); return Proton.reactor(options, this); } else { return Proton.reactor(this); } } catch(IOException e) { throw new TransportException("Could not create Proton reactor", e); } }