.setHostName(hostname) .setPort(port) .setConnectionTimeout(timeout * 1000); if (authenticationConfig != null) { try {
/** * Create a client instance for a remote address and port and CallbackHandler. * * @param hostName the remote host * @param port the port * @param handler CallbackHandler to obtain authentication information for the call. * @param sslContext a pre-initialised SSLContext * @param connectionTimeout maximum time, in milliseconds, to wait for the connection to be established * @return A model controller client * @throws UnknownHostException if the host cannot be found * @deprecated use {@link org.jboss.as.controller.client.ModelControllerClientConfiguration.Builder} and {@link #create(ModelControllerClientConfiguration)} */ @Deprecated public static ModelControllerClient create(final String hostName, final int port, final CallbackHandler handler, final SSLContext sslContext, final int connectionTimeout) throws UnknownHostException { return create(new ModelControllerClientConfiguration.Builder() .setConnectionTimeout(connectionTimeout) .setHandler(handler) .setHostName(hostName) .setPort(port) .setSslContext(sslContext) .build()); }
/** * Create a client instance for a remote address and port and CallbackHandler. * * @param protocol The prototcol to use. If this is remote+http or remote+https http upgrade will be used rather than the native remote protocol * @param hostName the remote host * @param port the port * @param handler CallbackHandler to obtain authentication information for the call. * @param sslContext a pre-initialised SSLContext * @return A model controller client * @throws UnknownHostException if the host cannot be found * @deprecated use {@link org.jboss.as.controller.client.ModelControllerClientConfiguration.Builder} and {@link #create(ModelControllerClientConfiguration)} */ @Deprecated public static ModelControllerClient create(final String protocol, final String hostName, final int port, final CallbackHandler handler, final SSLContext sslContext, final int connectionTimeout) throws UnknownHostException { return create(new ModelControllerClientConfiguration.Builder() .setConnectionTimeout(connectionTimeout) .setHandler(handler) .setHostName(hostName) .setPort(port) .setProtocol(protocol) .setSslContext(sslContext) .build()); }
/** * Create a client instance for a remote address and port and CallbackHandler. * * @param protocol The prototcol to use. If this is remote+http or remote+https http upgrade will be used rather than the native remote protocol * @param hostName the remote host * @param port the port * @param handler CallbackHandler to obtain authentication information for the call. * @param sslContext a pre-initialised SSLContext * @param connectionTimeout maximum time, in milliseconds, to wait for the connection to be established * @param saslOptions Additional options to be passed to the SASL mechanism. * @return A model controller client * @throws UnknownHostException if the host cannot be found * @deprecated use {@link org.jboss.as.controller.client.ModelControllerClientConfiguration.Builder} and {@link #create(ModelControllerClientConfiguration)} */ @Deprecated public static ModelControllerClient create(final String protocol, final String hostName, final int port, final CallbackHandler handler, final SSLContext sslContext, final int connectionTimeout, final Map<String, String> saslOptions) throws UnknownHostException { return create(new ModelControllerClientConfiguration.Builder() .setConnectionTimeout(connectionTimeout) .setHandler(handler) .setHostName(hostName) .setPort(port) .setProtocol(protocol) .setSaslOptions(saslOptions) .setSslContext(sslContext) .build()); }
/** * Create a client instance for a remote address and port and CallbackHandler. * * @param hostName the remote host * @param port the port * @param handler CallbackHandler to obtain authentication information for the call. * @param sslContext a pre-initialised SSLContext * @param connectionTimeout maximum time, in milliseconds, to wait for the connection to be established * @param saslOptions Additional options to be passed to the SASL mechanism. * @return A model controller client * @throws UnknownHostException if the host cannot be found * @deprecated use {@link org.jboss.as.controller.client.ModelControllerClientConfiguration.Builder} and {@link #create(ModelControllerClientConfiguration)} */ @Deprecated public static ModelControllerClient create(final String hostName, final int port, final CallbackHandler handler, final SSLContext sslContext, final int connectionTimeout, final Map<String, String> saslOptions) throws UnknownHostException { return create(new ModelControllerClientConfiguration.Builder() .setConnectionTimeout(connectionTimeout) .setHandler(handler) .setHostName(hostName) .setPort(port) .setSaslOptions(saslOptions) .setSslContext(sslContext) .build()); }
/** * Create a client instance for a remote address and port and CallbackHandler. * * @param protocol The prototcol to use. If this is remote+http or remote+https http upgrade will be used rather than the native remote protocol * @param hostName the remote host * @param port the port * @param handler CallbackHandler to obtain authentication information for the call. * @param sslContext a pre-initialised SSLContext * @param connectionTimeout maximum time, in milliseconds, to wait for the connection to be established * @param saslOptions Additional options to be passed to the SASL mechanism. * @param clientBindAddress the address to which the client will bind. * @return A model controller client * @throws UnknownHostException if the host cannot be found * @deprecated use {@link org.jboss.as.controller.client.ModelControllerClientConfiguration.Builder} and {@link #create(ModelControllerClientConfiguration)} */ @Deprecated public static ModelControllerClient create(final String protocol, final String hostName, final int port, final CallbackHandler handler, final SSLContext sslContext, final int connectionTimeout, final Map<String, String> saslOptions, final String clientBindAddress) throws UnknownHostException { return create(new ModelControllerClientConfiguration.Builder() .setClientBindAddress(clientBindAddress) .setConnectionTimeout(connectionTimeout) .setHandler(handler) .setHostName(hostName) .setPort(port) .setProtocol(protocol) .setSaslOptions(saslOptions) .setSslContext(sslContext) .build()); }
/** * Create a client instance for a remote address and port and CallbackHandler. * * @param hostName the remote host * @param port the port * @param handler CallbackHandler to obtain authentication information for the call. * @param sslContext a pre-initialised SSLContext * @param connectionTimeout maximum time, in milliseconds, to wait for the connection to be established * @param saslOptions Additional options to be passed to the SASL mechanism. * @param clientBindAddress the address to which the client will bind. * @return A model controller client * @throws UnknownHostException if the host cannot be found * @deprecated use {@link org.jboss.as.controller.client.ModelControllerClientConfiguration.Builder} and {@link #create(ModelControllerClientConfiguration)} */ @Deprecated public static ModelControllerClient create(final String hostName, final int port, final CallbackHandler handler, final SSLContext sslContext, final int connectionTimeout, final Map<String, String> saslOptions, final String clientBindAddress) throws UnknownHostException { return create(new ModelControllerClientConfiguration.Builder() .setClientBindAddress(clientBindAddress) .setConnectionTimeout(connectionTimeout) .setHandler(handler) .setHostName(hostName) .setPort(port) .setSaslOptions(saslOptions) .setSslContext(sslContext) .build()); }
@Override public ModelControllerClient getClient(ControllerAddress address, CallbackHandler handler, boolean disableLocalAuth, SecurityFactory<SSLContext> sslContextFactory, boolean fallbackSslContext, int connectionTimeout, ConnectionCloseHandler closeHandler, ProtocolTimeoutHandler timeoutHandler, String clientBindAddress) throws IOException { // TODO - Make use of the ProtocolTimeoutHandler Map<String, String> saslOptions = disableLocalAuth ? DISABLED_LOCAL_AUTH : ENABLED_LOCAL_AUTH; ModelControllerClientConfiguration config = new ModelControllerClientConfiguration.Builder() .setProtocol(address.getProtocol()) .setHostName(address.getHost()) .setPort(address.getPort()) .setHandler(handler) .setSslContextFactory(sslContextFactory) .setConnectionTimeout(connectionTimeout) .setSaslOptions(saslOptions) .setClientBindAddress(clientBindAddress) .build(); return ModelControllerClient.Factory.create(config); } };
@Override public ModelControllerClient getClient(ControllerAddress address, CallbackHandler handler, boolean disableLocalAuth, SecurityFactory<SSLContext> sslContextFactory, boolean fallbackSslContext, int connectionTimeout, ConnectionCloseHandler closeHandler, ProtocolTimeoutHandler timeoutHandler, String clientBindAddress) throws IOException { // TODO - Make use of the ProtocolTimeoutHandler Map<String, String> saslOptions = disableLocalAuth ? DISABLED_LOCAL_AUTH : ENABLED_LOCAL_AUTH; ModelControllerClientConfiguration config = new ModelControllerClientConfiguration.Builder() .setProtocol(address.getProtocol()) .setHostName(address.getHost()) .setPort(address.getPort()) .setHandler(handler) .setSslContextFactory(sslContextFactory) .setConnectionTimeout(connectionTimeout) .setSaslOptions(saslOptions) .setClientBindAddress(clientBindAddress) .build(); return ModelControllerClient.Factory.create(config); } };
public static ModelControllerClientConfiguration create(final String protocol, final String hostName, final int port, final CallbackHandler handler, final SSLContext sslContext, final int connectionTimeout) throws UnknownHostException { return new Builder() .setConnectionTimeout(connectionTimeout) .setHandler(handler) .setHostName(hostName) .setPort(port) .setProtocol(protocol) .setSslContext(sslContext) .build(); }
public static ModelControllerClientConfiguration create(final String protocol, final String hostName, final int port, final CallbackHandler handler, final SSLContext sslContext, final int connectionTimeout, final Map<String, String> saslOptions) throws UnknownHostException { return new Builder() .setConnectionTimeout(connectionTimeout) .setHandler(handler) .setHostName(hostName) .setPort(port) .setProtocol(protocol) .setSaslOptions(saslOptions) .setSslContext(sslContext) .build(); }
public static ModelControllerClientConfiguration create(final String hostName, final int port, final CallbackHandler handler, final SSLContext sslContext, final int connectionTimeout) throws UnknownHostException { return new Builder() .setConnectionTimeout(connectionTimeout) .setHandler(handler) .setHostName(hostName) .setPort(port) .setSslContext(sslContext) .build(); }