Module com.azure.runtime.host
Package com.azure.runtime.host.resources
Class Executable<T extends Executable<T>>
java.lang.Object
com.azure.runtime.host.resources.Resource<T>
com.azure.runtime.host.resources.Executable<T>
- Type Parameters:
T
- The specific type of the resource, which may or may not be a subtype of this class. This allows for method chaining, even when using a subtype, when used in conjunction with the API onSelfAware
.
- All Implemented Interfaces:
ResourceTrait<T>
,ResourceWithArguments<T>
,ResourceWithEndpoints<T>
,ResourceWithEnvironment<T>
,ResourceWithLifecycle
,ResourceWithReference<T>
,SelfAware<T>
public class Executable<T extends Executable<T>>
extends Resource<T>
implements ResourceWithArguments<T>, ResourceWithEnvironment<T>, ResourceWithEndpoints<T>, ResourceWithReference<T>
Represents an executable resource.
-
Constructor Summary
ConstructorDescriptionExecutable
(String name) Executable
(String name, String workingDirectory) Executable
(String name, String workingDirectory, String command) -
Method Summary
Modifier and TypeMethodDescriptionself()
Returns a reference to the object that implements this interface.withCommand
(String command) The path to the command.withWorkingDirectory
(String workingDirectory) The path to the working directory.Methods inherited from class com.azure.runtime.host.resources.Resource
copyInto, getAnnotations, getName, getType, withAnnotation
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.runtime.host.resources.traits.ResourceWithArguments
withArgument, withArguments, withArguments
Methods inherited from interface com.azure.runtime.host.resources.traits.ResourceWithEndpoints
getEndpoint, getEndpoints, withExternalHttpEndpoints, withHttpEndpoint, withHttpEndpoint, withHttpsEndpoint, withHttpsEndpoint
Methods inherited from interface com.azure.runtime.host.resources.traits.ResourceWithEnvironment
withEnvironment, withEnvironment, withEnvironment, withReference, withReference, withReference
Methods inherited from interface com.azure.runtime.host.resources.traits.ResourceWithLifecycle
onResourceAdded, onResourcePrecommit, onResourceRemoved
Methods inherited from interface com.azure.runtime.host.resources.traits.ResourceWithReference
withReference
-
Constructor Details
-
Executable
-
Executable
-
Executable
-
-
Method Details
-
withWorkingDirectory
The path to the working directory. Should be interpreted as being relative to the AppHost directory.- Parameters:
workingDirectory
- The path to the working directory.- Returns:
- The Executable resource.
-
withCommand
The path to the command. Should be interpreted as being relative to the AppHost directory.- Parameters:
command
- The path to the command.- Returns:
- The Executable resource.
-
self
Description copied from interface:SelfAware
Returns a reference to the object that implements this interface.- Specified by:
self
in interfaceResourceWithEndpoints<T extends Executable<T>>
- Specified by:
self
in interfaceSelfAware<T extends Executable<T>>
- Returns:
- A reference to the object that implements this interface.
-