SetupAnswer need to indicate whether reconnect is needed

This commit is contained in:
anthony 2010-12-22 18:04:13 -08:00
parent 1805c73363
commit 5a0fa3380d
2 changed files with 11 additions and 7 deletions

View File

@ -18,17 +18,21 @@
package com.cloud.agent.api;
public class SetupAnswer extends Answer {
// indicate if agent reconnect is needed after setup command
private boolean _reconnect;
public SetupAnswer() {}
public SetupAnswer(SetupCommand cmd) {
public SetupAnswer(SetupCommand cmd, boolean reconnect) {
super(cmd, true, null);
_reconnect = reconnect;
}
public SetupAnswer(SetupCommand cmd, boolean result, String details) {
super(cmd, result, details);
}
public SetupAnswer(SetupCommand cmd, String details) {
super(cmd, false, details);
_reconnect = true;
}
public boolean needReconnect() {
return _reconnect;
}
}

View File

@ -932,7 +932,7 @@ public abstract class CitrixResourceBase implements ServerResource {
}
protected SetupAnswer execute(SetupCommand cmd) {
return new SetupAnswer(cmd);
return new SetupAnswer(cmd, false);
}
protected SetPortForwardingRulesAnswer execute(SetPortForwardingRulesCommand cmd) {