|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.zeroturnaround.liverebel.api.impl.CommandCenterImpl
public class CommandCenterImpl
CommandCenter,
CommandCenterFactory| Constructor Summary | |
|---|---|
CommandCenterImpl(String url,
String username,
String password,
boolean verbose)
|
|
| Method Summary | |
|---|---|
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)
|
Long |
deploy(String applicationId,
String versionId,
String ctxPath,
Collection<String> servers)
|
Long |
deploy(String applicationId,
String versionId,
String ctxPath,
Collection<String> servers,
Collection<String> groups)
|
Long |
deploy(String applicationId,
String versionId,
String ctxPath,
Collection<String> servers,
Collection<String> groups,
String virtualHostName)
Deploy application to specified servers. |
Long |
deploy(String applicationId,
String versionId,
String ctxPath,
Collection<String> servers,
Collection<String> groups,
String virtualHostName,
boolean disableScripts,
File scriptDescriptionFile)
|
Long |
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 applicationId)
Enables inplace edit mode (ninja) for given application on a given server |
List<ServerInfo> |
expandGroup(String groupName)
|
ApplicationInfo |
finishEditMode(String serverId,
String applicationId,
String versionId)
Finishes in-place edit mode on given server for given application. |
ApplicationInfo |
finishNinjaUpdate(String serverId,
String applicationId,
String versionId)
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)
|
Collection<InstallerExecution> |
getInstallerExecutions()
|
Date |
getLastFailoverSyncTime()
Returns date of last time when this servers synced with failover server. |
Collection<String> |
getLogLines(Long taskId)
Retrieved the log for given task. |
String |
getMetadata(String applicationId,
String versionId)
Deprecated. |
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. |
String |
getTrace(String applicationId,
String versionId)
|
boolean |
getVerbose()
|
String |
getVersion()
|
boolean |
isAlive()
|
boolean |
registerAsFailover(String primaryHost,
int primaryPort,
String token)
Returns true is registration was OK. |
void |
remove(String applicationId)
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 applicationId,
String versionId)
Removes application version from command center. |
boolean |
restartServer(String serverId)
Restart server (asynchronously) |
boolean |
resumeUpdate(Long updateId)
Resumes manual update by id. |
boolean |
setHotpatchingEnabled(String serverId,
boolean enabled)
Enable/disable hotpatching update for specified server |
ApplicationInfo |
startEditMode(String serverId,
String applicationId)
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. |
Long |
undeploy(String applicationId,
Collection<String> servers)
Undeploy application from specified servers. |
Long |
undeploy(String applicationId,
Collection<String> servers,
Collection<String> groups)
Undeploy application from specified servers. |
Long |
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 |
Long |
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 applicationId,
String versionId)
Deprecated. |
boolean |
uploadTrace(File file,
String applicationId,
String versionId)
|
Upload |
uploadVersion(File file)
Prepares the upload of new version of an application. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CommandCenterImpl(String url,
String username,
String password,
boolean verbose)
| Method Detail |
|---|
public boolean isAlive()
isAlive in interface CommandCentertrue if the Command Center is alive.public Map<String,ServerInfo> getServers()
CommandCenter
getServers in interface CommandCenterpublic ServerInfo getServer(String serverId)
CommandCenter
getServer in interface CommandCenterserverId - server Id.
public boolean restartServer(String serverId)
CommandCenter
restartServer in interface CommandCenterserverId - server id
public boolean setHotpatchingEnabled(String serverId,
boolean enabled)
CommandCenter
setHotpatchingEnabled in interface CommandCenterserverId - server idenabled - true to enable hotpatching, false to disable it
public void removeServer(String serverId)
CommandCenter
removeServer in interface CommandCenterserverId - server Id.public Map<String,ApplicationInfo> getApplications()
CommandCenter
getApplications in interface CommandCenterpublic ApplicationInfo getApplication(String applicationId)
CommandCenter
getApplication in interface CommandCenterapplicationId - application Id.
public UploadInfo upload(File file)
CommandCenter
upload in interface CommandCenterfile - archive file.
public DiffResult compare(String _applicationId,
String _fromVersionId,
String _toVersionId,
boolean full)
CommandCenter
compare in interface CommandCenter_applicationId - 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)
CommandCenter
update in interface CommandCenterapplicationId - application Id.versionId - version Id.public PausedUpdate getPausedUpdate(Long id)
CommandCenter
getPausedUpdate in interface CommandCenterid - update Id.
null if no such update found.PreparedPausableUpdate.executeWithPause()
public boolean registerAsFailover(String primaryHost,
int primaryPort,
String token)
CommandCenter
registerAsFailover in interface CommandCenterprimaryHost - - primary server hostprimaryPort - - primary server porttoken - - primary server user auth-token that will be used for initial authentication
public void syncWithFailover()
CommandCenter
syncWithFailover in interface CommandCenterpublic boolean checkPrimaryAlive()
checkPrimaryAlive in interface CommandCenterpublic boolean getVerbose()
getVerbose in interface CommandCenter
public Long deploy(String applicationId,
String versionId,
String ctxPath,
Collection<String> servers)
deploy in interface CommandCenterCommandCenter.deploy(String, String, String, Collection, Collection, String)
public Long 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 Long deploy(String applicationId,
String versionId,
String ctxPath,
Collection<String> servers,
Collection<String> groups,
String virtualHostName)
CommandCenter
deploy in interface CommandCenterapplicationId - - application idctxPath - - context path for serversservers - - server jvmid-svirtualHostName - - name of the virtual host to be used for deploying
public Long 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 Long 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 Long undeploy(String applicationId,
Collection<String> servers)
CommandCenter
undeploy in interface CommandCenterapplicationId - - application idservers - - server jvmid-s
public Long undeploy(String applicationId,
Collection<String> servers,
Collection<String> groups)
CommandCenter
undeploy in interface CommandCenterapplicationId - - application idservers - - server jvmid-s
public Long undeploy(String applicationId,
Collection<String> servers,
Collection<String> groups,
boolean disableScripts,
File scriptDescriptionFile)
CommandCenter
undeploy in interface CommandCenter
public Long undeploy(String applicationId,
Collection<String> servers,
Collection<String> groups,
boolean disableScripts,
File scriptDescriptionFile,
File scriptEntriesArchive)
undeploy in interface CommandCenterpublic void remove(String applicationId)
CommandCenter
remove in interface CommandCenter
public void removeVersion(String applicationId,
String versionId)
CommandCenter
removeVersion in interface CommandCenterpublic Date getLastFailoverSyncTime()
CommandCenter
getLastFailoverSyncTime in interface CommandCenterpublic boolean resumeUpdate(Long updateId)
CommandCenter
resumeUpdate in interface CommandCenterpublic boolean cancelUpdate(Long updateId)
CommandCenter
cancelUpdate in interface CommandCenterpublic List<Long> getRunningPausedUpdateIds()
getRunningPausedUpdateIds in interface CommandCenter
public UploadInfo upload(String applicationId,
String fromVersion,
File diff)
throws DuplicationException
CommandCenter
upload in interface CommandCenterapplicationId - - application identificatorfromVersion - - version on which this diff is baseddiff - archive file.
DuplicationException - if the given version already exists on the server.
public ApplicationInfo startEditMode(String serverId,
String applicationId)
CommandCenter
startEditMode in interface CommandCenter
public ApplicationInfo finishEditMode(String serverId,
String applicationId,
String versionId)
CommandCenter
finishEditMode in interface CommandCenter
public ApplicationInfo enableNinjaMode(String serverId,
String applicationId)
CommandCenter
enableNinjaMode in interface CommandCenter
public ApplicationInfo finishNinjaUpdate(String serverId,
String applicationId,
String versionId)
CommandCenter
finishNinjaUpdate in interface CommandCenterpublic int countSeats()
countSeats in interface CommandCenterpublic boolean uploadLicense(File license)
uploadLicense in interface CommandCenterpublic int deleteAllLicenses()
deleteAllLicenses in interface CommandCenter
public boolean createGroup(String name,
String description,
Collection<String> serverIds)
createGroup in interface CommandCenter
public boolean addServersToGroup(String groupName,
Collection<String> serverIds)
addServersToGroup in interface CommandCenter
public 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 CommandCenter
public boolean addGroupChild(String groupName,
String childGroupName)
addGroupChild in interface CommandCenter
public boolean removeGroupChild(String groupName,
String childGroupName)
removeGroupChild in interface CommandCenterpublic CommandCenterUpdate getCommandCenterUpdate()
getCommandCenterUpdate in interface CommandCenterpublic AgentUpdate updateAgent()
updateAgent in interface CommandCenter
public boolean uploadTrace(File file,
String applicationId,
String versionId)
uploadTrace in interface CommandCenter
public String getTrace(String applicationId,
String versionId)
getTrace in interface CommandCenter
@Deprecated
public boolean uploadMetadata(File file,
String applicationId,
String versionId)
CommandCenterCommandCenter.uploadTrace(File, String, String)
uploadMetadata in interface CommandCenter
@Deprecated
public String getMetadata(String applicationId,
String versionId)
CommandCenterCommandCenter.getTrace(String, String)
getMetadata in interface CommandCenterpublic String getVersion()
getVersion in interface CommandCenterpublic Upload uploadVersion(File file)
CommandCenter
uploadVersion in interface CommandCenterfile - archive file
public Collection<String> getLogLines(Long taskId)
CommandCenter
getLogLines in interface CommandCentertaskId - the task ID
public Collection<InstallerExecution> getInstallerExecutions()
getInstallerExecutions in interface CommandCenter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||