OpenShift Java Client 2.5.0.Final

com.openshift.internal.client
Class ApplicationResource

java.lang.Object
  extended by com.openshift.internal.client.AbstractOpenShiftResource
      extended by com.openshift.internal.client.ApplicationResource
All Implemented Interfaces:
IApplication, IOpenShiftResource

public class ApplicationResource
extends AbstractOpenShiftResource
implements IApplication

The ApplicationResource object is an implementation of com.openshift.client.IApplication, and provides a runtime model for the real application that resides on the OpenShift platform being accessed.

Author:
André Dietisheim, Syed Iqbal, Martes G Wigglesworth

Nested Class Summary
protected static class ApplicationResource.SshStreams
           
 
Nested classes/interfaces inherited from class com.openshift.internal.client.AbstractOpenShiftResource
AbstractOpenShiftResource.Parameters, AbstractOpenShiftResource.ServiceRequest
 
Constructor Summary
protected ApplicationResource(ApplicationResourceDTO dto, DomainResource domain)
           
protected ApplicationResource(String name, String uuid, String creationTime, Messages messages, String applicationUrl, String sshUrl, String gitUrl, String initialGitUrl, IGearProfile gearProfile, ApplicationScale scale, List<String> aliases, Map<String,CartridgeResourceDTO> cartridgesByName, Map<String,Link> links, DomainResource domain)
          Instantiates a new application.
 
Method Summary
 void addAlias(String alias)
          Add application alias
 IEmbeddedCartridge addEmbeddableCartridge(IEmbeddableCartridge cartridge)
          Adds the given embedded cartridge to this application.
 List<IEmbeddedCartridge> addEmbeddableCartridges(Collection<IEmbeddableCartridge> cartridges)
          Adds all given embedded cartridges from this app, given their names.
 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
protected  boolean canResolv(String url)
           
 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)
 boolean equals(Object object)
           
 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.
 IStandaloneCartridge getCartridge()
          Returns the cartridge (application type) that this app is running on.
protected  ICartridge getCartridge(String cartridgeName)
          Returns the main (standalone) cartrige or one of the embedded cartridges whose name matches the given param.
protected  IOpenShiftConnection getConnection()
           
 Date getCreationTime()
          Returns the timestamp at which this app was created.
 void getDescriptor()
           
 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()
          Retrieves the list of environment properties.
 IEnvironmentVariable getEnvironmentVariable(String name)
          Return the environment variable for the specified name
 Map<String,IEnvironmentVariable> getEnvironmentVariables()
          Retrieves the map of environment variables
 List<IApplicationPortForwarding> getForwardablePorts()
          Returns the list of forwardable ports on OpenShift for this application.
 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.
protected  Map<String,IEnvironmentVariable> getOrLoadEnvironmentVariables()
           
 com.jcraft.jsch.Session getSSHSession()
          Returns the SSH session that this application uses to connect to OpenShift.
 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.
 int hashCode()
           
 boolean hasSSHSession()
          Returns true if the application was already provided with an SSH session, and this session is still valid (connected).
 boolean isPortFowardingStarted()
          Returns true if the port-forwarding has been started, false otherwise.
 void refresh()
          Refresh the application but reloading its content from OpenShift.
protected  void refreshEmbeddedCartridges()
          Queries the backend to list the embedded cartridges and adds the new ones & update the ones that are already present
 List<IApplicationPortForwarding> refreshForwardablePorts()
          Refreshes the list of port-forwarding.
 void removeAlias(String alias)
          Remove application alias
 void removeEmbeddedCartridge(IEmbeddableCartridge cartridge)
          Removes the given embedded cartridge that is equal to the given embeddable cartridge.
protected  void removeEmbeddedCartridge(IEmbeddedCartridge embeddedCartridge)
          "callback" from the embeddedCartridge once it has been destroyed.
 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 targetName)
          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
 void setSSHSession(com.jcraft.jsch.Session session)
          Sets the SSH session that this application will use to connect to OpenShift to perform some operations.
