Interface AppClientContainer.Builder
-
- All Known Implementing Classes:
AppClientContainerBuilder
- Enclosing class:
- AppClientContainer
public static interface AppClientContainer.Builder
Prescribes 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.Builder
addMessageSecurityConfig(org.glassfish.appclient.client.acc.config.MessageSecurityConfig msConfig)
Adds an optionalMessageSecurityConfig
setting.AppClientContainer.Builder
authRealm(String className)
Sets the optional authentication realm for the ACC.AppClientContainer.Builder
clientCredentials(String user, char[] password)
Sets the optional client credentials to be used during authentication to the back-end.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.AppClientContainer.Builder
containerProperties(List<org.glassfish.appclient.client.acc.config.Property> containerProperties)
Sets the container-level properties.AppClientContainer.Builder
containerProperties(Properties containerProperties)
Sets the container-level Properties.org.glassfish.appclient.client.acc.config.AuthRealm
getAuthRealm()
org.glassfish.appclient.client.acc.config.ClientCredential
getClientCredential()
Properties
getContainerProperties()
Returns the container-level Properties.Logger
getLogger()
List<org.glassfish.appclient.client.acc.config.MessageSecurityConfig>
getMessageSecurityConfig()
boolean
getSendPassword()
org.glassfish.appclient.client.acc.config.TargetServer[]
getTargetServers()
AppClientContainer.Builder
logger(Logger logger)
Sets the logger which the ACC should use as it runs.AppClientContainer
newContainer(Class mainClass)
AppClientContainer
newContainer(URI archiveURI)
AppClientContainer
newContainer(URI archiveURI, CallbackHandler callbackHandler, String mainClassName, String appName)
AppClientContainer
newContainer(URI archiveURI, CallbackHandler callbackHandler, String mainClassName, String appName, boolean isTextAuth)
AppClientContainer.Builder
sendPassword(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 optionalMessageSecurityConfig
setting.- Parameters:
msConfig
- the new MessageSecurityConfig- Returns:
- the
Builder
instance
-
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
Builder
instance
-
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
clientCredentials
then the ACC will use aCallbackHandler
when 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
Builder
instance
-
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
clientCredentials
then the ACC will use aCallbackHandler
when 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
Builder
instance
-
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()
-
-