diff options
author | Andrew M Finkbeiner | 2013-02-28 18:31:06 +0000 |
---|---|---|
committer | Roberto E. Escobar | 2013-03-04 23:28:09 +0000 |
commit | 2565d92dddc1198a8874ac258661ff5e4d7c117c (patch) | |
tree | aaa61bc55bbcfcf3e67282cfc0d4eda4493b1cd6 /plugins/org.eclipse.osee.ote.server/src | |
parent | 54e4cc85ff64b646e0a683a815319df1a0dbaf90 (diff) | |
download | org.eclipse.osee-2565d92dddc1198a8874ac258661ff5e4d7c117c.tar.gz org.eclipse.osee-2565d92dddc1198a8874ac258661ff5e4d7c117c.tar.xz org.eclipse.osee-2565d92dddc1198a8874ac258661ff5e4d7c117c.zip |
feature[ats_5Z6FP]: Add NodeInfo to host env
Change-Id: I3a9d332f318e1e1a0bb7e55e4a294e19175a8a4b
Diffstat (limited to 'plugins/org.eclipse.osee.ote.server/src')
3 files changed, 15 insertions, 1 deletions
diff --git a/plugins/org.eclipse.osee.ote.server/src/org/eclipse/osee/ote/server/internal/EnvironmentCreationParameter.java b/plugins/org.eclipse.osee.ote.server/src/org/eclipse/osee/ote/server/internal/EnvironmentCreationParameter.java index 966dc08ba7f..e3831ac680b 100644 --- a/plugins/org.eclipse.osee.ote.server/src/org/eclipse/osee/ote/server/internal/EnvironmentCreationParameter.java +++ b/plugins/org.eclipse.osee.ote.server/src/org/eclipse/osee/ote/server/internal/EnvironmentCreationParameter.java @@ -12,6 +12,7 @@ package org.eclipse.osee.ote.server.internal; import java.io.Serializable; import java.rmi.server.ExportException; + import org.eclipse.osee.connection.service.IServiceConnector; import org.eclipse.osee.framework.messaging.NodeInfo; import org.eclipse.osee.framework.plugin.core.util.ExportClassLoader; @@ -46,6 +47,10 @@ class EnvironmentCreationParameter { this.environmentFactoryClass = environmentFactoryClass; } + + public NodeInfo getBroker(){ + return oteEmbeddedBroker; + } public Serializable getServerTitle() { return config.getServerTitle(); diff --git a/plugins/org.eclipse.osee.ote.server/src/org/eclipse/osee/ote/server/internal/OteService.java b/plugins/org.eclipse.osee.ote.server/src/org/eclipse/osee/ote/server/internal/OteService.java index 2c6bedcbb19..3167d65e94c 100644 --- a/plugins/org.eclipse.osee.ote.server/src/org/eclipse/osee/ote/server/internal/OteService.java +++ b/plugins/org.eclipse.osee.ote.server/src/org/eclipse/osee/ote/server/internal/OteService.java @@ -24,6 +24,7 @@ import net.jini.id.UuidFactory; import org.eclipse.osee.framework.jdk.core.util.EnhancedProperties; import org.eclipse.osee.framework.jini.service.interfaces.IService; import org.eclipse.osee.framework.logging.OseeLog; +import org.eclipse.osee.framework.messaging.NodeInfo; import org.eclipse.osee.framework.messaging.services.RegisteredServiceReference; import org.eclipse.osee.ote.core.ConnectionRequestResult; import org.eclipse.osee.ote.core.IRemoteUserSession; @@ -52,6 +53,7 @@ public class OteService implements IHostTestEnvironment, IService { public OteService(IRuntimeLibraryManager runtimeLibraryManager, EnvironmentCreationParameter environmentCreation, PropertyParamter parameterObject, EnhancedProperties properties) { this.runtimeLibraryManager = runtimeLibraryManager; this.environmentCreation = environmentCreation; + Uuid uuid = UuidFactory.generate(); Long lsb = Long.valueOf(uuid.getLeastSignificantBits()); Long msb = Long.valueOf(uuid.getMostSignificantBits()); @@ -69,6 +71,11 @@ public class OteService implements IHostTestEnvironment, IService { enhancedProperties.setProperty("owner", System.getProperty("user.name")); enhancedProperties.setProperty("id", serviceID.toString()); } + + @Override + public NodeInfo getBroker(){ + return environmentCreation.getBroker(); + } @Override public EnhancedProperties getProperties() throws RemoteException { diff --git a/plugins/org.eclipse.osee.ote.server/src/org/eclipse/osee/ote/server/internal/OteServiceStarterImpl.java b/plugins/org.eclipse.osee.ote.server/src/org/eclipse/osee/ote/server/internal/OteServiceStarterImpl.java index 0b88b0808ab..0cf2515bfe0 100644 --- a/plugins/org.eclipse.osee.ote.server/src/org/eclipse/osee/ote/server/internal/OteServiceStarterImpl.java +++ b/plugins/org.eclipse.osee.ote.server/src/org/eclipse/osee/ote/server/internal/OteServiceStarterImpl.java @@ -117,7 +117,6 @@ public class OteServiceStarterImpl implements OteServiceStarter, ServiceInfoPopu brokerService.start(); URI uri = new URI(strUri); - OseeLog.log(Activator.class, Level.INFO, "NODE URI IS " + uri.toASCIIString()); NodeInfo nodeInfo = new NodeInfo("OTEEmbeddedBroker", uri); EnvironmentCreationParameter environmentCreationParameter = @@ -140,6 +139,9 @@ public class OteServiceStarterImpl implements OteServiceStarter, ServiceInfoPopu } else { serviceSideConnector.setProperty("OTEEmbeddedBroker", nodeInfo); } + + Activator.getDefault().getContext().registerService(IHostTestEnvironment.class, service, null); + return service; } |