Class DockerPlatform
- java.lang.Object
-
- com.oracle.bedrock.extensible.AbstractExtensible
-
- com.oracle.bedrock.runtime.AbstractPlatform
-
- com.oracle.bedrock.runtime.docker.DockerPlatform
-
- All Implemented Interfaces:
com.oracle.bedrock.extensible.Extensible,com.oracle.bedrock.runtime.Infrastructure,com.oracle.bedrock.runtime.Platform
- Direct Known Subclasses:
DockerMachinePlatform
public class DockerPlatform extends com.oracle.bedrock.runtime.AbstractPlatformAPlatformthat can execute Docker commands using a specificDockerenvironment.Copyright (c) 2016. All Rights Reserved. Oracle Corporation.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.- Author:
- Jonathan Knight
-
-
Constructor Summary
Constructors Constructor Description DockerPlatform(com.oracle.bedrock.runtime.Platform clientPlatform, Docker docker, com.oracle.bedrock.Option... options)Constructs aDockerPlatform.DockerPlatform(String name, com.oracle.bedrock.runtime.Platform clientPlatform, Docker docker, com.oracle.bedrock.Option... options)Constructs aDockerPlatformwith a specific name.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DockerPlatformclientAt(com.oracle.bedrock.runtime.Platform platform, Docker environment)InetAddressgetAddress()Obtain theInetAddressof the Docker daemon.protected <A extends com.oracle.bedrock.runtime.Application,B extends com.oracle.bedrock.runtime.ApplicationLauncher<A>>
BgetApplicationLauncher(com.oracle.bedrock.runtime.MetaClass<A> metaClass, com.oracle.bedrock.OptionsByType optionsByType)com.oracle.bedrock.runtime.PlatformgetClientPlatform()Obtain thePlatformthat is used to run Docker client commands.DockergetDocker()Obtain theDockerenvironment being used by thisDockerPlatform.com.oracle.bedrock.runtime.OperatingSystemgetOperatingSystem()<A extends com.oracle.bedrock.runtime.Application>
Alaunch(com.oracle.bedrock.runtime.MetaClass<A> metaClass, com.oracle.bedrock.Option... options)static DockerPlatformlocalClient()Obtain aDockerPlatformusing theLocalPlatformas the clientPlatformand automatically configuring the Docker environment.static DockerPlatformlocalClient(Docker environment)Obtain aDockerPlatformusing theLocalPlatformas the clientPlatformand using the specifiedDockerenvironment.-
Methods inherited from class com.oracle.bedrock.extensible.AbstractExtensible
add, add, get, getInstancesOf, has, remove, removeAllFeatures
-
-
-
-
Constructor Detail
-
DockerPlatform
public DockerPlatform(com.oracle.bedrock.runtime.Platform clientPlatform, Docker docker, com.oracle.bedrock.Option... options)Constructs aDockerPlatform.- Parameters:
clientPlatform- the clientPlatformdocker- theDockeroptions- theOptions
-
DockerPlatform
public DockerPlatform(String name, com.oracle.bedrock.runtime.Platform clientPlatform, Docker docker, com.oracle.bedrock.Option... options)
Constructs aDockerPlatformwith a specific name.- Parameters:
name- the nameclientPlatform- the clientPlatformdocker- theDockeroptions- theOptions
-
-
Method Detail
-
getClientPlatform
public com.oracle.bedrock.runtime.Platform getClientPlatform()
Obtain thePlatformthat is used to run Docker client commands.- Returns:
- the
Platformthat is used to run Docker client commands
-
getDocker
public Docker getDocker()
Obtain theDockerenvironment being used by thisDockerPlatform.- Returns:
- the
Dockerenvironment being used by thisDockerPlatform
-
getOperatingSystem
public com.oracle.bedrock.runtime.OperatingSystem getOperatingSystem()
-
getAddress
public InetAddress getAddress()
Obtain theInetAddressof the Docker daemon.- Returns:
- the
InetAddressof the Docker daemon.
-
launch
public <A extends com.oracle.bedrock.runtime.Application> A launch(com.oracle.bedrock.runtime.MetaClass<A> metaClass, com.oracle.bedrock.Option... options)- Specified by:
launchin interfacecom.oracle.bedrock.runtime.Platform- Overrides:
launchin classcom.oracle.bedrock.runtime.AbstractPlatform
-
getApplicationLauncher
protected <A extends com.oracle.bedrock.runtime.Application,B extends com.oracle.bedrock.runtime.ApplicationLauncher<A>> B getApplicationLauncher(com.oracle.bedrock.runtime.MetaClass<A> metaClass, com.oracle.bedrock.OptionsByType optionsByType) throws UnsupportedOperationException- Specified by:
getApplicationLauncherin classcom.oracle.bedrock.runtime.AbstractPlatform- Throws:
UnsupportedOperationException
-
localClient
public static DockerPlatform localClient()
Obtain aDockerPlatformusing theLocalPlatformas the clientPlatformand automatically configuring the Docker environment.- Returns:
- a
DockerPlatformusing theLocalPlatformas the clientPlatform
-
localClient
public static DockerPlatform localClient(Docker environment)
Obtain aDockerPlatformusing theLocalPlatformas the clientPlatformand using the specifiedDockerenvironment.- Parameters:
environment- theDockerenvironment to use when executing Docker commands- Returns:
- a
DockerPlatformusing theLocalPlatformas the clientPlatformand the specifiedDockerenvironment
-
clientAt
public static DockerPlatform clientAt(com.oracle.bedrock.runtime.Platform platform, Docker environment)
- Parameters:
platform- thePlatformto execute Docker client commands onenvironment- theDockerenvironment to use when executing Docker commands- Returns:
- a
DockerPlatformusing the specified clientPlatformandDockerenvironment
-
-