protected  List<String> sshExecCmd(String command, ApplicationResource.SshStreams sshStream)
           
 void start()
          Starts this application.
 List<IApplicationPortForwarding> startPortForwarding()
           
 void stop()
          Stops this application.
 void stop(boolean force)
          Stops this application
 List<IApplicationPortForwarding> stopPortForwarding()
          Stop the port-forwarding for all ports.
 String toString()
           
protected  void update(ApplicationResourceDTO dto)
           
protected  void updateEnvironmentVariables()
           
 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.
 
Methods inherited from class com.openshift.internal.client.AbstractOpenShiftResource
getCreationLog, getLink, getMessages, hasCreationLog, setLinks
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.openshift.client.IOpenShiftResource
getCreationLog, getMessages, hasCreationLog
 

Constructor Detail

ApplicationResource

protected ApplicationResource(ApplicationResourceDTO dto,
                              DomainResource domain)

ApplicationResource

protected ApplicationResource(String name,
                              String uuid,
                              String creationTime,
                              Messages messages,
                              String applicationUrl,
                              String sshUrl,
                              String gitUrl,
                              String initialGitUrl,
                              IGearProfile gearProfile,
                              ApplicationScale scale,
                              List<String> aliases,
                              Map<String,CartridgeResourceDTO> cartridgesByName,
                              Map<String,Link> links,
                              DomainResource domain)
Instantiates a new application.

Parameters:
name - the name
uuid - the uuid
creationTime - the creation time
messages - the creation log
applicationUrl - the application url
gitUrl - the git url
sshUrl - the ssh url
cartridge - the cartridge (type/framework)
aliases - the aliases
links - the links
domain - the domain this application belongs to
Throws:
DatatypeConfigurationException
Method Detail

getName

public String getName()
Description copied from interface: IApplication
Returns the name of this application.

Specified by:
getName in interface IApplication
Returns:

getApplicationScale

public ApplicationScale getApplicationScale()
Description copied from interface: IApplication
Returns true if scaling is enabled on this application (only set at creation time).

Specified by:
getApplicationScale in interface IApplication
Returns:
true if scaling is enabled on this application (only set at creation time).

getGearProfile

public IGearProfile getGearProfile()
Description copied from interface: IApplication
Returns true if scaling is enabled on this application (only set at creation time).

Specified by:
getGearProfile in interface IApplication
Returns:
true if scaling is enabled on this application (only set at creation time).

getUUID

public String getUUID()
Description copied from interface: IApplication
Returns the uuid of this application.

Specified by:
getUUID in interface IApplication
Returns:
the uuid of this application.

getCartridge

public IStandaloneCartridge getCartridge()
Description copied from interface: IApplication
Returns the cartridge (application type) that this app is running on.

Specified by:
getCartridge in interface IApplication
Returns:
the cartridge of this application

getCartridge

protected ICartridge getCartridge(String cartridgeName)
Returns the main (standalone) cartrige or one of the embedded cartridges whose name matches the given param.

Parameters:
cartridgeName - the name of the cartridge to look for.
Returns:
the cartridge or null if none has this name.

getCreationTime

public Date getCreationTime()
Description copied from interface: IApplication
Returns the timestamp at which this app was created.

Specified by:
getCreationTime in interface IApplication
Returns:
the creation time

getDomain

public IDomain getDomain()
Description copied from interface: IApplication
Get the domain of the application.

Specified by:
getDomain in interface IApplication
Returns:
the domain

destroy

public void destroy()
             throws OpenShiftException
Description copied from interface: IApplication
Destroys this application (and removes it from the list of available applications)

Specified by:
destroy in interface IApplication
Throws:
OpenShiftException
See Also:
IUser#getApplications()

start

public void start()
           throws OpenShiftException
Description copied from interface: IApplication
Starts this application. Has no effect if this app is already running.

Specified by:
start in interface IApplication
Throws:
OpenShiftException

restart

public void restart()
             throws OpenShiftException
Description copied from interface: IApplication
Restarts this application.

Specified by:
restart in interface IApplication
Throws:
OpenShiftException

stop

public void stop()
          throws OpenShiftException
Description copied from interface: IApplication
Stops this application.

