OpenShift Java Client 2.5.0.Final

com.openshift.internal.client
Class APIResource

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

public class APIResource
extends AbstractOpenShiftResource
implements IOpenShiftConnection

Author:
Andre Dietisheim, Xavier Coulon

Nested Class Summary
 
Nested classes/interfaces inherited from class com.openshift.internal.client.AbstractOpenShiftResource
AbstractOpenShiftResource.Parameters, AbstractOpenShiftResource.ServiceRequest
 
Constructor Summary
protected APIResource(String login, String password, IRestService service, Map<String,Link> links)
           
 
Method Summary
 IDomain createDomain(String id)
           
 void disconnect()
           
 IDomain getDefaultDomain()
           
 IDomain getDomain(String id)
           
 List<IDomain> getDomains()
          Returns the domains associated with the current OpenShift connection.
 List<IEmbeddableCartridge> getEmbeddableCartridges()
          Returns the available embeddable cartridges associated with the current OpenShift connection.
 ExecutorService getExecutorService()
          Returns the executor service instance that's available in this connection.
protected  String getLogin()
           
protected  String getPassword()
           
 String getServer()
          Returns the server this connection is bound to.
 List<IStandaloneCartridge> getStandaloneCartridges()
          Returns the available standalone cartridges associated with the current OpenShift connection.
 IUser getUser()
          Returns the user associated with the current OpenShift connection.
protected  boolean hasDomain(String name)
           
 void refresh()
          Refresh the resource and its list of children resources that were previously loaded
protected  void removeDomain(IDomain domain)
          Called after a domain has been destroyed
 void setEnableSSLCertChecks(boolean doSSLChecks)
          Sets flag for enabling SSL certificate checks (i.e.
 void setProxyHost(String proxyHost)
          Sets the HTTP proxy hostname
 void setProxyPort(String proxyPort)
          Sets the HTTP proxy port
 void setProxySet(boolean proxySet)
          Sets flag for using an HTTP proxy
 
Methods inherited from class com.openshift.internal.client.AbstractOpenShiftResource
getCreationLog, getLink, getMessages, hasCreationLog, setLinks
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

APIResource

protected APIResource(String login,
                      String password,
                      IRestService service,
                      Map<String,Link> links)
Method Detail

getLogin

protected final String getLogin()

getPassword

protected final String getPassword()

getServer

public String getServer()
Description copied from interface: IOpenShiftConnection
Returns the server this connection is bound to.

Specified by:
getServer in interface IOpenShiftConnection
Returns:
the server

setEnableSSLCertChecks

public void setEnableSSLCertChecks(boolean doSSLChecks)
Description copied from interface: IOpenShiftConnection
Sets flag for enabling SSL certificate checks (i.e. self-signed SSL certificates)

Specified by:
setEnableSSLCertChecks in interface IOpenShiftConnection

setProxySet

public void setProxySet(boolean proxySet)
Description copied from interface: IOpenShiftConnection
Sets flag for using an HTTP proxy

Specified by:
setProxySet in interface IOpenShiftConnection

setProxyHost

public void setProxyHost(String proxyHost)
Description copied from interface: IOpenShiftConnection
Sets the HTTP proxy hostname

Specified by:
setProxyHost in interface IOpenShiftConnection

setProxyPort

public void setProxyPort(String proxyPort)
Description copied from interface: IOpenShiftConnection
Sets the HTTP proxy port

Specified by:
setProxyPort in interface IOpenShiftConnection

getUser

public IUser getUser()
              throws OpenShiftException
Description copied from interface: IOpenShiftConnection
Returns the user associated with the current OpenShift connection.

Specified by:
getUser in interface IOpenShiftConnection
Returns:
the user
Throws:
OpenShiftException

getDomains

public List<IDomain> getDomains()
                         throws OpenShiftException
Description copied from interface: IOpenShiftConnection
Returns the domains associated with the current OpenShift connection.

Specified by:
getDomains in interface IOpenShiftConnection
Returns:
the domains
Throws:
OpenShiftException

getDomain

public IDomain getDomain(String id)
                  throws OpenShiftException
Throws:
OpenShiftException

getDefaultDomain

public IDomain getDefaultDomain()

createDomain

public IDomain createDomain(String id)
                     throws OpenShiftException
Throws:
OpenShiftException

getStandaloneCartridges

public List<IStandaloneCartridge> getStandaloneCartridges()
                                                   throws OpenShiftException
Description copied from interface: IOpenShiftConnection
Returns the available standalone cartridges associated with the current OpenShift connection.

Specified by:
getStandaloneCartridges in interface IOpenShiftConnection
Returns:
the available standalone cartridges
Throws:
OpenShiftException

getEmbeddableCartridges

public List<IEmbeddableCartridge> getEmbeddableCartridges()
                                                   throws OpenShiftException
Description copied from interface: IOpenShiftConnection
Returns the available embeddable cartridges associated with the current OpenShift connection.

Specified by:
getEmbeddableCartridges in interface IOpenShiftConnection
Returns:
the available embeddable cartridges
Throws:
OpenShiftException

refresh

public void refresh()
             throws OpenShiftException
Description copied from interface: IOpenShiftResource
Refresh the resource and its list of children resources that were previously loaded

Specified by:
refresh in interface IOpenShiftResource
Throws:
OpenShiftException

removeDomain

protected void removeDomain(IDomain domain)
Called after a domain has been destroyed

Parameters:
domain - the domain to remove from the API's domains list.

hasDomain

protected boolean hasDomain(String name)
                     throws OpenShiftException
Throws:
OpenShiftException

getExecutorService

public ExecutorService getExecutorService()
Description copied from interface: IOpenShiftConnection
Returns the executor service instance that's available in this connection.

Specified by:
getExecutorService in interface IOpenShiftConnection
Returns:
the executor service instance for this connection
See Also:
ExecutorService, Executors

disconnect

public void disconnect()

OpenShift Java Client 2.5.0.Final

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