Class NullKeyMaterialFactory
- java.lang.Object
-
- org.jenkinsci.plugins.docker.commons.credentials.KeyMaterialFactory
-
- org.jenkinsci.plugins.docker.commons.impl.NullKeyMaterialFactory
-
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public final class NullKeyMaterialFactory extends KeyMaterialFactory
KeyMaterialFactory
that does nothing.- Author:
- Kohsuke Kawaguchi
- See Also:
KeyMaterial.NULL
-
-
Field Summary
-
Fields inherited from class org.jenkinsci.plugins.docker.commons.credentials.KeyMaterialFactory
NULL
-
-
Constructor Summary
Constructors Constructor Description NullKeyMaterialFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KeyMaterialFactory
contextualize(KeyMaterialContext context)
Sets theKeyMaterialContext
within which thisKeyMaterialFactory
canKeyMaterialFactory.materialize()
KeyMaterial
instances.KeyMaterial
materialize()
Builds the key material environment variables needed to be passed when docker runs, to accessDockerServerCredentials
that this object was created from.-
Methods inherited from class org.jenkinsci.plugins.docker.commons.credentials.KeyMaterialFactory
checkContextualized, createSecretsDirectory, getContext, plus
-
-
-
-
Method Detail
-
materialize
public KeyMaterial materialize() throws IOException, InterruptedException
Description copied from class:KeyMaterialFactory
Builds the key material environment variables needed to be passed when docker runs, to accessDockerServerCredentials
that this object was created from.When you are done using the credentials, call
KeyMaterial.close()
to allow sensitive information to be removed from the disk.- Specified by:
materialize
in classKeyMaterialFactory
- Throws:
IOException
InterruptedException
-
contextualize
public KeyMaterialFactory contextualize(@NonNull KeyMaterialContext context)
Description copied from class:KeyMaterialFactory
Sets theKeyMaterialContext
within which thisKeyMaterialFactory
canKeyMaterialFactory.materialize()
KeyMaterial
instances. Can only be called once.- Overrides:
contextualize
in classKeyMaterialFactory
- Parameters:
context
- theKeyMaterialContext
.- Returns:
- must return
this
(which is only returned to simplify use via method chaining)
-
-