Specified by:
stop in interface IApplication
Throws:
OpenShiftException

stop

public void stop(boolean force)
          throws OpenShiftException
Description copied from interface: IApplication
Stops this application

Specified by:
stop in interface IApplication
Parameters:
force - : true to force stop, false otherwise
Throws:
OpenShiftException

getDescriptor

public void getDescriptor()

scaleDown

public void scaleDown()
               throws OpenShiftException
Description copied from interface: IApplication
Scale down application

Specified by:
scaleDown in interface IApplication
Throws:
OpenShiftException

scaleUp

public void scaleUp()
             throws OpenShiftException
Description copied from interface: IApplication
Scale up application

Specified by:
scaleUp in interface IApplication
Throws:
OpenShiftException

addAlias

public void addAlias(String alias)
              throws OpenShiftException
Description copied from interface: IApplication
Add application alias

Specified by:
addAlias in interface IApplication
Throws:
OpenShiftException

getAliases

public List<String> getAliases()
Description copied from interface: IApplication
Retrieve all application aliases

Specified by:
getAliases in interface IApplication
Returns:
application aliases in an unmodifiable collection

hasAlias

public boolean hasAlias(String name)
Specified by:
hasAlias in interface IApplication

removeAlias

public void removeAlias(String alias)
                 throws OpenShiftException
Description copied from interface: IApplication
Remove application alias

Specified by:
removeAlias in interface IApplication
Throws:
OpenShiftException

getGitUrl

public String getGitUrl()
Description copied from interface: IApplication
Returns the uri at which the git repository of this application may be reached at.

Specified by:
getGitUrl in interface IApplication
Returns:
the uri of the git repo of this application.

getInitialGitUrl

public String getInitialGitUrl()
Description copied from interface: IApplication
Returns the git url that the application will get its initial code and configuration from.

Specified by:
getInitialGitUrl in interface IApplication
Returns:
the initial git url

getSshUrl

public String getSshUrl()
Description copied from interface: IApplication
Returns the url to use to connect with ssh.

Specified by:
getSshUrl in interface IApplication
Returns:
the sshUrl

getApplicationUrl

public String getApplicationUrl()
Description copied from interface: IApplication
Returns the url at which this application may be reached at.

Specified by:
getApplicationUrl in interface IApplication
Returns:
the url of this application.

addEmbeddableCartridge

public IEmbeddedCartridge addEmbeddableCartridge(IEmbeddableCartridge cartridge)
                                          throws OpenShiftException
Adds the given embedded cartridge to this application.

Specified by:
addEmbeddableCartridge in interface IApplication
Parameters:
cartridge - the embeddable cartridge that shall be added to this application
Throws:
OpenShiftException

addEmbeddableCartridges

public List<IEmbeddedCartridge> addEmbeddableCartridges(Collection<IEmbeddableCartridge> cartridges)
                                                 throws OpenShiftException
Description copied from interface: IApplication
Adds all given embedded cartridges from this app, given their names.

Specified by:
addEmbeddableCartridges in interface IApplication
Throws:
OpenShiftException
See Also:
#addEmbeddableCartridge(IEmbeddedCartridge), #removeEmbeddedCartridge(IEmbeddedCartridge)

removeEmbeddedCartridge

protected void removeEmbeddedCartridge(IEmbeddedCartridge embeddedCartridge)
                                throws OpenShiftException
"callback" from the embeddedCartridge once it has been destroyed.

Parameters:
embeddedCartridge -
Throws:
OpenShiftException

refreshEmbeddedCartridges

protected void refreshEmbeddedCartridges()
                                  throws OpenShiftException
Queries the backend to list the embedded cartridges and adds the new ones & update the ones that are already present

Throws:
OpenShiftException

getEmbeddedCartridges

public List<IEmbeddedCartridge> getEmbeddedCartridges()
                                               throws OpenShiftException
Description copied from interface: IApplication
Returns all embedded cartridges.

Specified by:
getEmbeddedCartridges in interface IApplication
Returns:
all embedded cartridges.
Throws:
OpenShiftException
See Also:
IEmbeddedCartridge, #addEmbeddableCartridge(IEmbeddedCartridge), #removeEmbeddedCartridge(IEmbeddedCartridge)

