public class CommandCenterImpl extends Object implements CommandCenter
CommandCenter,
CommandCenterFactory| Constructor and Description |
|---|
CommandCenterImpl(String url,
String username,
String password,
boolean verbose) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addGroupChild(String groupName,
String childGroupName) |
boolean |
addServersToGroup(String groupName,
Collection<String> serverIds) |
boolean |
cancelUpdate(Long updateId)
Cancels manual update by id.
|
boolean |
checkPrimaryAlive() |
DiffResult |
compare(String applicationId,
String fromVersionId,
String toVersionId,
boolean full)
Compares two versions of the given application.
|
int |
countSeats() |
boolean |
createGroup(String name,
String description,
Collection<String> serverIds) |
int |
deleteAllLicenses() |
boolean |
deleteGroup(String name) |
void |
deploy(String applicationId,
String versionId,
String ctxPath,
Collection<String> servers) |
void |
deploy(String applicationId,
String versionId,
String ctxPath,
Collection<String> servers,
Collection<String> groups) |
void |
deploy(String applicationId,
String versionId,
String ctxPath,
Collection<String> servers,
Collection<String> groups,
String virtualHostName)
Deploy application to specified servers.
|
void |
deploy(String applicationId,
String versionId,
String ctxPath,
Collection<String> servers,
Collection<String> groups,
String virtualHostName,
boolean disableScripts,
File scriptDescriptionFile) |
void |
deploy(String applicationId,
String versionId,
String ctxPath,
Collection<String> servers,
Collection<String> groups,
String virtualHostName,
boolean disableScripts,
File scriptDescriptionFile,
File scriptEntriesArchive) |
ApplicationInfo |
enableNinjaMode(String serverId,
String appId)
Enables inplace edit mode (ninja) for given application on a given server
|
List<ServerInfo> |
expandGroup(String groupName) |
ApplicationInfo |
finishEditMode(String serverId,
String appId,
String verId)
Finishes in-place edit mode on given server for given application.
|
ApplicationInfo |
finishNinjaUpdate(String serverId,
String appId,
String verId)
Finishes inplace edit (ninja) update on given server for given application.
|
ApplicationInfo |
getApplication(String applicationId)
Returns current info about an application.
|
Map<String,ApplicationInfo> |
getApplications()
Lists all applications.
|
CommandCenterUpdate |
getCommandCenterUpdate() |
List<ServerGroup> |
getGroups(String name) |
Date |
getLastFailoverSyncTime()
Returns date of last time when this servers synced with failover server.
|
String |
getMetadata(String appId,
String versionId) |
PausedUpdate |
getPausedUpdate(Long id)
Returns a paused update by its Id.
|
List<Long> |
getRunningPausedUpdateIds() |
ServerInfo |
getServer(String serverId)
Returns current info about a server.
|
Map<String,ServerInfo> |
getServers()
Lists all servers.
|
boolean |
getVerbose() |
String |
getVersion() |
boolean |
isAlive() |
boolean |
registerAsFailover(String primaryHost,
int primaryPort,
String token)
Returns true is registration was OK.
|
void |
remove(String appId)
Removes app from command center.
|
boolean |
removeGroupChild(String groupName,
String childGroupName) |
void |
removeServer(String serverId)
Removes a server.
|
boolean |
removeServersFromGroup(String groupName,
Collection<String> serverIds) |
void |
removeVersion(String appId,
String versionId)
Removes application version from command center.
|
boolean |
resumeUpdate(Long updateId)
Resumes manual update by id.
|
ApplicationInfo |
startEditMode(String serverId,
String appId)
Enables in-place edit mode for given application on a given server
|
void |
syncWithFailover()
If this server has failover slave - this will schedule synchronizing in 3s.
|
void |
undeploy(String applicationId,
Collection<String> servers)
Undeploy application from specified servers.
|
void |
undeploy(String applicationId,
Collection<String> servers,
Collection<String> groups)
Undeploy application from specified servers.
|
void |
undeploy(String applicationId,
Collection<String> servers,
Collection<String> groups,
boolean disableScripts,
File scriptDescriptionFile)
file and archive type scripts are expected to be in the local filesystem
|
void |
undeploy(String applicationId,
Collection<String> servers,
Collection<String> groups,
boolean disableScripts,
File scriptDescriptionFile,
File scriptEntriesArchive) |
ConfigurableUpdate |
update(String applicationId,
String versionId)
Start updating an application to a given version.
|
AgentUpdate |
updateAgent() |
UploadInfo |
upload(File file)
Uploads new version of an application.
|
UploadInfo |
upload(String applicationId,
String fromVersion,
File diff)
Uploads new version of an application.
|
boolean |
uploadLicense(File license) |
boolean |
uploadMetadata(File file,
String appId,
String versionId) |
public boolean isAlive()
isAlive in interface CommandCentertrue if the Command Center is alive.public Map<String,ServerInfo> getServers()
CommandCentergetServers in interface CommandCenterpublic ServerInfo getServer(String serverId)
CommandCentergetServer in interface CommandCenterserverId - server Id.public void removeServer(String serverId)
CommandCenterremoveServer in interface CommandCenterserverId - server Id.public Map<String,ApplicationInfo> getApplications()
CommandCentergetApplications in interface CommandCenterpublic ApplicationInfo getApplication(String applicationId)
CommandCentergetApplication in interface CommandCenterapplicationId - application Id.public UploadInfo upload(File file)
CommandCenterupload in interface CommandCenterfile - archive file.public DiffResult compare(String applicationId, String fromVersionId, String toVersionId, boolean full)
CommandCentercompare in interface CommandCenterapplicationId - application Id.fromVersionId - current version Id.toVersionId - new version Id.full - include all differences (otherwise only warnings and errors are included).public ConfigurableUpdate update(String applicationId, String versionId)
CommandCenterupdate in interface CommandCenterapplicationId - application Id.versionId - version Id.public PausedUpdate getPausedUpdate(Long id)
CommandCentergetPausedUpdate in interface CommandCenterid - update Id.null if no such update found.PreparedPausableUpdate.executeWithPause()public boolean registerAsFailover(String primaryHost, int primaryPort, String token)
CommandCenterregisterAsFailover in interface CommandCenterprimaryHost - - primary server hostprimaryPort - - primary server porttoken - - primary server user auth-token that will be used for initial authenticationpublic void syncWithFailover()
CommandCentersyncWithFailover in interface CommandCenterpublic boolean checkPrimaryAlive()
checkPrimaryAlive in interface CommandCenterpublic boolean getVerbose()
getVerbose in interface CommandCenterpublic void deploy(String applicationId, String versionId, String ctxPath, Collection<String> servers)
deploy in interface CommandCenterCommandCenter.deploy(String, String, String, Collection, Collection, String)public void deploy(String applicationId, String versionId, String ctxPath, Collection<String> servers, Collection<String> groups)
deploy in interface CommandCenterCommandCenter.deploy(String, String, String, Collection, Collection, String)public void deploy(String applicationId, String versionId, String ctxPath, Collection<String> servers, Collection<String> groups, String virtualHostName)
CommandCenterdeploy in interface CommandCenterapplicationId - - application idctxPath - - context path for serversservers - - server jvmid-svirtualHostName - - name of the virtual host to be used for deployingpublic void deploy(String applicationId, String versionId, String ctxPath, Collection<String> servers, Collection<String> groups, String virtualHostName, boolean disableScripts, File scriptDescriptionFile)
deploy in interface CommandCenterCommandCenter.deploy(String, String, String, Collection, Collection, String)public void deploy(String applicationId, String versionId, String ctxPath, Collection<String> servers, Collection<String> groups, String virtualHostName, boolean disableScripts, File scriptDescriptionFile, File scriptEntriesArchive)
deploy in interface CommandCenterCommandCenter.deploy(String, String, String, Collection, Collection, String)public void undeploy(String applicationId, Collection<String> servers)
CommandCenterundeploy in interface CommandCenterapplicationId - - application idservers - - server jvmid-spublic void undeploy(String applicationId, Collection<String> servers, Collection<String> groups)
CommandCenterundeploy in interface CommandCenterapplicationId - - application idservers - - server jvmid-spublic void undeploy(String applicationId, Collection<String> servers, Collection<String> groups, boolean disableScripts, File scriptDescriptionFile)
CommandCenterundeploy in interface CommandCenterpublic void undeploy(String applicationId, Collection<String> servers, Collection<String> groups, boolean disableScripts, File scriptDescriptionFile, File scriptEntriesArchive)
undeploy in interface CommandCenterpublic void remove(String appId)
CommandCenterremove in interface CommandCenterpublic void removeVersion(String appId, String versionId)
CommandCenterremoveVersion in interface CommandCenterpublic Date getLastFailoverSyncTime()
CommandCentergetLastFailoverSyncTime in interface CommandCenterpublic boolean resumeUpdate(Long updateId)
CommandCenterresumeUpdate in interface CommandCenterpublic boolean cancelUpdate(Long updateId)
CommandCentercancelUpdate in interface CommandCenterpublic List<Long> getRunningPausedUpdateIds()
getRunningPausedUpdateIds in interface CommandCenterpublic UploadInfo upload(String applicationId, String fromVersion, File diff) throws DuplicationException
CommandCenterupload in interface CommandCenterapplicationId - - application identificatorfromVersion - - version on which this diff is basedDuplicationException - if the given version already exists on the server.public ApplicationInfo startEditMode(String serverId, String appId)
CommandCenterstartEditMode in interface CommandCenterpublic ApplicationInfo finishEditMode(String serverId, String appId, String verId)
CommandCenterfinishEditMode in interface CommandCenterpublic ApplicationInfo enableNinjaMode(String serverId, String appId)
CommandCenterenableNinjaMode in interface CommandCenterpublic ApplicationInfo finishNinjaUpdate(String serverId, String appId, String verId)
CommandCenterfinishNinjaUpdate in interface CommandCenterpublic int countSeats()
countSeats in interface CommandCenterpublic boolean uploadLicense(File license)
uploadLicense in interface CommandCenterpublic int deleteAllLicenses()
deleteAllLicenses in interface CommandCenterpublic boolean createGroup(String name, String description, Collection<String> serverIds)
createGroup in interface CommandCenterpublic boolean addServersToGroup(String groupName, Collection<String> serverIds)
addServersToGroup in interface CommandCenterpublic boolean removeServersFromGroup(String groupName, Collection<String> serverIds)
removeServersFromGroup in interface CommandCenterpublic List<ServerGroup> getGroups(String name)
getGroups in interface CommandCenterpublic List<ServerInfo> expandGroup(String groupName)
expandGroup in interface CommandCenterpublic boolean deleteGroup(String name)
deleteGroup in interface CommandCenterpublic boolean addGroupChild(String groupName, String childGroupName)
addGroupChild in interface CommandCenterpublic boolean removeGroupChild(String groupName, String childGroupName)
removeGroupChild in interface CommandCenterpublic CommandCenterUpdate getCommandCenterUpdate()
getCommandCenterUpdate in interface CommandCenterpublic AgentUpdate updateAgent()
updateAgent in interface CommandCenterpublic boolean uploadMetadata(File file, String appId, String versionId)
uploadMetadata in interface CommandCenterpublic String getMetadata(String appId, String versionId)
getMetadata in interface CommandCenterpublic String getVersion()
getVersion in interface CommandCenterCopyright © 2012. All Rights Reserved.