public interface IApplication extends IOpenShiftResource
Modifier and Type | Method and Description |
---|---|
void |
addAlias(String string)
Add application alias
|
List<IEmbeddedCartridge> |
addEmbeddableCartridge(ICartridgeConstraint cartridgeConstraint)
Adds the embeddable cartridges that match the given constraint.
|
IEmbeddedCartridge |
addEmbeddableCartridge(IEmbeddableCartridge 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.
|
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.
|
ICartridge |
getCartridge()
Returns the cartridge (application type) that this app is running on.
|
String |
getCartridge(String cartridgeName) |
Date |
getCreationTime()
Returns the timestamp at which this app was created.
|
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.
|
Collection<IEmbeddedCartridge> |
getEmbeddedCartridges(ICartridgeConstraint constraint)
Returns the embedded cartridges in this application that match the given cartridge constraint.
|
List<String> |
getEnvironmentProperties()
Retrieves the list of environment properties.
|
List<IApplicationPortForwarding> |
getForwardablePorts()
Returns the list of forwardable ports on OpenShift 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 |
getName()
Returns the name of this application.
|
com.jcraft.jsch.Session |
getSSHSession()
Returns the SSH session that this application uses to connect to
OpenShift.
|
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 |
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.
|
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.
|
void |
removeEmbeddedCartridges(Collection<IEmbeddableCartridge> cartridges)
Removes the given embedded cartridges in this application that are equal to the
given IEmbeddableCartridge.
|
void |
removeEmbeddedCartridges(ICartridgeConstraint cartridgeConstraint)
Removes the embeddable cartridges that match the given constraint.
|
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.
|
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.
|
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, hasCreationLog
String getName()
String getUUID()
String getGitUrl()
String getApplicationUrl()
ApplicationScale getApplicationScale()
IGearProfile getGearProfile()
ICartridge getCartridge()
List<IEmbeddedCartridge> addEmbeddableCartridge(ICartridgeConstraint cartridgeConstraint) throws OpenShiftException
cartridgeConstraint
- the constraint that determines what cartridges shall be addedOpenShiftException
- if no cartridge matches the constraintIEmbeddedCartridge addEmbeddableCartridge(IEmbeddableCartridge cartridge) throws OpenShiftException
cartridge
- OpenShiftException
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
Collection<IEmbeddedCartridge> getEmbeddedCartridges(ICartridgeConstraint constraint) throws OpenShiftException
constraint
- the constraint that the embedded cartridges shall matchOpenShiftException
void removeEmbeddedCartridges(ICartridgeConstraint cartridgeConstraint) throws OpenShiftException
cartridgeConstraint
- the constraint that the cartridge shall matchOpenShiftException
- if no cartridge matches the constraintvoid 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
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
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)
session
- the SSH sessioncom.jcraft.jsch.Session getSSHSession()
boolean hasSSHSession()
boolean isPortFowardingStarted() throws OpenShiftSSHOperationException
OpenShiftSSHOperationException
List<IApplicationPortForwarding> getForwardablePorts() throws OpenShiftSSHOperationException
OpenShiftSSHOperationException
List<IApplicationPortForwarding> startPortForwarding() throws OpenShiftSSHOperationException
com.jcraft.jsch.JSchException
OpenShiftSSHOperationException
List<IApplicationPortForwarding> stopPortForwarding() throws OpenShiftSSHOperationException
OpenShiftSSHOperationException
List<IApplicationPortForwarding> refreshForwardablePorts() throws OpenShiftSSHOperationException
OpenShiftSSHOperationException
List<String> getEnvironmentProperties() throws OpenShiftSSHOperationException
OpenShiftSSHOperationException
String getCartridge(String cartridgeName) throws OpenShiftException
OpenShiftException
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.