public class Session extends Object implements Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
Session.DEPSTATUS
Status of a dependency resolver request
|
static class |
Session.OPERATION |
| Modifier and Type | Field and Description |
|---|---|
protected org.gcube.common.core.utils.logging.GCUBELog |
logger |
| Constructor and Description |
|---|
Session(String id,
Session.OPERATION operation,
org.gcube.common.core.scope.GCUBEScope... scope)
Builds a new empty report
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDeployedInstances(Set<DeployerReport.DeployedRunningInstance> instances)
Adds newly deployed instances to the report.
|
void |
addGHNReport(DeployerReport report)
Adds a Deployer Report to the Resource Report
|
void |
addResource(ScopedResource resource) |
void |
addService(ScopedDeployedSoftware service) |
Map<String,DeployerReport> |
getAllGHNReports()
Gets all the GHN reports received
|
String |
getDeploymentPlan() |
String |
getId() |
Calendar |
getLastUpdate() |
Session.OPERATION |
getOperation() |
org.gcube.common.core.scope.GCUBEScope |
getScope() |
Set<ScopedDeployedSoftware> |
getServices() |
boolean |
isSessionClosed()
Checks whether the report is closed or no
|
static Session |
load(String id)
Loads the report from the file system
|
static String |
loadAsString(String id)
Loads the report from the file system
|
void |
reportBrokerWork(boolean wasSuccessful,
String brokerMessage) |
void |
save()
Saves the report on the local file system
|
void |
setDeploymentPlan(String plan) |
void |
startChecker()
Starts the session checker
|
String |
toXML() |
public Session(String id, Session.OPERATION operation, org.gcube.common.core.scope.GCUBEScope... scope)
id - the session ID assigned to the operationpublic void addGHNReport(DeployerReport report) throws Exception
report - the string representation of the report, as sent by a Deployer serviceException - if a problem in the report parsing occurspublic void addResource(ScopedResource resource)
public void addService(ScopedDeployedSoftware service)
public String toXML() throws IOException
IOExceptionpublic Calendar getLastUpdate()
public String getId()
public org.gcube.common.core.scope.GCUBEScope getScope()
public void save()
throws IOException
IOException - if the saving failspublic static Session load(String id) throws IOException
id - the report IDIOException - if the report does not have a valid serializationpublic static String loadAsString(String id) throws IOException
id - the report IDIOException - if the report does not have a valid serializationpublic void reportBrokerWork(boolean wasSuccessful,
String brokerMessage)
public void addDeployedInstances(Set<DeployerReport.DeployedRunningInstance> instances)
instances - the new instancespublic boolean isSessionClosed()
public Set<ScopedDeployedSoftware> getServices()
public Map<String,DeployerReport> getAllGHNReports()
public Session.OPERATION getOperation()
Session.OPERATION related to this reportpublic void setDeploymentPlan(String plan)
public String getDeploymentPlan() throws IOException
IOExceptionpublic void startChecker()
Copyright © 2015. All Rights Reserved.