Interface AppClientContainer.Builder
-
- All Known Implementing Classes:
AppClientContainerBuilder
- Enclosing class:
- AppClientContainer
public static interface AppClientContainer.BuilderPrescribes the exposed behavior of ACC configuration that can be set up further, and can be used to newContainer an ACC.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AppClientContainer.BuilderaddMessageSecurityConfig(org.glassfish.appclient.client.acc.config.MessageSecurityConfig msConfig)Adds an optionalMessageSecurityConfigsetting.AppClientContainer.BuilderauthRealm(String className)Sets the optional authentication realm for the ACC.AppClientContainer.BuilderclientCredentials(String user, char[] password)Sets the optional client credentials to be used during authentication to the back-end.AppClientContainer.BuilderclientCredentials(String user, char[] password, String realm)Sets the optional client credentials and server-side realm to be used during authentication to the back-end.AppClientContainer.BuildercontainerProperties(List<org.glassfish.appclient.client.acc.config.Property> containerProperties)Sets the container-level properties.AppClientContainer.BuildercontainerProperties(Properties containerProperties)Sets the container-level Properties.org.glassfish.appclient.client.acc.config.AuthRealmgetAuthRealm()org.glassfish.appclient.client.acc.config.ClientCredentialgetClientCredential()PropertiesgetContainerProperties()Returns the container-level Properties.LoggergetLogger()List<org.glassfish.appclient.client.acc.config.MessageSecurityConfig>getMessageSecurityConfig()booleangetSendPassword()org.glassfish.appclient.client.acc.config.TargetServer[]getTargetServers()AppClientContainer.Builderlogger(Logger logger)Sets the logger which the ACC should use as it runs.AppClientContainernewContainer(Class mainClass)AppClientContainernewContainer(URI archiveURI)AppClientContainernewContainer(URI archiveURI, CallbackHandler callbackHandler, String mainClassName, String appName)AppClientContainernewContainer(URI archiveURI, CallbackHandler callbackHandler, String mainClassName, String appName, boolean isTextAuth)AppClientContainer.BuildersendPassword(boolean sendPassword)Sets whether the ACC should send the password to the server during authentication.
-
-
-
Method Detail
-
newContainer
AppClientContainer newContainer(URI archiveURI) throws Exception, UserError
-
newContainer
AppClientContainer newContainer(URI archiveURI, CallbackHandler callbackHandler, String mainClassName, String appName) throws Exception, UserError
-
newContainer
AppClientContainer newContainer(URI archiveURI, CallbackHandler callbackHandler, String mainClassName, String appName, boolean isTextAuth) throws Exception, UserError
-
newContainer
AppClientContainer newContainer(Class mainClass) throws Exception, UserError
-
getTargetServers
org.glassfish.appclient.client.acc.config.TargetServer[] getTargetServers()
-
addMessageSecurityConfig
AppClientContainer.Builder addMessageSecurityConfig(org.glassfish.appclient.client.acc.config.MessageSecurityConfig msConfig)
Adds an optionalMessageSecurityConfigsetting.- Parameters:
msConfig- the new MessageSecurityConfig- Returns:
- the
Builderinstance
-
getMessageSecurityConfig
List<org.glassfish.appclient.client.acc.config.MessageSecurityConfig> getMessageSecurityConfig()
-
authRealm
AppClientContainer.Builder authRealm(String className)
Sets the optional authentication realm for the ACC.Each specific realm will determine which properties should be set in the Properties argument.
- Parameters:
className- name of the class which implements the realm- Returns:
- the
Builderinstance
-
getAuthRealm
org.glassfish.appclient.client.acc.config.AuthRealm getAuthRealm()
-
clientCredentials
AppClientContainer.Builder clientCredentials(String user, char[] password)
Sets the optional client credentials to be used during authentication to the back-end.If the client does not invoke
clientCredentialsthen the ACC will use aCallbackHandlerwhen it discovers that authentication is required. SeeAppClientContainer.callerSuppliedCallbackHandler.- Parameters:
username- username valid in the default realm on the serverpassword- password valid in the default realm on the server for the username- Returns:
- the
Builderinstance
-
getClientCredential
org.glassfish.appclient.client.acc.config.ClientCredential getClientCredential()
-
clientCredentials
AppClientContainer.Builder clientCredentials(String user, char[] password, String realm)
Sets the optional client credentials and server-side realm to be used during authentication to the back-end.If the client does not invoke
clientCredentialsthen the ACC will use aCallbackHandlerwhen it discovers that authentication is required. SeeAppClientContainer.callerSuppliedCallbackHandler.- Parameters:
username- username valid in the specified realm on the serverpassword- password valid in the specified realm on the server for the usernamerealmName- name of the realm on the server within which the credentials are valid- Returns:
- the
Builderinstance
-
containerProperties
AppClientContainer.Builder containerProperties(Properties containerProperties)
Sets the container-level Properties.- Parameters:
containerProperties-- Returns:
-
containerProperties
AppClientContainer.Builder containerProperties(List<org.glassfish.appclient.client.acc.config.Property> containerProperties)
Sets the container-level properties.Typically used when setting the properties from the parsed XML config file.
- Parameters:
containerProperties- Property objects to use in setting the properties- Returns:
-
getContainerProperties
Properties getContainerProperties()
Returns the container-level Properties.- Returns:
- container-level properties
-
logger
AppClientContainer.Builder logger(Logger logger)
Sets the logger which the ACC should use as it runs.- Parameters:
logger-- Returns:
-
getLogger
Logger getLogger()
-
sendPassword
AppClientContainer.Builder sendPassword(boolean sendPassword)
Sets whether the ACC should send the password to the server during authentication.- Parameters:
sendPassword-- Returns:
-
getSendPassword
boolean getSendPassword()
-
-