hasEmbeddedCartridge

public boolean hasEmbeddedCartridge(String cartridgeName)
                             throws OpenShiftException
Description copied from interface: IApplication
Returns true if this application has an embedded cartridge. Returns false otherwise.

Specified by:
hasEmbeddedCartridge in interface IApplication
Returns:
true if there's an embedded cartridge with the given name
Throws:
OpenShiftException
See Also:
IEmbeddedCartridge, #addEmbeddableCartridge(IEmbeddedCartridge), #removeEmbeddedCartridge(IEmbeddedCartridge)

hasEmbeddedCartridge

public boolean hasEmbeddedCartridge(IEmbeddableCartridge cartridge)
                             throws OpenShiftException
Description copied from interface: IApplication
Returns true if this application has an embedded cartridge. Returns false otherwise.

Specified by:
hasEmbeddedCartridge in interface IApplication
Returns:
true if there's an embedded cartridge with the given name
Throws:
OpenShiftException
See Also:
IEmbeddedCartridge, #addEmbeddableCartridge(IEmbeddedCartridge), #removeEmbeddedCartridge(IEmbeddedCartridge)

getEmbeddedCartridge

public IEmbeddedCartridge getEmbeddedCartridge(IEmbeddableCartridge cartridge)
                                        throws OpenShiftException
Description copied from interface: IApplication
Returns the embedded cartridge in this application. Returns null if none was found.

Specified by:
getEmbeddedCartridge in interface IApplication
Returns:
the embedded cartridge
Throws:
OpenShiftException

getEmbeddedCartridge

public IEmbeddedCartridge getEmbeddedCartridge(String cartridgeName)
                                        throws OpenShiftException
Description copied from interface: IApplication
Returns the embedded cartridge given its name. Returns null if none was found.

Specified by:
getEmbeddedCartridge in interface IApplication
Returns:
the embedded cartridge with the given name
Throws:
OpenShiftException

removeEmbeddedCartridge

public void removeEmbeddedCartridge(IEmbeddableCartridge cartridge)
                             throws OpenShiftException
Description copied from interface: IApplication
Removes the given embedded cartridge that is equal to the given embeddable cartridge. Does nothing if the cartridge is not present in this application.

Specified by:
removeEmbeddedCartridge in interface IApplication
Parameters:
cartridge - the cartridge that shall be removed
Throws:
OpenShiftException

removeEmbeddedCartridges

public void removeEmbeddedCartridges(Collection<IEmbeddableCartridge> cartridges)
                              throws OpenShiftException
Description copied from interface: IApplication
Removes the given embedded cartridges in this application that are equal to the given IEmbeddableCartridge. Does nothing if the cartridge is not present in this application.

Specified by:
removeEmbeddedCartridges in interface IApplication
Parameters:
cartridges - the cartridges that shall get removed
Throws:
OpenShiftException

getGearGroups

public Collection<IGearGroup> getGearGroups()
                                     throws OpenShiftException
Description copied from interface: IApplication
Returns the gear groups for this application. The collection is never cached, so each call will trigger a request to the OpenShift Broker.

Specified by:
getGearGroups in interface IApplication
Returns:
the collection of IGearGroup for this application.
Throws:
OpenShiftException

waitForAccessible

public boolean waitForAccessible(long timeout)
                          throws OpenShiftException
Description copied from interface: IApplication
Waits for this application to become accessible on its public url.

Specified by:
waitForAccessible in interface IApplication
Returns:
Throws:
OpenShiftException
See Also:
IApplication.getApplicationUrl()

waitForAccessibleAsync

public Future<Boolean> waitForAccessibleAsync(long timeout)
                                       throws OpenShiftException
Description copied from interface: IApplication
Returns a Future that the caller can use to wait for the application to become accessible on its public url.

Specified by:
waitForAccessibleAsync in interface IApplication
Returns:
Throws:
OpenShiftException
See Also:
IApplication.getApplicationUrl(), IApplication.waitForAccessible(long), IOpenShiftConnection.getExecutorService(), Future

