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; } }
/** * 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); } }
public static Reactor reactor(ReactorHandler reactorHandler, final int maxFrameSize) throws IOException { final ReactorOptions reactorOptions = new ReactorOptions(); reactorOptions.setMaxFrameSize(maxFrameSize); Reactor reactor = Proton.reactor(reactorOptions, reactorHandler); reactor.setGlobalHandler(new CustomIOHandler()); reactor.getGlobalHandler().add(new LoggingHandler()); return reactor; } }
protected ReactorImpl(IO io) throws IOException { this(io, new ReactorOptions()); }
int maxFrameSizeOption = reactor.getOptions().getMaxFrameSize(); if (maxFrameSizeOption != 0) { trans.setMaxFrameSize(maxFrameSizeOption); if(reactor.getOptions().isEnableSaslByDefault()) { Sasl sasl = trans.sasl(); sasl.server();
ReactorOptions options = new ReactorOptions(); options.setEnableSaslByDefault(false); reactor = Proton.reactor(options, this);
public ReactorImpl() throws IOException { this(new IOImpl(), new ReactorOptions()); }
int maxFrameSizeOption = reactor.getOptions().getMaxFrameSize(); if (maxFrameSizeOption != 0) { transport.setMaxFrameSize(maxFrameSizeOption); if (reactor.getOptions().isEnableSaslByDefault()) { Sasl sasl = transport.sasl(); sasl.client();