|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CloudFoundryOperations
The interface defining operations making up the Cloud Foundry Java client's API.
Method Summary | |
---|---|
void |
addDomain(String domainName)
Add domain to the current space of this session. |
void |
addRoute(String host,
String domainName)
Register a new route to the space of the current session. |
void |
bindService(String appName,
String serviceName)
Associate (provision) a service with an application. |
void |
createApplication(String appName,
Staging staging,
int memory,
List<String> uris,
List<String> serviceNames)
Create application. |
void |
createService(CloudService service)
Create a service. |
void |
debugApplication(String appName,
CloudApplication.DebugMode mode)
Debug application. |
void |
deleteAllApplications()
Delete all applications. |
void |
deleteAllServices()
Delete all services. |
void |
deleteApplication(String appName)
Delete application. |
void |
deleteDomain(String domainName)
Delete a domain registered to the current organization of this session. |
void |
deleteRoute(String host,
String domainName)
Delete a registered route from the space of the current session. |
void |
deleteService(String service)
Delete cloud service. |
CloudApplication |
getApplication(String appName)
Get cloud application with the specified name. |
InstancesInfo |
getApplicationInstances(CloudApplication app)
Get application instances info for application. |
InstancesInfo |
getApplicationInstances(String appName)
Get application instances info for application. |
int[] |
getApplicationMemoryChoices()
Get choices for application memory quota. |
List<CloudApplication> |
getApplications()
Get all cloud applications. |
ApplicationStats |
getApplicationStats(String appName)
Get application stats for the app with the specified name. |
URL |
getCloudControllerUrl()
Get the URL used for the cloud controller. |
CloudInfo |
getCloudInfo()
Get CloudInfo for the current cloud. |
CrashesInfo |
getCrashes(String appName)
Get crashes info for application. |
Map<String,String> |
getCrashLogs(String appName)
Get logs from most recent crash of the deployed application. |
List<CloudDomain> |
getDomains()
Get list of all domain registered for the given space. |
List<CloudDomain> |
getDomainsForOrg()
Get list of all domain registered for the current organization of this session. |
String |
getFile(String appName,
int instanceIndex,
String filePath)
Get file from the deployed application. |
String |
getFile(String appName,
int instanceIndex,
String filePath,
int startPosition)
Get a the content, starting at a specific position, of a file from the deployed application. |
String |
getFile(String appName,
int instanceIndex,
String filePath,
int startPosition,
int endPosition)
Get a range of content of a file from the deployed application. |
String |
getFileTail(String appName,
int instanceIndex,
String filePath,
int length)
Get a the last bytes, with length as specified, of content of a file from the deployed application. |
Map<String,String> |
getLogs(String appName)
Get logs from the deployed application. |
List<CloudOrganization> |
getOrganizations()
Get list of CloudOrganizations for the current cloud. |
List<CloudRoute> |
getRoutes(String domainName)
Get the info for all routes for a domain belonging to the current space of this session. |
CloudService |
getService(String service)
Get cloud service. |
List<CloudServiceOffering> |
getServiceOfferings()
Get all service offerings. |
List<CloudService> |
getServices()
Get list of cloud services. |
List<CloudSpace> |
getSpaces()
Get list of CloudSpaces for the current cloud. |
String |
getStagingLogs(StartingInfo info,
int offset)
Get the staging log while an application is starting. |
org.springframework.security.oauth2.common.OAuth2AccessToken |
login()
Login using the credentials already set for the client. |
void |
logout()
Logout closing the current session. |
void |
register(String email,
String password)
Register new user account with the provided credentials. |
void |
registerRestLogListener(RestLogCallback callBack)
Register a new RestLogCallback |
void |
removeDomain(String domainName)
Remove a domain from the space of the current session. |
void |
rename(String appName,
String newName)
Rename an application. |
StartingInfo |
restartApplication(String appName)
Restart application. |
void |
setResponseErrorHandler(org.springframework.web.client.ResponseErrorHandler errorHandler)
Override the default REST response error handler with a custom error handler. |
StartingInfo |
startApplication(String appName)
Start application. |
void |
stopApplication(String appName)
Stop application. |
void |
unbindService(String appName,
String serviceName)
Un-associate (unprovision) a service from an application. |
void |
unregister()
Unregister and log out the currently logged in user |
void |
unRegisterRestLogListener(RestLogCallback callBack)
Un-register a RestLogCallback |
void |
updateApplicationEnv(String appName,
List<String> env)
Update application env using a list of strings each with one environment setting. |
void |
updateApplicationEnv(String appName,
Map<String,String> env)
Update application env using a map where the key specifies the name of the environment variable and the value the value of the environment variable.. |
void |
updateApplicationInstances(String appName,
int instances)
Update application instances. |
void |
updateApplicationMemory(String appName,
int memory)
Update application memory. |
void |
updateApplicationServices(String appName,
List<String> services)
Update application services. |
void |
updateApplicationStaging(String appName,
Staging staging)
Update application staging information. |
void |
updateApplicationUris(String appName,
List<String> uris)
Update application URIs. |
void |
updateHttpProxyConfiguration(HttpProxyConfiguration httpProxyConfiguration)
Update http proxy configuration settings. |
void |
updatePassword(CloudCredentials credentials,
String newPassword)
Update the password for the logged in user using the username/old_password provided in the credentials. |
void |
updatePassword(String newPassword)
Update the password for the logged in user. |
void |
uploadApplication(String appName,
ApplicationArchive archive)
Upload an application to cloud foundry. |
void |
uploadApplication(String appName,
ApplicationArchive archive,
UploadStatusCallback callback)
Upload an application to cloud foundry. |
void |
uploadApplication(String appName,
File file)
Upload an application to cloud foundry. |
void |
uploadApplication(String appName,
File file,
UploadStatusCallback callback)
Upload an application to cloud foundry. |
void |
uploadApplication(String appName,
String file)
Upload an application. |
Method Detail |
---|
void setResponseErrorHandler(org.springframework.web.client.ResponseErrorHandler errorHandler)
errorHandler
- URL getCloudControllerUrl()
CloudInfo getCloudInfo()
List<CloudSpace> getSpaces()
List<CloudOrganization> getOrganizations()
void register(String email, String password)
email
- the email accountpassword
- the passwordvoid updatePassword(String newPassword)
newPassword
- the new passwordvoid updatePassword(CloudCredentials credentials, String newPassword)
credentials
- current credentialsnewPassword
- the new passwordvoid unregister()
org.springframework.security.oauth2.common.OAuth2AccessToken login()
void logout()
List<CloudApplication> getApplications()
CloudApplication getApplication(String appName)
appName
- name of the app
ApplicationStats getApplicationStats(String appName)
appName
- name of the app
int[] getApplicationMemoryChoices()
void createApplication(String appName, Staging staging, int memory, List<String> uris, List<String> serviceNames)
appName
- application namestaging
- staging infomemory
- memory to use in MBuris
- list of URIs for the appserviceNames
- list of service names to bind to appvoid createService(CloudService service)
service
- cloud service infovoid uploadApplication(String appName, String file) throws IOException
appName
- application namefile
- path to the application archive or folder
IOException
void uploadApplication(String appName, File file) throws IOException
appName
- the application namefile
- the application archive or folder
IOException
void uploadApplication(String appName, File file, UploadStatusCallback callback) throws IOException
appName
- the application namefile
- the application archivecallback
- a callback interface used to provide progress information or null
IOException
void uploadApplication(String appName, ApplicationArchive archive) throws IOException
appName
- the application namearchive
- the application archive
IOException
void uploadApplication(String appName, ApplicationArchive archive, UploadStatusCallback callback) throws IOException
appName
- the application namearchive
- the application archivecallback
- a callback interface used to provide progress information or null
IOException
StartingInfo startApplication(String appName)
appName
- name of application
void debugApplication(String appName, CloudApplication.DebugMode mode)
appName
- name of applicationmode
- debug mode infovoid stopApplication(String appName)
appName
- name of applicationStartingInfo restartApplication(String appName)
appName
- name of applicationvoid deleteApplication(String appName)
appName
- name of applicationvoid deleteAllApplications()
void deleteAllServices()
void updateApplicationMemory(String appName, int memory)
appName
- name of applicationmemory
- new memory settingvoid updateApplicationInstances(String appName, int instances)
appName
- name of applicationinstances
- number of instances to usevoid updateApplicationServices(String appName, List<String> services)
appName
- name of appplicationservices
- list of services that should be bound to appvoid updateApplicationStaging(String appName, Staging staging)
appName
- name of appplicationstaging
- staging information for the appvoid updateApplicationUris(String appName, List<String> uris)
appName
- name of applicationuris
- list of URIs the app should usevoid updateApplicationEnv(String appName, Map<String,String> env)
appName
- name of applicationenv
- map of environment settingsvoid updateApplicationEnv(String appName, List<String> env)
appName
- name of applicationenv
- list of environment settingsMap<String,String> getLogs(String appName)
appName
- name of the application
Map<String,String> getCrashLogs(String appName)
appName
- name of the application
String getStagingLogs(StartingInfo info, int offset)
info
- starting information containing staging log file URL. Obtained
after starting an application.offset
- starting position from where content should be retrieved.
String getFile(String appName, int instanceIndex, String filePath)
appName
- name of the applicationinstanceIndex
- instance indexfilePath
- path to the file
String getFile(String appName, int instanceIndex, String filePath, int startPosition)
appName
- name of the applicationinstanceIndex
- instance indexfilePath
- path to the filestartPosition
- the starting position of the file contents (inclusive)
String getFile(String appName, int instanceIndex, String filePath, int startPosition, int endPosition)
appName
- name of the applicationinstanceIndex
- instance indexfilePath
- path to the filestartPosition
- the starting position of the file contents (inclusive)endPosition
- the ending position of the file contents (exclusive)
String getFileTail(String appName, int instanceIndex, String filePath, int length)
appName
- name of the applicationinstanceIndex
- instance indexfilePath
- path to the filelength
- the length of the file contents to retrieve
List<CloudService> getServices()
CloudService getService(String service)
service
- name of service
void deleteService(String service)
service
- name of serviceList<CloudServiceOffering> getServiceOfferings()
void bindService(String appName, String serviceName)
appName
- the application nameserviceName
- the service namevoid unbindService(String appName, String serviceName)
appName
- the application nameserviceName
- the service nameInstancesInfo getApplicationInstances(String appName)
appName
- name of application.
InstancesInfo getApplicationInstances(CloudApplication app)
app
- the application.
CrashesInfo getCrashes(String appName)
appName
- name of application
void rename(String appName, String newName)
appName
- the current namenewName
- the new nameList<CloudDomain> getDomainsForOrg()
List<CloudDomain> getDomains()
void addDomain(String domainName)
domainName
- the domain to addvoid removeDomain(String domainName)
domainName
- the domain to deletevoid deleteDomain(String domainName)
domainName
- the domain to deleteList<CloudRoute> getRoutes(String domainName)
domainName
- the domain the routes belong to
void addRoute(String host, String domainName)
host
- the host of the route to registerdomainName
- the domain of the route to registervoid deleteRoute(String host, String domainName)
host
- the host of the route to deletedomainName
- the domain of the route to deletevoid updateHttpProxyConfiguration(HttpProxyConfiguration httpProxyConfiguration)
httpProxyConfiguration
- the new configuration settingsvoid registerRestLogListener(RestLogCallback callBack)
callBack
- the callback to be registeredvoid unRegisterRestLogListener(RestLogCallback callBack)
callBack
- the callback to be un-registered
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |