public static final class DOFAuthenticator.Config.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder(DOFAuthenticator.Config config)
Construct an instance of a authenticator configuration builder from an existing configuration.
|
Builder(DOFAuthenticator.State state,
DOFAuthenticator.Storage storage)
Construct an instance of a authenticator configuration builder from a state.
|
Builder(DOFObjectID.Domain domainID,
byte authenticatorID,
DOFAuthenticator.Storage storage)
Construct an instance of a authenticator configuration builder.
|
Modifier and Type | Method and Description |
---|---|
DOFAuthenticator.Config |
build()
Build a new immutable authenticator configuration.
|
DOFAuthenticator.Config.Builder |
setAuthenticatorIdentifier(byte authenticatorID)
Set the authenticator identity of this node, which is handling the storage authentication requests.
|
DOFAuthenticator.Config.Builder |
setDebug(boolean isDebug)
Set whether or not the authenticator should operate in debug mode.
|
DOFAuthenticator.Config.Builder |
setDebugKey(byte[] key)
Set the key to distribute the authenticator is operating in debug mode.
|
DOFAuthenticator.Config.Builder |
setDomainID(DOFObjectID.Domain domainID)
Set the domain identifier.
|
DOFAuthenticator.Config.Builder |
setMaxGrantLifetime(short max)
Set the maximum lifetime for permission grants authorized by the authenticator.
|
DOFAuthenticator.Config.Builder |
setName(java.lang.String name)
Set the name of the authenticator.
|
DOFAuthenticator.Config.Builder |
setStorage(DOFAuthenticator.Storage storage)
Set the storage implementation for an authenticator.
|
public Builder(DOFObjectID.Domain domainID, byte authenticatorID, DOFAuthenticator.Storage storage)
domainID
- The domain identifier. This must not be null, and must represent a single ID (cannot be
the BROADCAST oid or a multicast oid).authenticatorID
- The authenticator identifier. Must be unique on the network.!!!!!storage
- The authenticator's storage implementation.public Builder(DOFAuthenticator.Config config)
config
- The existing configuration. This must not be null.setName(String)
public Builder(DOFAuthenticator.State state, DOFAuthenticator.Storage storage)
state
- The state. This must not be null.storage
- The authenticator's storage implementation.setName(java.lang.String)
public DOFAuthenticator.Config.Builder setName(java.lang.String name)
name
- The authenticator name. null means you want the authenticator named automatically (auth1, auth2, etc.)public DOFAuthenticator.Config.Builder setAuthenticatorIdentifier(byte authenticatorID)
authenticatorID
- The authenticator identity of the node.public DOFAuthenticator.Config.Builder setStorage(DOFAuthenticator.Storage storage)
storage
- The storage that will provide authorization data for connections in the domain.public DOFAuthenticator.Config.Builder setDomainID(DOFObjectID.Domain domainID)
domainID
- The domain identifier. This must not be null, and must represent a single ID (cannot be
the BROADCAST oid or a multicast oid).public DOFAuthenticator.Config.Builder setMaxGrantLifetime(short max)
max
- The maximum lifetime for permission grants, in minutes.public DOFAuthenticator.Config.Builder setDebug(boolean isDebug)
isDebug
- Whether or not the authenticator should operate in debug mode.setDebugKey(byte[])
public DOFAuthenticator.Config.Builder setDebugKey(byte[] key)
key
- The debug key.setDebug(boolean)
public DOFAuthenticator.Config build()