Class KeyMaterial
- java.lang.Object
-
- org.jenkinsci.plugins.docker.commons.credentials.KeyMaterial
-
- All Implemented Interfaces:
Closeable
,Serializable
,AutoCloseable
public abstract class KeyMaterial extends Object implements Closeable, Serializable
Represents a locally extracted credentials information.Implementations of this class are created by their corresponding
KeyMaterialFactory
implementations. Be sure to callclose()
when finished using aKeyMaterial
instance.- Author:
- Kohsuke Kawaguchi
- See Also:
DockerServerEndpoint.newKeyMaterialFactory(hudson.model.AbstractBuild)
,DockerRegistryEndpoint.newKeyMaterialFactory(hudson.model.AbstractBuild)
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static KeyMaterial
NULL
KeyMaterial
that does nothing.
-
Constructor Summary
Constructors Modifier Constructor Description protected
KeyMaterial(EnvVars envVars)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
close()
Deletes the key materials from the file system.EnvVars
env()
Get the environment variables needed to be passed when docker runs, to accessDockerServerCredentials
that this object was created from.
-
-
-
Field Detail
-
NULL
public static final KeyMaterial NULL
KeyMaterial
that does nothing.
-
-
Constructor Detail
-
KeyMaterial
protected KeyMaterial(EnvVars envVars)
-
-
Method Detail
-
env
public EnvVars env()
Get the environment variables needed to be passed when docker runs, to accessDockerServerCredentials
that this object was created from.
-
close
public abstract void close() throws IOException
Deletes the key materials from the file system. As key materials are copied into files every timeKeyMaterialFactory
is created, it must be also cleaned up each time.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
-