You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by al...@apache.org on 2015/06/14 22:47:54 UTC
[04/10] incubator-brooklyn git commit: Adds
VanillaWindowsProcess.RDP_PORT attribute
Adds VanillaWindowsProcess.RDP_PORT attribute
Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/521a3a0a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/521a3a0a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/521a3a0a
Branch: refs/heads/master
Commit: 521a3a0a57d323809f316901092a085810f150ba
Parents: 2263862
Author: Aled Sage <al...@gmail.com>
Authored: Fri Jun 12 16:46:09 2015 +0100
Committer: Aled Sage <al...@gmail.com>
Committed: Fri Jun 12 16:46:09 2015 +0100
----------------------------------------------------------------------
.../main/java/brooklyn/entity/basic/VanillaWindowsProcess.java | 4 ++++
.../java/brooklyn/entity/basic/VanillaWindowsProcessImpl.java | 6 ++++++
2 files changed, 10 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/521a3a0a/software/base/src/main/java/brooklyn/entity/basic/VanillaWindowsProcess.java
----------------------------------------------------------------------
diff --git a/software/base/src/main/java/brooklyn/entity/basic/VanillaWindowsProcess.java b/software/base/src/main/java/brooklyn/entity/basic/VanillaWindowsProcess.java
index ce49110..1389722 100644
--- a/software/base/src/main/java/brooklyn/entity/basic/VanillaWindowsProcess.java
+++ b/software/base/src/main/java/brooklyn/entity/basic/VanillaWindowsProcess.java
@@ -22,6 +22,8 @@ import java.util.Collection;
import brooklyn.config.ConfigKey;
import brooklyn.entity.proxying.ImplementedBy;
+import brooklyn.event.AttributeSensor;
+import brooklyn.event.basic.Sensors;
import brooklyn.util.time.Duration;
import com.google.common.collect.ImmutableSet;
@@ -59,4 +61,6 @@ public interface VanillaWindowsProcess extends AbstractVanillaProcess {
// TODO If automatic updates are enabled and there are updates waiting to be installed, thirty minutes may not be sufficient...
ConfigKey<Duration> REBOOT_COMPLETED_TIMEOUT = ConfigKeys.newDurationConfigKey("reboot.completed.timeout",
"duration to wait whilst waiting for a machine to finish rebooting, and thus to become available again", Duration.minutes(30));
+
+ AttributeSensor<Integer> RDP_PORT = Sensors.newIntegerSensor("rdpPort");
}
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/521a3a0a/software/base/src/main/java/brooklyn/entity/basic/VanillaWindowsProcessImpl.java
----------------------------------------------------------------------
diff --git a/software/base/src/main/java/brooklyn/entity/basic/VanillaWindowsProcessImpl.java b/software/base/src/main/java/brooklyn/entity/basic/VanillaWindowsProcessImpl.java
index febed0f..732963c 100644
--- a/software/base/src/main/java/brooklyn/entity/basic/VanillaWindowsProcessImpl.java
+++ b/software/base/src/main/java/brooklyn/entity/basic/VanillaWindowsProcessImpl.java
@@ -26,6 +26,12 @@ public class VanillaWindowsProcessImpl extends SoftwareProcessImpl implements Va
}
@Override
+ protected void preStart() {
+ super.preStart();
+ setAttribute(RDP_PORT, 3389);
+ }
+
+ @Override
protected void connectSensors() {
super.connectSensors();
connectServiceUpIsRunning();