@Override public Connection connect() throws IOException { // Reconnect with a potentially new configuration return ProtocolConnectionUtils.connectSync(configuration); }
@Override public Connection connect() throws IOException { // Reconnect with a potentially new configuration return ProtocolConnectionUtils.connectSync(configuration); }
@Override public Connection connect() throws IOException { // Reconnect with a potentially new configuration return ProtocolConnectionUtils.connectSync(configuration); }
@Override public Connection connect() throws IOException { // Reconnect with a potentially new configuration return ProtocolConnectionUtils.connectSync(configuration); }
@Override public Connection connect() throws IOException { return ProtocolConnectionUtils.connectSync(configuration); }
@Override public Connection connect() throws IOException { return ProtocolConnectionUtils.connectSync(configuration); }
@Override public Connection connect() throws IOException { return ProtocolConnectionUtils.connectSync(configuration); }
public Connection connectSync(CallbackHandler handler) throws IOException { final ProtocolConnectionConfiguration config = ProtocolConnectionConfiguration.copy(configuration); config.setCallbackHandler(handler); return ProtocolConnectionUtils.connectSync(config); }
public static Connection connectSync(final ProtocolConnectionConfiguration configuration, CallbackHandler handler) throws IOException { final ProtocolConnectionConfiguration config = ProtocolConnectionConfiguration.copy(configuration); config.setCallbackHandler(handler); return connectSync(config); }
public static Connection connectSync(final ProtocolConnectionConfiguration configuration, CallbackHandler handler) throws IOException { final ProtocolConnectionConfiguration config = ProtocolConnectionConfiguration.copy(configuration); config.setCallbackHandler(handler); return connectSync(config); }
/** * Try to connect to the remote host controller. * * @param callbackHandler the security callback handler * @return the underlying remoting connection * @throws IOException */ protected Connection connect(final CallbackHandler callbackHandler) throws IOException { if(closed.get()) { throw new IllegalStateException(); } synchronized (this) { if(isConnected()) { return connection; } connection = ProtocolConnectionUtils.connectSync(clientConfiguration, callbackHandler, Collections.emptyMap(), null); connection.addCloseHandler(new CloseHandler<Connection>() { @Override public void handleClose(Connection old, IOException exception) { synchronized (DomainTestConnection.this) { if(connection == old) { connection = null; } DomainTestConnection.this.notifyAll(); } } }); return connection; } }
public Connection connectSync(CallbackHandler handler, Map<String, String> saslOptions, SSLContext sslContext) throws IOException { final ProtocolConnectionConfiguration config = ProtocolConnectionConfiguration.copy(configuration); config.setCallbackHandler(handler); config.setSaslOptions(saslOptions); config.setSslContext(sslContext); return ProtocolConnectionUtils.connectSync(config); }
public static Connection connectSync(final ProtocolConnectionConfiguration configuration, CallbackHandler handler, Map<String, String> saslOptions, SSLContext sslContext) throws IOException { final ProtocolConnectionConfiguration config = ProtocolConnectionConfiguration.copy(configuration); config.setCallbackHandler(handler); config.setSaslOptions(saslOptions); config.setSslContext(sslContext); return connectSync(config); }
public static Connection connectSync(final ProtocolConnectionConfiguration configuration, CallbackHandler handler, Map<String, String> saslOptions, SSLContext sslContext) throws IOException { final ProtocolConnectionConfiguration config = ProtocolConnectionConfiguration.copy(configuration); config.setCallbackHandler(handler); config.setSaslOptions(saslOptions); config.setSslContext(sslContext); return connectSync(config); }
return authenticationContext.run((PrivilegedExceptionAction<Connection>) () -> ProtocolConnectionUtils.connectSync(config)); } catch (PrivilegedActionException e) { if (e.getCause() instanceof IOException) {
return authenticationContext.run((PrivilegedExceptionAction<Connection>) () -> ProtocolConnectionUtils.connectSync(config)); } catch (PrivilegedActionException e) { if (e.getCause() instanceof IOException) {
/** * Connect and register at the remote domain controller. * * @return connection the established connection * @throws IOException */ protected Connection openConnection() throws IOException { // Perhaps this can just be done once? CallbackHandler callbackHandler = null; SSLContext sslContext = null; if (realm != null) { sslContext = realm.getSSLContext(); CallbackHandlerFactory handlerFactory = realm.getSecretCallbackHandlerFactory(); if (handlerFactory != null) { String username = this.username != null ? this.username : localHostName; callbackHandler = handlerFactory.getCallbackHandler(username); } } final ProtocolConnectionConfiguration config = ProtocolConnectionConfiguration.copy(configuration); config.setCallbackHandler(callbackHandler); config.setSslContext(sslContext); // Connect return ProtocolConnectionUtils.connectSync(config); }