public interface IApplication extends IOpenShiftResource
Modifier and Type | Method and Description |
---|---|
void |
addAlias(String string)
Add application alias
|
IEmbeddedCartridge |
addEmbeddableCartridge(ICartridge cartridge)
Adds the given embeddable cartridge to this application.
|
List<IEmbeddedCartridge> |
addEmbeddableCartridges(Collection<IEmbeddableCartridge> cartridge)
Adds all given embedded cartridges from this app, given their names.
|
List<IEmbeddedCartridge> |
addEmbeddableCartridges(ICartridge... cartridges)
Adds the given embeddable cartridges to this application.
|
IEnvironmentVariable |
addEnvironmentVariable(String name,
String value)
Adds an environment variable to this application.
|
Map<String,IEnvironmentVariable> |
addEnvironmentVariables(Map<String,String> environmentVariables)
Adds a map of environment variables to the application
|
boolean |
canGetEnvironmentVariables()
Used to determine if environment variables exist and are available to be
retrieved
|
boolean |
canUpdateEnvironmentVariables()
Used to determine if the current instance is able to update environment
variables.
|
void |
destroy()
Destroys this application (and removes it from the list of available
applications)
|
List<String> |
getAliases()
Retrieve all application aliases
|
ApplicationScale |
getApplicationScale()
Returns true if scaling is enabled on this application (only set at
creation time).
|
String |
getApplicationUrl()
Returns the url at which this application may be reached at.
|
IDeployedStandaloneCartridge |
getCartridge()
Returns the cartridge (application type) that this app is running on.
|
Date |
getCreationTime()
Returns the timestamp at which this app was created.
|
String |
getDeploymentType()
Returns the deployment type for this application.
|
IDomain |
getDomain()
Get the domain of the application.
|
IEmbeddedCartridge |
getEmbeddedCartridge(IEmbeddableCartridge cartridge)
Returns the embedded cartridge in this application.
|
IEmbeddedCartridge |
getEmbeddedCartridge(String cartridgeName)
Returns the embedded cartridge given its name.
|
List<IEmbeddedCartridge> |
getEmbeddedCartridges()
Returns all embedded cartridges.
|
List<String> |
getEnvironmentProperties()
Deprecated.
|
IEnvironmentVariable |
getEnvironmentVariable(String name)
Return the environment variable for the specified name
|
Map<String,IEnvironmentVariable> |
getEnvironmentVariables()
Retrieves the map of environment variables
|
String |
getEnvironmentVariableValue(String name)
Return the environment variables value for the specified name
|
List<IApplicationPortForwarding> |
getForwardablePorts()
Deprecated.
|
Collection<IGearGroup> |
getGearGroups()
Returns the gear groups for this application.
|
IGearProfile |
getGearProfile()
Returns true if scaling is enabled on this application (only set at
creation time).
|
String |
getGitUrl()
Returns the uri at which the git repository of this application may be
reached at.
|
String |
getInitialGitUrl()
Returns the git url that the application will get its initial code and
configuration from.
|
String |
getName()
Returns the name of this application.
|
com.jcraft.jsch.Session |
getSSHSession()
Deprecated.
|
String |
getSshUrl()
Returns the url to use to connect with ssh.
|
String |
getUUID()
Returns the uuid of this application.
|
boolean |
hasAlias(String name) |
boolean |
hasEmbeddedCartridge(IEmbeddableCartridge cartridge)
Returns
true if this application has an embedded cartridge. |
boolean |
hasEmbeddedCartridge(String cartridgeName)
Returns
true if this application has an embedded cartridge. |
boolean |
hasEnvironmentVariable(String name)
Checks if the environment variable is present in the application.
|
boolean |
hasSSHSession()
Returns true if the application was already provided with an SSH session,
and this session is still valid (connected).
|
boolean |
isPortFowardingStarted()
Deprecated.
|
void |
refresh()
Refresh the application but reloading its content from OpenShift.
|
List<IApplicationPortForwarding> |
refreshForwardablePorts()
Deprecated.
|
void |
removeAlias(String alias)
Remove application alias
|
void |
removeEmbeddedCartridge(IEmbeddableCartridge cartridge)
Removes the given embedded cartridge that is equal to the given
embeddable cartridge.
|
void |
removeEmbeddedCartridges(Collection<IEmbeddableCartridge> cartridges)
Removes the given embedded cartridges in this application that are equal
to the given IEmbeddableCartridge.
|
void |
removeEnvironmentVariable(IEnvironmentVariable environmentVariable)
Removes the environment variables with the given name from this
application.
|
void |
removeEnvironmentVariable(String name)
Removes the environment variables with the given name from this
application.
|
void |
restart()
Restarts this application.
|
void |
scaleDown()
Scale down application
|
void |
scaleUp()
Scale up application
|
String |
setDeploymentType(String deploymentType)
Sets the deployment type for this application.
|
void |
setSSHSession(com.jcraft.jsch.Session session)
Deprecated.
|
void |
start()
Starts this application.
|
List<IApplicationPortForwarding> |
startPortForwarding()
Deprecated.
|
void |
stop()
Stops this application.
|
void |
stop(boolean force)
Stops this application
|
List<IApplicationPortForwarding> |
stopPortForwarding()
Deprecated.
|
IEnvironmentVariable |
updateEnvironmentVariable(String name,
String value)
Updates an environment variable to this application.
|
boolean |
waitForAccessible(long timeout)
Waits for this application to become accessible on its public url.
|
Future<Boolean> |
waitForAccessibleAsync(long timeout)
Returns a Future that the caller can use to wait for the application to
become accessible on its public url.
|
getCreationLog, getMessages, hasCreationLog
String getName()
String getUUID()
String getGitUrl()
String getSshUrl()
String getInitialGitUrl()
String getDeploymentType()
String getApplicationUrl()
ApplicationScale getApplicationScale()
IGearProfile getGearProfile()
IDeployedStandaloneCartridge getCartridge()
IEmbeddedCartridge addEmbeddableCartridge(ICartridge cartridge) throws OpenShiftException
cartridge
- the cartridge that shall be addedOpenShiftException
List<IEmbeddedCartridge> addEmbeddableCartridges(ICartridge... cartridges) throws OpenShiftException
cartridges
- the cartridges that shall be addedOpenShiftException
List<IEmbeddedCartridge> addEmbeddableCartridges(Collection<IEmbeddableCartridge> cartridge) throws OpenShiftException
embeddedCartridges
- OpenShiftException
#addEmbeddableCartridge(IEmbeddedCartridge)
,
#removeEmbeddedCartridge(IEmbeddedCartridge)
List<IEmbeddedCartridge> getEmbeddedCartridges() throws OpenShiftException
OpenShiftException
IEmbeddedCartridge
,
#addEmbeddableCartridge(IEmbeddedCartridge)
,
#removeEmbeddedCartridge(IEmbeddedCartridge)
boolean hasEmbeddedCartridge(IEmbeddableCartridge cartridge) throws OpenShiftException
true
if this application has an embedded cartridge.
Returns false
otherwise.the
- name of the cartridge to look forOpenShiftException
IEmbeddedCartridge
,
#addEmbeddableCartridge(IEmbeddedCartridge)
,
#removeEmbeddedCartridge(IEmbeddedCartridge)
boolean hasEmbeddedCartridge(String cartridgeName) throws OpenShiftException
true
if this application has an embedded cartridge.
Returns false
otherwise.the
- name of the cartridge to look forOpenShiftException
IEmbeddedCartridge
,
#addEmbeddableCartridge(IEmbeddedCartridge)
,
#removeEmbeddedCartridge(IEmbeddedCartridge)
IEmbeddedCartridge getEmbeddedCartridge(String cartridgeName) throws OpenShiftException
null
if none was found.cartridgeName
- OpenShiftException
IEmbeddedCartridge getEmbeddedCartridge(IEmbeddableCartridge cartridge) throws OpenShiftException
null
if none was found.cartridge
- OpenShiftException
void removeEmbeddedCartridge(IEmbeddableCartridge cartridge) throws OpenShiftException
cartridge
- the cartridge that shall be removedOpenShiftException
void removeEmbeddedCartridges(Collection<IEmbeddableCartridge> cartridges) throws OpenShiftException
cartridges
- the cartridges that shall get removedOpenShiftException
Collection<IGearGroup> getGearGroups() throws OpenShiftException
IGearGroup
for this application.OpenShiftException
Date getCreationTime()
OpenShiftException
void destroy() throws OpenShiftException
OpenShiftException
IUser#getApplications()
void start() throws OpenShiftException
OpenShiftException
void restart() throws OpenShiftException
OpenShiftException
void stop() throws OpenShiftException
OpenShiftException
void stop(boolean force) throws OpenShiftException
force
- : true to force stop, false otherwiseOpenShiftException
boolean waitForAccessible(long timeout) throws OpenShiftException
timeout
- OpenShiftException
getApplicationUrl()
Future<Boolean> waitForAccessibleAsync(long timeout) throws OpenShiftException
timeout
- OpenShiftException
getApplicationUrl()
,
waitForAccessible(long)
,
IOpenShiftConnection.getExecutorService()
,
Future
IDomain getDomain()
void scaleDown() throws OpenShiftException
OpenShiftException
void scaleUp() throws OpenShiftException
OpenShiftException
String setDeploymentType(String deploymentType)
deploymentType
- void addAlias(String string) throws OpenShiftException
OpenShiftException
List<String> getAliases()
boolean hasAlias(String name)
void removeAlias(String alias) throws OpenShiftException
OpenShiftException
void refresh() throws OpenShiftException
refresh
in interface IOpenShiftResource
OpenShiftException
void setSSHSession(com.jcraft.jsch.Session session)
IApplicationSSHSession.setSSHSession(com.jcraft.jsch.Session)
session
- the SSH sessioncom.jcraft.jsch.Session getSSHSession()
IApplicationSSHSession
boolean hasSSHSession()
boolean isPortFowardingStarted() throws OpenShiftSSHOperationException
IApplicationSSHSession.isPortFowardingStarted()
OpenShiftSSHOperationException
List<IApplicationPortForwarding> getForwardablePorts() throws OpenShiftSSHOperationException
IApplicationSSHSession.getForwardablePorts()
OpenShiftSSHOperationException
List<IApplicationPortForwarding> startPortForwarding() throws OpenShiftSSHOperationException
IApplicationSSHSession.startPortForwarding()
com.jcraft.jsch.JSchException
OpenShiftSSHOperationException
List<IApplicationPortForwarding> stopPortForwarding() throws OpenShiftSSHOperationException
IApplicationSSHSession.stopPortForwarding()
OpenShiftSSHOperationException
List<IApplicationPortForwarding> refreshForwardablePorts() throws OpenShiftSSHOperationException
IApplicationSSHSession.refreshForwardablePorts()
OpenShiftSSHOperationException
List<String> getEnvironmentProperties() throws OpenShiftSSHOperationException
IApplicationSSHSession.getEnvironmentProperties()
OpenShiftSSHOperationException
Map<String,IEnvironmentVariable> getEnvironmentVariables() throws OpenShiftSSHOperationException
OpenShiftSSHOperationException
boolean hasEnvironmentVariable(String name) throws OpenShiftException
name
- Name of the environment variabletrue
if the current instance has
IEnvironmentVariables to return false
if the current instance has no
IEnvironmentVariables to returnOpenShiftSSHOperationException
OpenShiftException
IEnvironmentVariable addEnvironmentVariable(String name, String value) throws OpenShiftException
name
- key associated with the variable to addvalue
- value of the new variableOpenShiftSSHOperationException
- - if the variable already existsOpenShiftException
IEnvironmentVariable updateEnvironmentVariable(String name, String value) throws OpenShiftException
name
- key associated with the variable to updatevalue
- value of the new variableOpenShiftSSHOperationException
- - if the variable already existsOpenShiftException
Map<String,IEnvironmentVariable> addEnvironmentVariables(Map<String,String> environmentVariables) throws OpenShiftException
environmentVariables
- MapOpenShiftSSHOperationException
OpenShiftException
IEnvironmentVariable getEnvironmentVariable(String name) throws OpenShiftException
name
- key to be used to locate the environment variableOpenShiftSSHOperationException
- - thrown if the key does not existOpenShiftException
String getEnvironmentVariableValue(String name)
name
- key to be used to locate the environment variableOpenShiftSSHOperationException
- - thrown if the key does not existvoid removeEnvironmentVariable(String name) throws OpenShiftException
name
- key associated with the IEnvironmentVariable to be removedOpenShiftException
- - thrown if there is no IEnvironmentVariable associated with
the explicit parameter.void removeEnvironmentVariable(IEnvironmentVariable environmentVariable)
environmentVariable
- IEnvironmentVariable instance which should be removedOpenShiftException
- - thrown if there is no instance of IEnvironmentVariable
available to be removedboolean canGetEnvironmentVariables()
true
if this application can list its
environment variables. false
if it cannot. Internally this
translates to the presence of the link to list environment
variables.#getEnvironmentVariablesMap()
,
getEnvironmentVariable(String)
,
ApplicationResource.LINK_LIST_ENVIRONMENT_VARIABLES
boolean canUpdateEnvironmentVariables()
true
if this application can augment its
environment variables.false
if it cannot. addEnvironmentVariable(String, String)
,
addEnvironmentVariables(Map)
,
ApplicationResource.LINK_SET_UNSET_ENVIRONMENT_VARIABLES
Copyright © 2015 JBoss by Red Hat. All rights reserved.