Package org.jboss.as.controller.client
Class ModelControllerClientConfiguration.Builder
- java.lang.Object
-
- org.jboss.as.controller.client.ModelControllerClientConfiguration.Builder
-
- Enclosing interface:
- ModelControllerClientConfiguration
public static class ModelControllerClientConfiguration.Builder extends Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ModelControllerClientConfigurationbuild()Builds the configuration object based on this builder's settings.ModelControllerClientConfiguration.BuildersetAuthenticationConfigUri(URI authConfigUri)Deprecated.this may be removed in a future release in favor of creating anAuthenticationContextand using aContextualModelControllerClientModelControllerClientConfiguration.BuildersetClientBindAddress(String clientBindAddress)Sets the local address to which the client socket should be bound.ModelControllerClientConfiguration.BuildersetConnectionTimeout(int connectionTimeout)Maximum time, in milliseconds, to wait for the connection to be establishedModelControllerClientConfiguration.BuildersetHandler(CallbackHandler handler)Sets the handler for callbacks to obtain authentication information.ModelControllerClientConfiguration.BuildersetHostName(String hostName)Sets the remote host name to which the client should connect.ModelControllerClientConfiguration.BuildersetPort(int port)Sets the remote port to which the client should connectModelControllerClientConfiguration.BuildersetProtocol(String protocol)Sets the protocol to use for communicating with the remote process.ModelControllerClientConfiguration.BuildersetSaslOptions(Map<String,String> saslOptions)Sets the SASL options for the remote connectionModelControllerClientConfiguration.BuildersetSslContext(SSLContext sslContext)Sets the SSL context for the remote connectionModelControllerClientConfiguration.BuildersetSslContextFactory(org.wildfly.security.SecurityFactory<SSLContext> sslContextFactory)Sets the SSLContext factory to obtain the SSLContext from for the remote connection
-
-
-
Method Detail
-
setHostName
public ModelControllerClientConfiguration.Builder setHostName(String hostName)
Sets the remote host name to which the client should connect.- Parameters:
hostName- the host name. Cannot benull- Returns:
- a builder to allow continued configuration
-
setClientBindAddress
public ModelControllerClientConfiguration.Builder setClientBindAddress(String clientBindAddress)
Sets the local address to which the client socket should be bound.- Parameters:
clientBindAddress- the local address, ornullto choose one automatically- Returns:
- a builder to allow continued configuration
-
setPort
public ModelControllerClientConfiguration.Builder setPort(int port)
Sets the remote port to which the client should connect- Parameters:
port- the port- Returns:
- a builder to allow continued configuration
-
setHandler
public ModelControllerClientConfiguration.Builder setHandler(CallbackHandler handler)
Sets the handler for callbacks to obtain authentication information.- Parameters:
handler- the handler, ornullif callbacks are not supported.- Returns:
- a builder to allow continued configuration
-
setSaslOptions
public ModelControllerClientConfiguration.Builder setSaslOptions(Map<String,String> saslOptions)
Sets the SASL options for the remote connection- Parameters:
saslOptions- the sasl options- Returns:
- a builder to allow continued configuration
-
setSslContext
public ModelControllerClientConfiguration.Builder setSslContext(SSLContext sslContext)
Sets the SSL context for the remote connection- Parameters:
sslContext- the SSL context- Returns:
- a builder to allow continued configuration
-
setSslContextFactory
public ModelControllerClientConfiguration.Builder setSslContextFactory(org.wildfly.security.SecurityFactory<SSLContext> sslContextFactory)
Sets the SSLContext factory to obtain the SSLContext from for the remote connection- Parameters:
sslContextFactory- the SSLContext factory- Returns:
- a builder to allow continued configuration
-
setProtocol
public ModelControllerClientConfiguration.Builder setProtocol(String protocol)
Sets the protocol to use for communicating with the remote process.- Parameters:
protocol- the protocol, ornullif a default protocol for thespecified portshould be used- Returns:
- a builder to allow continued configuration
-
setConnectionTimeout
public ModelControllerClientConfiguration.Builder setConnectionTimeout(int connectionTimeout)
Maximum time, in milliseconds, to wait for the connection to be established- Parameters:
connectionTimeout- the timeout- Returns:
- a builder to allow continued configuration
-
setAuthenticationConfigUri
@Deprecated public ModelControllerClientConfiguration.Builder setAuthenticationConfigUri(URI authConfigUri)
Deprecated.this may be removed in a future release in favor of creating anAuthenticationContextand using aContextualModelControllerClientSet the location of the authentication configuration file.- Parameters:
authConfigUri- the location to the authentication configuration file ornullto use auto discovery- Returns:
- a builder to allow continued configuration
-
build
public ModelControllerClientConfiguration build()
Builds the configuration object based on this builder's settings.- Returns:
- the configuration
-
-