getConnection

protected IOpenShiftConnection getConnection()

canResolv

protected boolean canResolv(String url)
                     throws MalformedURLException
Throws:
MalformedURLException

refresh

public void refresh()
             throws OpenShiftException
Description copied from interface: IApplication
Refresh the application but reloading its content from OpenShift. At the same time, this operation automatically set the embedded cartridges back to an 'unloaded' state.

Specified by:
refresh in interface IApplication
Specified by:
refresh in interface IOpenShiftResource
Throws:
OpenShiftException

setSSHSession

public void setSSHSession(com.jcraft.jsch.Session session)
Description copied from interface: IApplication
Sets the SSH session that this application will use to connect to OpenShift to perform some operations. This SSH session must be initialized out of the library, since the user's SSH settings may depend on the runtime environment (Eclipse, etc.).

Specified by:
setSSHSession in interface IApplication
Parameters:
session - the SSH session

getSSHSession

public com.jcraft.jsch.Session getSSHSession()
Description copied from interface: IApplication
Returns the SSH session that this application uses to connect to OpenShift.

Specified by:
getSSHSession in interface IApplication
Returns:
the SSH session that this application uses to connect to OpenShift.

hasSSHSession

public boolean hasSSHSession()
Description copied from interface: IApplication
Returns true if the application was already provided with an SSH session, and this session is still valid (connected).

Specified by:
hasSSHSession in interface IApplication
Returns:
true if the application was already provided with an SSH session, and this session is still valid (connected).

isPortFowardingStarted

public boolean isPortFowardingStarted()
                               throws OpenShiftSSHOperationException
Description copied from interface: IApplication
Returns true if the port-forwarding has been started, false otherwise.

Specified by:
isPortFowardingStarted in interface IApplication
Returns:
true if the port-forwarding has been started, false otherwise.
Throws:
OpenShiftSSHOperationException

refreshForwardablePorts

public List<IApplicationPortForwarding> refreshForwardablePorts()
                                                         throws OpenShiftSSHOperationException
Description copied from interface: IApplication
Refreshes the list of port-forwarding. Started ones are kept as-is.

Specified by:
refreshForwardablePorts in interface IApplication
Returns:
the list of forwardable ports on OpenShift for this application.
Throws:
OpenShiftSSHOperationException

getForwardablePorts

public List<IApplicationPortForwarding> getForwardablePorts()
                                                     throws OpenShiftSSHOperationException
Description copied from interface: IApplication
Returns the list of forwardable ports on OpenShift for this application.

Specified by:
getForwardablePorts in interface IApplication
Returns:
the list of forwardable ports on OpenShift for this application.
Throws:
OpenShiftSSHOperationException

getEnvironmentProperties

public List<String> getEnvironmentProperties()
                                      throws OpenShiftSSHOperationException
Description copied from interface: IApplication
Retrieves the list of environment properties.

Specified by:
getEnvironmentProperties in interface IApplication
Returns:
the list of environment properties.
Throws:
OpenShiftSSHOperationException

getEnvironmentVariables

public Map<String,IEnvironmentVariable> getEnvironmentVariables()
                                                         throws OpenShiftException
Description copied from interface: IApplication
Retrieves the map of environment variables

Specified by:
getEnvironmentVariables in interface IApplication
Returns:
the Map of environment variables
Throws:
OpenShiftSSHOperationException
OpenShiftException

getOrLoadEnvironmentVariables

protected Map<String,IEnvironmentVariable> getOrLoadEnvironmentVariables()
                                                                  throws OpenShiftException
Throws:
OpenShiftException

addEnvironmentVariable

public IEnvironmentVariable addEnvironmentVariable(String name,
                                                   String value)
                                            throws OpenShiftException
Description copied from interface: IApplication
Adds an environment variable to this application.

Specified by:
addEnvironmentVariable in interface IApplication
Parameters:
name - key associated with the variable to add
value - value of the new variable
Throws:
OpenShiftSSHOperationException - - if the variable already exists
OpenShiftException

addEnvironmentVariables

