Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew M. Finkbeiner2016-02-12 13:44:26 +0000
committerRyan D. Brooks2016-02-12 13:44:26 +0000
commit5832c61360f157dd9a23fc85a7db9c03d4dfe294 (patch)
tree9ee17e92fb40e87290a7865b2077efb81f06965d /plugins/org.eclipse.osee.ote.client
parent1236948ce11e639bff4ed6096909a10974016290 (diff)
downloadorg.eclipse.osee-5832c61360f157dd9a23fc85a7db9c03d4dfe294.tar.gz
org.eclipse.osee-5832c61360f157dd9a23fc85a7db9c03d4dfe294.tar.xz
org.eclipse.osee-5832c61360f157dd9a23fc85a7db9c03d4dfe294.zip
feature[ats_ATS272148]: Remove activemq
Diffstat (limited to 'plugins/org.eclipse.osee.ote.client')
-rw-r--r--plugins/org.eclipse.osee.ote.client/META-INF/MANIFEST.MF5
-rw-r--r--plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/JmsToJiniBridgeConnectorLite.java278
-rw-r--r--plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/MessagingGatewayBindTracker.java77
-rw-r--r--plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/core/ClientSession.java12
-rw-r--r--plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/core/ConnectionServiceTracker.java15
-rw-r--r--plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/core/ListenerNotifier.java12
-rw-r--r--plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/core/OteClientEndpointReceive.java34
-rw-r--r--plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/core/OteClientEndpointSend.java62
-rw-r--r--plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/core/TestClientServiceImpl.java14
9 files changed, 29 insertions, 480 deletions
diff --git a/plugins/org.eclipse.osee.ote.client/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.ote.client/META-INF/MANIFEST.MF
index 0259312283..7526f71f67 100644
--- a/plugins/org.eclipse.osee.ote.client/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.ote.client/META-INF/MANIFEST.MF
@@ -50,8 +50,6 @@ Import-Package: net.jini.activation,
org.eclipse.osee.framework.core.exception,
org.eclipse.osee.framework.jdk.core.type,
org.eclipse.osee.framework.jdk.core.util,
- org.eclipse.osee.framework.messaging,
- org.eclipse.osee.framework.messaging.id,
org.eclipse.osee.framework.plugin.core.util,
org.eclipse.osee.ote,
org.eclipse.osee.ote.connection.jini,
@@ -69,5 +67,4 @@ Import-Package: net.jini.activation,
Export-Package: org.eclipse.osee.ote.service,
org.eclipse.osee.ote.service.core
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Require-Bundle: org.eclipse.osee.framework.logging,
- org.eclipse.osee.framework.messaging
+Require-Bundle: org.eclipse.osee.framework.logging
diff --git a/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/JmsToJiniBridgeConnectorLite.java b/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/JmsToJiniBridgeConnectorLite.java
deleted file mode 100644
index 270e0b722b..0000000000
--- a/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/JmsToJiniBridgeConnectorLite.java
+++ /dev/null
@@ -1,278 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.service;
-
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.Serializable;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.UnknownHostException;
-import java.rmi.Remote;
-import java.rmi.server.ExportException;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.logging.Level;
-import net.jini.export.Exporter;
-import net.jini.jeri.BasicILFactory;
-import net.jini.jeri.BasicJeriExporter;
-import net.jini.jeri.tcp.TcpServerEndpoint;
-import org.eclipse.osee.connection.service.IServiceConnector;
-import org.eclipse.osee.connection.service.IServicePropertyChangeListener;
-import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
-import org.eclipse.osee.framework.jdk.core.util.EnhancedProperties;
-import org.eclipse.osee.framework.jdk.core.util.Network;
-import org.eclipse.osee.framework.logging.OseeLog;
-import org.eclipse.osee.framework.messaging.ConnectionNode;
-import org.eclipse.osee.framework.messaging.MessageService;
-import org.eclipse.osee.framework.messaging.NodeInfo;
-import org.eclipse.osee.framework.messaging.OseeMessagingListener;
-import org.eclipse.osee.framework.messaging.OseeMessagingStatusCallback;
-import org.eclipse.osee.framework.messaging.ReplyConnection;
-import org.eclipse.osee.framework.messaging.services.messages.ServiceDescriptionPair;
-import org.eclipse.osee.framework.messaging.services.messages.ServiceHealth;
-import org.eclipse.osee.framework.plugin.core.util.ExportClassLoader;
-import org.eclipse.osee.ote.core.OteBaseMessages;
-import org.eclipse.osee.ote.core.environment.interfaces.IHostTestEnvironment;
-
-/**
- * @author Andrew M. Finkbeiner
- */
-public class JmsToJiniBridgeConnectorLite implements IServiceConnector, OseeMessagingStatusCallback {
- public static final String TYPE = "jmstojini";
- public static final String OTE_EMBEDDED_BROKER_PROP = "OTEEmbeddedBroker";
- private static final class ExportInfo {
- private final Exporter exporter;
- private final Object exportedObject;
-
- private ExportInfo(Exporter exporter, Object exportedObject) {
- this.exportedObject = exportedObject;
- this.exporter = exporter;
- }
- }
-
- private MessageService messageService;
- private OteServiceRequestHandler myOteServiceRequestHandler = new OteServiceRequestHandler();
- private EnhancedProperties properties;
- private final HashMap<Object, ExportInfo> exports = new HashMap<>();
- private final ExportClassLoader exportClassLoader;
- private final List<IServicePropertyChangeListener> propertyChangeListeners =
- new CopyOnWriteArrayList<IServicePropertyChangeListener>();
- private final String uniqueServerId;
- private ServiceHealth serviceHealth;
- public Object service;
-
- Object myLock = new Object();
- private boolean connected = false;
-
- public JmsToJiniBridgeConnectorLite(ServiceHealth serviceHealth, MessageService messageService) {
- this.serviceHealth = serviceHealth;
- this.uniqueServerId = serviceHealth.getServiceUniqueId();
- this.exportClassLoader = ExportClassLoader.getInstance();
- this.messageService = messageService;
- }
-
- public void setServiceHealth(ServiceHealth serviceHealth){
- this.serviceHealth = serviceHealth;
- for(IServicePropertyChangeListener change: propertyChangeListeners){
- change.propertyChanged(this, "user_list", getProperty("user_list", "N/A"));
- }
- }
-
-@Override
- public Object export(Object callback) throws ExportException {
- try {
- Exporter exporter = createExporter();
- Object exportedObject = exporter.export((Remote) callback);
- exports.put(callback, new ExportInfo(exporter, exportedObject));
- return exportedObject;
- } catch (UnknownHostException e) {
- throw new ExportException("failed to export", e);
- }
- }
-
- @Override
- public void unexport(Object callback) throws Exception {
- ExportInfo info = exports.remove(callback);
- if (info != null) {
- info.exporter.unexport(false);
- }
- }
-
- @Override
- public Object findExport(Object callback) {
- ExportInfo info = exports.get(callback);
- if (info != null) {
- return info.exportedObject;
- }
- return null;
- }
-
- @Override
- public void stop() throws Exception {
- for (ExportInfo info : exports.values()) {
- info.exporter.unexport(false);
- }
- exports.clear();
- }
-
- private Exporter createExporter() throws UnknownHostException {
- return new BasicJeriExporter(TcpServerEndpoint.getInstance(Network.getValidIP().getHostAddress(), 0),
- new BasicILFactory(null, null, exportClassLoader), false, false);
- }
-
- @Override
- public String getConnectorType() {
- return TYPE;
- }
-
- @Override
- public Serializable getProperty(String property, Serializable defaultValue) {
- for(ServiceDescriptionPair pair:serviceHealth.getServiceDescription()){
- if(pair.getName().equals(property)){
- return pair.getValue();
- }
- }
- if(property.equals(OTE_EMBEDDED_BROKER_PROP)){
- try {
- return new NodeInfo(OTE_EMBEDDED_BROKER_PROP, new URI(serviceHealth.getBrokerURI()));
- } catch (URISyntaxException e) {
- OseeLog.log(Activator.class, Level.SEVERE, e);
- }
- }
- return defaultValue;
- }
-
- @Override
- public Object getService() {
- if(this.service == null){
- ConnectionNode connectionNode;
- try {
- connectionNode = messageService.get(new NodeInfo("oteserver", new URI(serviceHealth.getBrokerURI())));
- connectionNode.subscribeToReply(OteBaseMessages.RequestOteHost, myOteServiceRequestHandler);
- connectionNode.send(OteBaseMessages.RequestOteHost, serviceHealth.getServiceUniqueId(), this);
- synchronized(myLock){
- myLock.wait(30*1000);
- }
- } catch (OseeCoreException e) {
- OseeLog.log(Activator.class, Level.SEVERE, e);
- } catch (URISyntaxException e) {
- OseeLog.log(Activator.class, Level.SEVERE, e);
- } catch (InterruptedException e) {
- OseeLog.log(Activator.class, Level.SEVERE, e);
- }
- }
- return service;
- }
-
- @Override
- public boolean ping() {
- if(this.service == null){
- return false;
- } else {
- try{
- ((IHostTestEnvironment)this.service).getProperties();
- } catch (Throwable th){
- return false;
- }
- }
- return true;
- }
-
- @Override
- public void addPropertyChangeListener(IServicePropertyChangeListener listener) {
- propertyChangeListeners.add(listener);
- }
-
- @Override
- public void removePropertyChangeListener(IServicePropertyChangeListener listener) {
- propertyChangeListeners.remove(listener);
- }
-
- @Override
- public void setProperty(String key, Serializable value) {
-// properties.setProperty(key, value);
-// for (IServicePropertyChangeListener listener : propertyChangeListeners) {
-// listener.propertyChanged(this, key, value);
-// }
- System.out.println("no");
- }
-
- @Override
- public URI upload(File file) throws Exception {
- return null;
- }
-
- @Override
- public String getUniqueServerId() {
- return uniqueServerId;
- }
-
- @Override
- public EnhancedProperties getProperties() {
- return properties;
- }
-
- @Override
- public void init(Object service) throws UnknownHostException, ExportException {
-
- }
-
- class OteServiceRequestHandler extends OseeMessagingListener {
- @Override
- public void process(Object message, Map<String, Object> headers, ReplyConnection replyConnection) {
- try {
- ByteArrayInputStream bais = new ByteArrayInputStream((byte[]) message);
- ObjectInputStream ois = new ObjectInputStream(bais);
- Object msg = ois.readObject();
- msg.toString();
- Object obj = ois.readObject();
- IHostTestEnvironment hostEnv = (IHostTestEnvironment) obj;
-
- String id = hostEnv.getProperties().getProperty("id").toString();
- if (serviceHealth.getServiceUniqueId().equals(id)){
- JmsToJiniBridgeConnectorLite.this.service = hostEnv;
- synchronized(myLock){
- myLock.notifyAll();
- }
- }
- } catch (IOException ex) {
- OseeLog.log(Activator.class, Level.SEVERE, ex);
- } catch (ClassNotFoundException ex) {
- OseeLog.log(Activator.class, Level.SEVERE, ex);
- } catch (Exception ex) {
- OseeLog.log(Activator.class, Level.SEVERE, ex);
- }
- }
- }
-
- @Override
- public void success() {
- }
-
- @Override
- public void fail(Throwable th) {
- OseeLog.log(Activator.class, Level.SEVERE, th);
- }
-
- public void setConnected(boolean connected){
- this.connected = connected;
- }
-
- public boolean isConnected() {
- return this.connected;
- }
-
-}
diff --git a/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/MessagingGatewayBindTracker.java b/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/MessagingGatewayBindTracker.java
deleted file mode 100644
index 8624756495..0000000000
--- a/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/MessagingGatewayBindTracker.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.service;
-
-import java.util.logging.Level;
-import org.eclipse.osee.framework.logging.OseeLog;
-import org.eclipse.osee.framework.messaging.EndpointReceive;
-import org.eclipse.osee.framework.messaging.EndpointSend;
-import org.eclipse.osee.framework.messaging.MessagingGateway;
-import org.eclipse.osee.ote.service.core.OteClientEndpointSend;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-import org.osgi.util.tracker.ServiceTracker;
-
-/**
- * @author Andrew M. Finkbeiner
- */
-public class MessagingGatewayBindTracker extends ServiceTracker {
-
- private final EndpointSend send;
- private final EndpointReceive receive;
-
- public MessagingGatewayBindTracker(BundleContext context, EndpointSend send, EndpointReceive receive) {
- super(context, MessagingGateway.class.getName(), null);
- this.send = send;
- this.receive = receive;
- }
-
- @Override
- public Object addingService(ServiceReference reference) {
- Object obj = context.getService(reference);
- MessagingGateway messagingGateway = (MessagingGateway) obj;
- if (!messagingGateway.bind(send)) {
- OseeLog.logf(Activator.class, Level.SEVERE,
- "Unable to bind %s to the MessagingGateway.", send.toString());
- }
- if (!messagingGateway.bind(receive)) {
- OseeLog.logf(Activator.class, Level.SEVERE,
- "Unable to bind %s to the MessagingGateway.", receive.toString());
- }
- if (!messagingGateway.bindSendProtocol(OteClientEndpointSend.OTE_CLIENT_SEND_PROTOCOL, send)) {
- OseeLog.logf(Activator.class, Level.SEVERE,
- "Unable to bind %s to %s through the MessagingGateway.",
- OteClientEndpointSend.OTE_CLIENT_SEND_PROTOCOL.toString(), send.toString());
- }
- return super.addingService(reference);
- }
-
- @Override
- public void removedService(ServiceReference reference, Object service) {
- Object obj = context.getService(reference);
- MessagingGateway messagingGateway = (MessagingGateway) obj;
- if (!messagingGateway.unbindSendProtocol(OteClientEndpointSend.OTE_CLIENT_SEND_PROTOCOL, send)) {
- OseeLog.logf(Activator.class, Level.SEVERE,
- "Unable to bind %s to %s through the MessagingGateway.",
- OteClientEndpointSend.OTE_CLIENT_SEND_PROTOCOL.toString(), send.toString());
- }
- if (!messagingGateway.unbind(send)) {
- OseeLog.logf(Activator.class, Level.SEVERE,
- "Unable to unbind %s to the MessagingGateway.", send.toString());
- }
- if (!messagingGateway.unbind(receive)) {
- OseeLog.logf(Activator.class, Level.SEVERE,
- "Unable to bind %s to the MessagingGateway.", receive.toString());
- }
- super.removedService(reference, service);
- }
-
-}
diff --git a/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/core/ClientSession.java b/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/core/ClientSession.java
index 7d25b9694f..c850a25d84 100644
--- a/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/core/ClientSession.java
+++ b/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/core/ClientSession.java
@@ -20,7 +20,6 @@ import java.util.logging.Level;
import org.eclipse.osee.connection.service.IServiceConnector;
import org.eclipse.osee.framework.logging.OseeLevel;
import org.eclipse.osee.framework.logging.OseeLog;
-import org.eclipse.osee.framework.messaging.Message;
import org.eclipse.osee.framework.plugin.core.util.ExportClassLoader;
import org.eclipse.osee.ote.core.AbstractRemoteSession;
import org.eclipse.osee.ote.core.ConnectionRequestResult;
@@ -44,13 +43,13 @@ public class ClientSession extends AbstractRemoteSession {
private final InetAddress address;
private SessionDelegate sessionDelegate = null;
private final ReentrantLock lock = new ReentrantLock();
- private final OteClientEndpointReceive receive;
+// private final OteClientEndpointReceive receive;
private UUID id;
- public ClientSession(OSEEPerson1_4 user, InetAddress address, OteClientEndpointReceive receive) {
+ public ClientSession(OSEEPerson1_4 user, InetAddress address) {
super(user);
this.address = address;
- this.receive = receive;
+// this.receive = receive;
this.id = UUID.randomUUID();
Activator.log(Level.INFO,
String.format("Created OTE session for %s. Address=%s\n ", user.getName(), address.toString()));
@@ -205,11 +204,6 @@ public class ClientSession extends AbstractRemoteSession {
}
@Override
- public void sendMessageToClient(Message message) throws RemoteException {
- receive.receivedMessage(message);
- }
-
- @Override
public void initiateYesNoPrompt(IYesNoPromptResponse prompt) throws Exception {
assert sessionDelegate != null : "delegate is null";
try {
diff --git a/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/core/ConnectionServiceTracker.java b/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/core/ConnectionServiceTracker.java
index 31d7a7623d..7a82a8b370 100644
--- a/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/core/ConnectionServiceTracker.java
+++ b/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/core/ConnectionServiceTracker.java
@@ -15,7 +15,6 @@ import java.util.logging.Level;
import org.eclipse.osee.connection.service.IConnectionService;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.ote.service.IOteClientService;
-import org.eclipse.osee.ote.service.MessagingGatewayBindTracker;
import org.eclipse.osee.ote.service.TestSessionException;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
@@ -24,23 +23,23 @@ import org.osgi.util.tracker.ServiceTracker;
public class ConnectionServiceTracker extends ServiceTracker {
- private final OteClientEndpointReceive endpointReceive = new OteClientEndpointReceive();
- private final OteClientEndpointSend endpointSend = new OteClientEndpointSend();
- private final MessagingGatewayBindTracker messagingGatewayTracker;
+// private final OteClientEndpointReceive endpointReceive = new OteClientEndpointReceive();
+// private final OteClientEndpointSend endpointSend = new OteClientEndpointSend();
+// private final MessagingGatewayBindTracker messagingGatewayTracker;
private ServiceRegistration registration;
private TestClientServiceImpl testClientService;
public ConnectionServiceTracker(BundleContext context) {
super(context, IConnectionService.class.getName(), null);
- messagingGatewayTracker = new MessagingGatewayBindTracker(context, endpointSend, endpointReceive);
- messagingGatewayTracker.open(true);
+// messagingGatewayTracker = new MessagingGatewayBindTracker(context, endpointSend, endpointReceive);
+// messagingGatewayTracker.open(true);
}
@Override
public Object addingService(ServiceReference reference) {
IConnectionService connectionService = (IConnectionService) super.addingService(reference);
- testClientService = new TestClientServiceImpl(connectionService, endpointSend, endpointReceive);
+ testClientService = new TestClientServiceImpl(connectionService);
testClientService.init();
// register the service
registration = context.registerService(IOteClientService.class.getName(), testClientService, null);
@@ -71,7 +70,7 @@ public class ConnectionServiceTracker extends ServiceTracker {
@Override
public void close() {
shutdownClientService();
- messagingGatewayTracker.close();
+// messagingGatewayTracker.close();
super.close();
}
diff --git a/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/core/ListenerNotifier.java b/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/core/ListenerNotifier.java
index 442e17f4b3..61490b51cb 100644
--- a/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/core/ListenerNotifier.java
+++ b/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/core/ListenerNotifier.java
@@ -13,7 +13,9 @@ package org.eclipse.osee.ote.service.core;
import java.util.concurrent.CopyOnWriteArraySet;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
+import java.util.concurrent.ThreadFactory;
import java.util.logging.Level;
+
import org.eclipse.osee.connection.service.IServiceConnector;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.ote.service.Activator;
@@ -24,7 +26,15 @@ import org.eclipse.osee.ote.service.ITestConnectionListener;
* @author Ken J. Aguilar
*/
class ListenerNotifier {
- private final ExecutorService executor = Executors.newCachedThreadPool();
+ private final ExecutorService executor = Executors.newCachedThreadPool(new ThreadFactory() {
+ private int count = 0;
+ @Override
+ public Thread newThread(Runnable r) {
+ Thread th = new Thread(r);
+ th.setName(String.format("OTE listener notifier [%d]", count++));
+ return th;
+ }
+ });
private final CopyOnWriteArraySet<ITestConnectionListener> testConnectionListeners =
new CopyOnWriteArraySet<ITestConnectionListener>();
diff --git a/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/core/OteClientEndpointReceive.java b/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/core/OteClientEndpointReceive.java
deleted file mode 100644
index d206970611..0000000000
--- a/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/core/OteClientEndpointReceive.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.service.core;
-
-import java.util.Properties;
-import org.eclipse.osee.framework.messaging.EndpointReceive;
-import org.eclipse.osee.framework.messaging.Message;
-
-/**
- * @author Andrew M. Finkbeiner
- */
-public class OteClientEndpointReceive extends EndpointReceive {
-
- @Override
- public void dispose() {
- }
-
- @Override
- public void start(Properties properties) {
- }
-
- public void receivedMessage(Message message) {
- onReceive(message);
- }
-
-}
diff --git a/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/core/OteClientEndpointSend.java b/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/core/OteClientEndpointSend.java
deleted file mode 100644
index 3afef7d35d..0000000000
--- a/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/core/OteClientEndpointSend.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.service.core;
-
-import java.util.Properties;
-import org.eclipse.osee.framework.messaging.EndpointSend;
-import org.eclipse.osee.framework.messaging.ExceptionHandler;
-import org.eclipse.osee.framework.messaging.Message;
-import org.eclipse.osee.framework.messaging.id.ProtocolId;
-import org.eclipse.osee.framework.messaging.id.StringName;
-import org.eclipse.osee.framework.messaging.id.StringNamespace;
-import org.eclipse.osee.framework.messaging.id.StringProtocolId;
-import org.eclipse.osee.ote.core.environment.interfaces.ITestEnvironment;
-import org.eclipse.osee.ote.service.IOteClientService;
-
-/**
- * @author Andrew M. Finkbeiner
- */
-public class OteClientEndpointSend implements EndpointSend {
-
- public static ProtocolId OTE_CLIENT_SEND_PROTOCOL = new StringProtocolId(new StringNamespace(
- "org.eclipse.osee.ote.service.core"), new StringName("OteClientEndpointSend"));
- private IOteClientService clientService;
-
- @Override
- public void send(Message message, ExceptionHandler exceptionHandler) {
- if (clientService == null) {
- exceptionHandler.handleException(new Exception(String.format(
- "Unable to send message [%s], no client service is available.", message.toString())));
- } else {
- ITestEnvironment env = clientService.getConnectedEnvironment();
- if (env == null) {
- exceptionHandler.handleException(new Exception(String.format(
- "Unable to send message [%s], there is not a connected environment.", message.toString())));
- } else {
- try {
- env.sendMessage(message);
- } catch (Throwable th) {
- exceptionHandler.handleException(new Exception(String.format("Unable to send message [%s]",
- message.toString()), th));
- }
- }
- }
- }
-
- @Override
- public void start(Properties properties) {
- }
-
- public void setTestClientService(IOteClientService testClientServiceImpl) {
- this.clientService = testClientServiceImpl;
- }
-
-}
diff --git a/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/core/TestClientServiceImpl.java b/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/core/TestClientServiceImpl.java
index 917f702994..eaf5c696bc 100644
--- a/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/core/TestClientServiceImpl.java
+++ b/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/core/TestClientServiceImpl.java
@@ -55,14 +55,14 @@ public class TestClientServiceImpl implements IOteClientService, IConnectorListe
private volatile boolean stopped = false;
private TestHostConnection testConnection;
- private final OteClientEndpointSend endpointSend;
- private final OteClientEndpointReceive endpointReceive;
+// private final OteClientEndpointSend endpointSend;
+// private final OteClientEndpointReceive endpointReceive;
- public TestClientServiceImpl(IConnectionService connectionService, OteClientEndpointSend endpointSend, OteClientEndpointReceive endpointReceive) {
+ public TestClientServiceImpl(IConnectionService connectionService) {
this.connectionService = connectionService;
- this.endpointReceive = endpointReceive;
- this.endpointSend = endpointSend;
- endpointSend.setTestClientService(this);
+// this.endpointReceive = endpointReceive;
+// this.endpointSend = endpointSend;
+// endpointSend.setTestClientService(this);
}
public void init() {
@@ -253,7 +253,7 @@ public class TestClientServiceImpl implements IOteClientService, IConnectorListe
if (session != null) {
session.close();
}
- session = new ClientSession(user, address, endpointReceive);
+ session = new ClientSession(user, address);
}
@Override

Back to the top