public Map<String,IEnvironmentVariable> addEnvironmentVariables(Map<String,String> environmentVariables)
                                                         throws OpenShiftException
Description copied from interface: IApplication
Adds a map of environment variables to the application

Specified by:
addEnvironmentVariables in interface IApplication
Parameters:
environmentVariables - Map of environment variables
Throws:
OpenShiftSSHOperationException
OpenShiftException

removeEnvironmentVariable

public void removeEnvironmentVariable(String targetName)
Description copied from interface: IApplication
Removes the environment variables with the given name from this application.

Specified by:
removeEnvironmentVariable in interface IApplication
Parameters:
targetName - key associated with the IEnvironmentVariable to be removed

removeEnvironmentVariable

public void removeEnvironmentVariable(IEnvironmentVariable environmentVariable)
Description copied from interface: IApplication
Removes the environment variables with the given name from this application.

Specified by:
removeEnvironmentVariable in interface IApplication
Parameters:
environmentVariable - IEnvironmentVariable instance which should be removed

hasEnvironmentVariable

public boolean hasEnvironmentVariable(String name)
                               throws OpenShiftException
Description copied from interface: IApplication
Checks if the environment variable is present in the application.

Specified by:
hasEnvironmentVariable in interface IApplication
Parameters:
name - Name of the environment variable
Returns:
true if the current instance has IEnvironmentVariables to return
false if the current instance has no IEnvironmentVariables to return
Throws:
OpenShiftSSHOperationException
OpenShiftException

updateEnvironmentVariables

protected void updateEnvironmentVariables()
                                   throws OpenShiftException
Throws:
OpenShiftException

getEnvironmentVariable

public IEnvironmentVariable getEnvironmentVariable(String name)
Description copied from interface: IApplication
Return the environment variable for the specified name

Specified by:
getEnvironmentVariable in interface IApplication
Parameters:
name - key to be used to locate the environment variable
Returns:
IEnvironmentVariable associated with the provided key

canGetEnvironmentVariables

public boolean canGetEnvironmentVariables()
Description copied from interface: IApplication
Used to determine if environment variables exist and are available to be retrieved

Specified by:
canGetEnvironmentVariables in interface IApplication
Returns:
Returns true if this application can list its environment variables.
Returns false if it cannot. Internally this translates to the presence of the link to list environment variables.
See Also:
#getEnvironmentVariablesMap(), IApplication.getEnvironmentVariable(String), LINK_LIST_ENVIRONMENT_VARIABLES

canUpdateEnvironmentVariables

public boolean canUpdateEnvironmentVariables()
Description copied from interface: IApplication
Used to determine if the current instance is able to update environment variables.

Specified by:
canUpdateEnvironmentVariables in interface IApplication
Returns:
Returns true if this application can augment its environment variables.
Returns false if it cannot.
See Also:
IApplication.addEnvironmentVariable(String, String), IApplication.addEnvironmentVariables(Map), LINK_SET_UNSET_ENVIRONMENT_VARIABLES

sshExecCmd

protected List<String> sshExecCmd(String command,
                                  ApplicationResource.SshStreams sshStream)
                           throws OpenShiftSSHOperationException
Parameters:
command -
Returns:
Throws:
OpenShiftSSHOperationException

startPortForwarding

public List<IApplicationPortForwarding> startPortForwarding()
                                                     throws OpenShiftSSHOperationException
Specified by:
startPortForwarding in interface IApplication
Returns:
the list of forwardable ports on OpenShift for this application.
Throws:
OpenShiftSSHOperationException

stopPortForwarding

public List<IApplicationPortForwarding> stopPortForwarding()
                                                    throws OpenShiftSSHOperationException
Description copied from interface: IApplication
Stop the port-forwarding for all ports.

Specified by:
stopPortForwarding in interface IApplication
Returns:
the list of forwardable ports on OpenShift for this application.
Throws:
OpenShiftSSHOperationException

update

protected void update(ApplicationResourceDTO dto)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object object)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

OpenShift Java Client 2.5.0.Final

Copyright © 2014 JBoss, a division of Red Hat, Inc.. All Rights Reserved.