Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorddunne2010-09-23 18:33:00 -0400
committerRyan D. Brooks2010-09-23 18:33:00 -0400
commitf066aba03eb2a328bab79bc6d0f11ca7b65ce36a (patch)
tree689511b945d52c2269a82957e1b134cce28a7ba1 /plugins
parentee6c0a4558fb1ffda2b5e95348fff7038d4803ac (diff)
downloadorg.eclipse.osee-f066aba03eb2a328bab79bc6d0f11ca7b65ce36a.tar.gz
org.eclipse.osee-f066aba03eb2a328bab79bc6d0f11ca7b65ce36a.tar.xz
org.eclipse.osee-f066aba03eb2a328bab79bc6d0f11ca7b65ce36a.zip
refactor: Cleanup event class names and comments
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/OseeEventManager.java4
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/systems/EventManagerData.java6
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/systems/EventManagerFactory.java8
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/systems/FrameworkEventToRemoteEventListener.java (renamed from plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/systems/FrameworkEventToRemoteEvent2Listener.java)6
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/systems/InternalEventManager.java (renamed from plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/systems/InternalEventManager2.java)82
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/systems/JiniSkynetEventServiceLookup.java194
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/systems/ResMessagingConnectionListener.java2
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/OseeEventSystemServiceRegHandler.java6
8 files changed, 57 insertions, 251 deletions
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/OseeEventManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/OseeEventManager.java
index 4e9b5b13f5..a291afc7e1 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/OseeEventManager.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/OseeEventManager.java
@@ -42,7 +42,7 @@ import org.eclipse.osee.framework.skynet.core.event.model.Sender;
import org.eclipse.osee.framework.skynet.core.event.model.TransactionChange;
import org.eclipse.osee.framework.skynet.core.event.model.TransactionEvent;
import org.eclipse.osee.framework.skynet.core.event.systems.EventManagerData;
-import org.eclipse.osee.framework.skynet.core.event.systems.InternalEventManager2;
+import org.eclipse.osee.framework.skynet.core.event.systems.InternalEventManager;
import org.eclipse.osee.framework.skynet.core.internal.Activator;
/**
@@ -100,7 +100,7 @@ public class OseeEventManager {
eventManagerData.getPriorityListeners().remove(listener);
}
- private static InternalEventManager2 getEventManager() {
+ private static InternalEventManager getEventManager() {
return eventManagerData.getMessageEventManager();
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/systems/EventManagerData.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/systems/EventManagerData.java
index 446cb97c58..351752fd85 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/systems/EventManagerData.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/systems/EventManagerData.java
@@ -24,9 +24,9 @@ public class EventManagerData {
private final Collection<IEventListener> listeners = new CopyOnWriteArrayList<IEventListener>();
private final EventSystemPreferences preferences = new EventSystemPreferences();
- private InternalEventManager2 messageEventManager;
+ private InternalEventManager messageEventManager;
- public void setMessageEventManager(InternalEventManager2 messageEventManager) {
+ public void setMessageEventManager(InternalEventManager messageEventManager) {
this.messageEventManager = messageEventManager;
}
@@ -42,7 +42,7 @@ public class EventManagerData {
return preferences;
}
- public InternalEventManager2 getMessageEventManager() {
+ public InternalEventManager getMessageEventManager() {
return messageEventManager;
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/systems/EventManagerFactory.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/systems/EventManagerFactory.java
index e3786544ac..29658f93d9 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/systems/EventManagerFactory.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/systems/EventManagerFactory.java
@@ -18,17 +18,17 @@ import org.eclipse.osee.framework.messaging.event.res.IOseeCoreModelEventService
import org.eclipse.osee.framework.skynet.core.event.EventSystemPreferences;
import org.eclipse.osee.framework.skynet.core.event.OseeEventThreadFactory;
import org.eclipse.osee.framework.skynet.core.event.listener.IEventListener;
-import org.eclipse.osee.framework.skynet.core.event.systems.InternalEventManager2.ConnectionStatus;
+import org.eclipse.osee.framework.skynet.core.event.systems.InternalEventManager.ConnectionStatus;
/**
* @author Roberto E. Escobar
*/
public class EventManagerFactory {
- public InternalEventManager2 createNewEventManager(IOseeCoreModelEventService coreModelEventService, EventSystemPreferences preferences, Collection<IEventListener> listeners, Collection<IEventListener> priorityListeners, ConnectionStatus connectionStatus) {
+ public InternalEventManager createNewEventManager(IOseeCoreModelEventService coreModelEventService, EventSystemPreferences preferences, Collection<IEventListener> listeners, Collection<IEventListener> priorityListeners, ConnectionStatus connectionStatus) {
ExecutorService executorService = createExecutor("Osee Events2");
- InternalEventManager2 eventManager =
- new InternalEventManager2(coreModelEventService, listeners, priorityListeners, executorService, preferences,
+ InternalEventManager eventManager =
+ new InternalEventManager(coreModelEventService, listeners, priorityListeners, executorService, preferences,
connectionStatus);
return eventManager;
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/systems/FrameworkEventToRemoteEvent2Listener.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/systems/FrameworkEventToRemoteEventListener.java
index 187f4ef079..f84496053e 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/systems/FrameworkEventToRemoteEvent2Listener.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/systems/FrameworkEventToRemoteEventListener.java
@@ -61,12 +61,12 @@ import org.eclipse.osee.framework.skynet.core.transaction.TransactionManager;
/**
* @author Donald G. Dunne
*/
-public final class FrameworkEventToRemoteEvent2Listener implements IFrameworkEventListener {
+public final class FrameworkEventToRemoteEventListener implements IFrameworkEventListener {
private final ISchedulingRule mutexRule;
- private InternalEventManager2 eventManager;
+ private InternalEventManager eventManager;
- public FrameworkEventToRemoteEvent2Listener(InternalEventManager2 eventManager) {
+ public FrameworkEventToRemoteEventListener(InternalEventManager eventManager) {
this.eventManager = eventManager;
this.mutexRule = new ISchedulingRule() {
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/systems/InternalEventManager2.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/systems/InternalEventManager.java
index b6c384dd3f..a42123a0bf 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/systems/InternalEventManager2.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/systems/InternalEventManager.java
@@ -52,7 +52,7 @@ import org.eclipse.osee.framework.skynet.core.internal.Activator;
*
* @author Donald G. Dunne
*/
-public class InternalEventManager2 {
+public class InternalEventManager {
public static interface ConnectionStatus {
boolean isConnected();
}
@@ -65,13 +65,13 @@ public class InternalEventManager2 {
private final IFrameworkEventListener frameworkListener;
private final ConnectionStatus connectionStatus;
- public InternalEventManager2(IOseeCoreModelEventService coreModelEventService, Collection<IEventListener> listeners, Collection<IEventListener> priorityListeners, ExecutorService executorService, EventSystemPreferences preferences, ConnectionStatus connectionStatus) {
+ public InternalEventManager(IOseeCoreModelEventService coreModelEventService, Collection<IEventListener> listeners, Collection<IEventListener> priorityListeners, ExecutorService executorService, EventSystemPreferences preferences, ConnectionStatus connectionStatus) {
this.coreModelEventService = coreModelEventService;
this.listeners = listeners;
this.priorityListeners = priorityListeners;
this.executorService = executorService;
this.preferences = preferences;
- this.frameworkListener = new FrameworkEventToRemoteEvent2Listener(this);
+ this.frameworkListener = new FrameworkEventToRemoteEventListener(this);
this.connectionStatus = connectionStatus;
}
@@ -99,7 +99,7 @@ public class InternalEventManager2 {
* For all IBranchEventListener, process priorityListeners, then normal listeners
*/
public void processBranchEvent(Sender sender, BranchEvent branchEvent) {
- EventUtil.eventLog(String.format("IEM2: processBranchEvent [%s]", branchEvent));
+ EventUtil.eventLog(String.format("IEM: processBranchEvent [%s]", branchEvent));
for (IEventListener listener : priorityListeners) {
try {
if (listener instanceof IBranchEventListener) {
@@ -107,7 +107,7 @@ public class InternalEventManager2 {
}
} catch (Exception ex) {
EventUtil.eventLog(
- String.format("IEM2: processBranchEvent [%s] error processing priorityListeners", branchEvent), ex);
+ String.format("IEM: processBranchEvent [%s] error processing priorityListeners", branchEvent), ex);
}
}
for (IEventListener listener : listeners) {
@@ -116,7 +116,7 @@ public class InternalEventManager2 {
processBranchEventListener((IBranchEventListener) listener, sender, branchEvent);
}
} catch (Exception ex) {
- EventUtil.eventLog(String.format("IEM2: processBranchEvent [%s] error processing listeners", branchEvent),
+ EventUtil.eventLog(String.format("IEM: processBranchEvent [%s] error processing listeners", branchEvent),
ex);
}
}
@@ -147,7 +147,7 @@ public class InternalEventManager2 {
}
} catch (Exception ex) {
EventUtil.eventLog(
- String.format("IEM2: processArtsAndRels [%s] error processing priorityListeners", artifactEvent), ex);
+ String.format("IEM: processArtsAndRels [%s] error processing priorityListeners", artifactEvent), ex);
}
}
for (IEventListener listener : listeners) {
@@ -156,14 +156,14 @@ public class InternalEventManager2 {
processEventArtifactsAndRelationsListener((IArtifactEventListener) listener, artifactEvent, sender);
}
} catch (Exception ex) {
- EventUtil.eventLog(
- String.format("IEM2: processArtsAndRels [%s] error processing listeners", artifactEvent), ex);
+ EventUtil.eventLog(String.format("IEM: processArtsAndRels [%s] error processing listeners", artifactEvent),
+ ex);
}
}
}
private void processEventArtifactsAndRelationsListener(IArtifactEventListener listener, ArtifactEvent artifactEvent, Sender sender) {
- EventUtil.eventLog(String.format("IEM2: processArtsAndRels [%s]", artifactEvent));
+ EventUtil.eventLog(String.format("IEM: processArtsAndRels [%s]", artifactEvent));
// If any filter doesn't match, don't call listener
if (((IEventFilteredListener) listener).getEventFilters() != null) {
for (IEventFilter eventFilter : ((IEventFilteredListener) listener).getEventFilters()) {
@@ -188,14 +188,14 @@ public class InternalEventManager2 {
}
public void processAccessControlEvent(Sender sender, AccessControlEvent accessControlEvent) {
- EventUtil.eventLog(String.format("IEM2: processAccessControlEvent [%s]", accessControlEvent));
+ EventUtil.eventLog(String.format("IEM: processAccessControlEvent [%s]", accessControlEvent));
for (IEventListener listener : priorityListeners) {
try {
if (listener instanceof IAccessControlEventListener) {
((IAccessControlEventListener) listener).handleAccessControlArtifactsEvent(sender, accessControlEvent);
}
} catch (Exception ex) {
- EventUtil.eventLog(String.format("IEM2: processAccessControlEvent [%s] error processing priorityListeners",
+ EventUtil.eventLog(String.format("IEM: processAccessControlEvent [%s] error processing priorityListeners",
accessControlEvent), ex);
}
}
@@ -206,13 +206,13 @@ public class InternalEventManager2 {
}
} catch (Exception ex) {
EventUtil.eventLog(
- String.format("IEM2: processAccessControlEvent [%s] error processing listeners", accessControlEvent), ex);
+ String.format("IEM: processAccessControlEvent [%s] error processing listeners", accessControlEvent), ex);
}
}
}
public void processEventBroadcastEvent(Sender sender, BroadcastEvent broadcastEvent) {
- EventUtil.eventLog(String.format("IEM2: processEventBroadcastEvent [%s]", broadcastEvent));
+ EventUtil.eventLog(String.format("IEM: processEventBroadcastEvent [%s]", broadcastEvent));
if (broadcastEvent.getUsers().size() == 0) {
return;
}
@@ -223,7 +223,7 @@ public class InternalEventManager2 {
}
} catch (Exception ex) {
EventUtil.eventLog(
- String.format("IEM2: processEventBroadcastEvent [%s] error processing priorityListeners", broadcastEvent),
+ String.format("IEM: processEventBroadcastEvent [%s] error processing priorityListeners", broadcastEvent),
ex);
}
}
@@ -234,13 +234,13 @@ public class InternalEventManager2 {
}
} catch (Exception ex) {
EventUtil.eventLog(
- String.format("IEM2: processEventBroadcastEvent [%s] error processing listeners", broadcastEvent), ex);
+ String.format("IEM: processEventBroadcastEvent [%s] error processing listeners", broadcastEvent), ex);
}
}
}
public void processRemoteEventManagerEvent(Sender sender, RemoteEventServiceEventType remoteEventServiceEvent) {
- EventUtil.eventLog(String.format("IEM2: processRemoteEventManagerEvent [%s]", remoteEventServiceEvent));
+ EventUtil.eventLog(String.format("IEM: processRemoteEventManagerEvent [%s]", remoteEventServiceEvent));
for (IEventListener listener : priorityListeners) {
try {
if (listener instanceof IRemoteEventManagerEventListener) {
@@ -248,9 +248,9 @@ public class InternalEventManager2 {
remoteEventServiceEvent);
}
} catch (Exception ex) {
- EventUtil.eventLog(
- String.format("IEM2: processRemoteEventManagerEvent [%s] error processing priorityListeners",
- remoteEventServiceEvent), ex);
+ EventUtil.eventLog(String.format(
+ "IEM: processRemoteEventManagerEvent [%s] error processing priorityListeners", remoteEventServiceEvent),
+ ex);
}
}
for (IEventListener listener : listeners) {
@@ -260,14 +260,14 @@ public class InternalEventManager2 {
remoteEventServiceEvent);
}
} catch (Exception ex) {
- EventUtil.eventLog(String.format("IEM2: processRemoteEventManagerEvent [%s] error processing listeners",
+ EventUtil.eventLog(String.format("IEM: processRemoteEventManagerEvent [%s] error processing listeners",
remoteEventServiceEvent), ex);
}
}
}
public void processTransactionEvent(Sender sender, TransactionEvent transactionEvent) {
- EventUtil.eventLog(String.format("IEM2: processTransactionEvent [%s]", transactionEvent));
+ EventUtil.eventLog(String.format("IEM: processTransactionEvent [%s]", transactionEvent));
for (IEventListener listener : priorityListeners) {
try {
if (listener instanceof ITransactionEventListener) {
@@ -275,7 +275,7 @@ public class InternalEventManager2 {
}
} catch (Exception ex) {
EventUtil.eventLog(
- String.format("IEM2: processTransactionEvent [%s] error processing priorityListeners", transactionEvent),
+ String.format("IEM: processTransactionEvent [%s] error processing priorityListeners", transactionEvent),
ex);
}
}
@@ -286,7 +286,7 @@ public class InternalEventManager2 {
}
} catch (Exception ex) {
EventUtil.eventLog(
- String.format("IEM2: processTransactionEvent [%s] error processing listeners", transactionEvent), ex);
+ String.format("IEM: processTransactionEvent [%s] error processing listeners", transactionEvent), ex);
}
}
}
@@ -308,7 +308,7 @@ public class InternalEventManager2 {
if (preferences.isDisableEvents()) {
return;
}
- EventUtil.eventLog("IEM2: kickAccessControlEvent - type: " + accessControlEvent + sender + " artifacts: " + accessControlEvent.getArtifacts());
+ EventUtil.eventLog("IEM: kickAccessControlEvent - type: " + accessControlEvent + sender + " artifacts: " + accessControlEvent.getArtifacts());
Runnable runnable = new Runnable() {
@Override
public void run() {
@@ -325,7 +325,7 @@ public class InternalEventManager2 {
sendRemoteEvent(FrameworkEventUtil.getRemoteAccessControlEvent(accessControlEvent));
}
} catch (Exception ex) {
- EventUtil.eventLog("IEM2 kickAccessControlEvent", ex);
+ EventUtil.eventLog("IEM: kickAccessControlEvent", ex);
}
}
};
@@ -337,7 +337,7 @@ public class InternalEventManager2 {
if (preferences.isDisableEvents()) {
return;
}
- EventUtil.eventLog("IEM2: kickLocalRemEvent: type: " + remoteEventServiceEventType + " - " + sender);
+ EventUtil.eventLog("IEM: kickLocalRemEvent: type: " + remoteEventServiceEventType + " - " + sender);
Runnable runnable = new Runnable() {
@Override
public void run() {
@@ -359,7 +359,7 @@ public class InternalEventManager2 {
if (preferences.isDisableEvents()) {
return;
}
- EventUtil.eventLog("IEM2: kickArtifactReloadEvent [" + artifactEvent + "] - " + sender);
+ EventUtil.eventLog("IEM: kickArtifactReloadEvent [" + artifactEvent + "] - " + sender);
Runnable runnable = new Runnable() {
@Override
public void run() {
@@ -374,7 +374,7 @@ public class InternalEventManager2 {
// NO REMOTE KICK
} catch (Exception ex) {
- EventUtil.eventLog("IEM2 kickArtifactReloadEvent", ex);
+ EventUtil.eventLog("IEM: kickArtifactReloadEvent", ex);
}
}
};
@@ -386,19 +386,19 @@ public class InternalEventManager2 {
*/
public void kickBranchEvent(final Sender sender, final BranchEvent branchEvent) {
if (branchEvent.getNetworkSender() == null) {
- EventUtil.eventLog("IEM2: kickBranchEvent - ERROR networkSender can't be null.");
+ EventUtil.eventLog("IEM: kickBranchEvent - ERROR networkSender can't be null.");
return;
}
if (preferences.isDisableEvents()) {
return;
}
- EventUtil.eventLog("IEM2: kickBranchEvent: type: " + branchEvent.getEventType() + " guid: " + branchEvent.getBranchGuid() + " - " + sender);
+ EventUtil.eventLog("IEM: kickBranchEvent: type: " + branchEvent.getEventType() + " guid: " + branchEvent.getBranchGuid() + " - " + sender);
Runnable runnable = new Runnable() {
@Override
public void run() {
// Log if this is a loopback and what is happening
if (preferences.isEnableRemoteEventLoopback()) {
- EventUtil.eventLog("IEM2: BranchEvent Loopback enabled" + (sender.isLocal() ? " - Ignoring Local Kick" : " - Kicking Local from Loopback"));
+ EventUtil.eventLog("IEM: BranchEvent Loopback enabled" + (sender.isLocal() ? " - Ignoring Local Kick" : " - Kicking Local from Loopback"));
}
BranchEventType branchEventType = branchEvent.getEventType();
@@ -422,13 +422,13 @@ public class InternalEventManager2 {
// Kick LOCAL and REMOTE ArtifactEvent
public void kickArtifactEvent(final Sender sender, final ArtifactEvent artifactEvent) {
if (artifactEvent.getNetworkSender() == null) {
- EventUtil.eventLog("IEM2: kickArtifactEvent - ERROR networkSender can't be null.");
+ EventUtil.eventLog("IEM: kickArtifactEvent - ERROR networkSender can't be null.");
return;
}
if (preferences.isDisableEvents()) {
return;
}
- EventUtil.eventLog("IEM2: kickArtifactEvent [" + artifactEvent + "] - " + sender);
+ EventUtil.eventLog("IEM: kickArtifactEvent [" + artifactEvent + "] - " + sender);
Runnable runnable = new Runnable() {
@Override
public void run() {
@@ -436,7 +436,7 @@ public class InternalEventManager2 {
try {
// Log if this is a loopback and what is happening
if (preferences.isEnableRemoteEventLoopback()) {
- EventUtil.eventLog("IEM2: ArtifactEvent Loopback enabled" + (sender.isLocal() ? " - Ignoring Local Kick" : " - Kicking Local from Loopback"));
+ EventUtil.eventLog("IEM: ArtifactEvent Loopback enabled" + (sender.isLocal() ? " - Ignoring Local Kick" : " - Kicking Local from Loopback"));
}
// Kick LOCAL
@@ -452,7 +452,7 @@ public class InternalEventManager2 {
sendRemoteEvent(FrameworkEventUtil.getRemotePersistEvent(artifactEvent));
}
} catch (Exception ex) {
- EventUtil.eventLog("IEM2 kickArtifactEvent", ex);
+ EventUtil.eventLog("IEM: kickArtifactEvent", ex);
}
}
};
@@ -462,13 +462,13 @@ public class InternalEventManager2 {
// Kick LOCAL and REMOTE ArtifactEvent
public void kickTransactionEvent(final Sender sender, final TransactionEvent transEvent) {
if (transEvent.getNetworkSender() == null) {
- EventUtil.eventLog("IEM2: kickTransactionEvent - ERROR networkSender can't be null.");
+ EventUtil.eventLog("IEM: kickTransactionEvent - ERROR networkSender can't be null.");
return;
}
if (preferences.isDisableEvents()) {
return;
}
- EventUtil.eventLog("IEM2: kickTransactionEvent [" + transEvent + "] - " + sender);
+ EventUtil.eventLog("IEM: kickTransactionEvent [" + transEvent + "] - " + sender);
Runnable runnable = new Runnable() {
@Override
public void run() {
@@ -476,7 +476,7 @@ public class InternalEventManager2 {
try {
// Log if this is a loopback and what is happening
if (!preferences.isEnableRemoteEventLoopback()) {
- EventUtil.eventLog("IEM2: TransactionEvent Loopback enabled" + (sender.isLocal() ? " - Ignoring Local Kick" : " - Kicking Local from Loopback"));
+ EventUtil.eventLog("IEM: TransactionEvent Loopback enabled" + (sender.isLocal() ? " - Ignoring Local Kick" : " - Kicking Local from Loopback"));
}
// Kick LOCAL
@@ -493,7 +493,7 @@ public class InternalEventManager2 {
sendRemoteEvent(FrameworkEventUtil.getRemoteTransactionEvent(transEvent));
}
} catch (Exception ex) {
- EventUtil.eventLog("IEM2: kickTransactionEvent", ex);
+ EventUtil.eventLog("IEM: kickTransactionEvent", ex);
}
}
};
@@ -509,7 +509,7 @@ public class InternalEventManager2 {
}
if (!broadcastEvent.getBroadcastEventType().isPingOrPong()) {
- EventUtil.eventLog("IEM2: kickBroadcastEvent: type: " + broadcastEvent.getBroadcastEventType().name() + " message: " + broadcastEvent.getMessage() + " - " + sender);
+ EventUtil.eventLog("IEM: kickBroadcastEvent: type: " + broadcastEvent.getBroadcastEventType().name() + " message: " + broadcastEvent.getMessage() + " - " + sender);
}
Runnable runnable = new Runnable() {
@Override
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/systems/JiniSkynetEventServiceLookup.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/systems/JiniSkynetEventServiceLookup.java
deleted file mode 100644
index 1ff499fab6..0000000000
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/systems/JiniSkynetEventServiceLookup.java
+++ /dev/null
@@ -1,194 +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.framework.skynet.core.event.systems;
-
-import java.rmi.RemoteException;
-import java.rmi.server.ExportException;
-import java.util.logging.Level;
-import net.jini.core.entry.Entry;
-import net.jini.core.lookup.ServiceItem;
-import org.eclipse.osee.framework.core.client.ClientSessionManager;
-import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.osee.framework.jini.discovery.EclipseJiniClassloader;
-import org.eclipse.osee.framework.jini.discovery.IServiceLookupListener;
-import org.eclipse.osee.framework.jini.discovery.ServiceDataStore;
-import org.eclipse.osee.framework.jini.service.core.SimpleFormattedEntry;
-import org.eclipse.osee.framework.jini.util.OseeJini;
-import org.eclipse.osee.framework.logging.OseeLog;
-import org.eclipse.osee.framework.messaging.event.skynet.ISkynetEvent;
-import org.eclipse.osee.framework.messaging.event.skynet.ISkynetEventListener;
-import org.eclipse.osee.framework.messaging.event.skynet.ISkynetEventService;
-import org.eclipse.osee.framework.skynet.core.UserManager;
-import org.eclipse.osee.framework.skynet.core.event.EventSystemPreferences;
-import org.eclipse.osee.framework.skynet.core.event.OseeEventManager;
-import org.eclipse.osee.framework.skynet.core.event.model.RemoteEventServiceEventType;
-import org.eclipse.osee.framework.skynet.core.internal.Activator;
-
-/**
- * @author Donald G. Dunne
- */
-public final class JiniSkynetEventServiceLookup implements IServiceLookupListener {
-
- private final ISkynetEventListener clientEventListener;
- private String acceptableServiceName;
- private ISkynetEventService currentEventService;
- private ISkynetEventListener clientEventListenerRemoteReference;
-
- public JiniSkynetEventServiceLookup(EventSystemPreferences preferences, ISkynetEventListener clientEventListener) {
- this.clientEventListener = clientEventListener;
- clear();
- }
-
- private void clear() {
- currentEventService = null;
- clientEventListenerRemoteReference = null;
- acceptableServiceName = null;
- }
-
- public void start() {
- getClientEventListenerRemoteReference();
- }
-
- public void stop() {
- if (clientEventListenerRemoteReference != null) {
- ServiceDataStore.getEclipseInstance(EclipseJiniClassloader.getInstance()).removeListener(this);
- }
- reset();
- }
-
- public ISkynetEventListener getClientEventListenerRemoteReference() {
- checkJiniRegistration();
- return clientEventListenerRemoteReference;
- }
-
- public void checkJiniRegistration() {
- if (clientEventListenerRemoteReference == null) {
- try {
- // We need to trigger authentication before attempting to get database information from client session manager.
- UserManager.getUser();
- acceptableServiceName =
- ClientSessionManager.getDataStoreName() + ":" + ClientSessionManager.getDataStoreLoginName();
- clientEventListenerRemoteReference =
- (ISkynetEventListener) OseeJini.getRemoteReference(clientEventListener);
- } catch (Exception ex) {
- OseeLog.log(Activator.class, Level.SEVERE, ex);
- clientEventListenerRemoteReference = null;
- }
-
- if (clientEventListenerRemoteReference != null) {
- ServiceDataStore.getEclipseInstance(EclipseJiniClassloader.getInstance()).addListener(this,
- ISkynetEventService.class);
- }
- }
- }
-
- private ISkynetEventService getReference() {
- return currentEventService;
- }
-
- public boolean isValid() {
- return isValidService(currentEventService);
- }
-
- public void reset() {
- setEventService(null);
- }
-
- public void kick(ISkynetEvent[] events, ISkynetEventListener... except) {
- try {
- getReference().kick(events, except);
- } catch (ExportException ex) {
- OseeLog.log(Activator.class, Level.SEVERE, ex);
- } catch (RemoteException ex) {
- disconnectService(ex);
- }
- }
-
- private boolean isValidService(ISkynetEventService service) {
- boolean result = false;
- try {
- if (service != null) {
- result = service.isAlive();
- }
- } catch (Exception ex) {
- // Do Nothing
- result = false;
- }
- return result;
- }
-
- private synchronized void setEventService(ISkynetEventService service) {
- if (isValidService(currentEventService)) {
- try {
- currentEventService.deregister(getClientEventListenerRemoteReference());
- } catch (RemoteException ex) {
- OseeLog.log(Activator.class, Level.SEVERE, ex);
- }
- }
- currentEventService = service;
- }
-
- private void disconnectService(Exception e) {
- OseeLog.log(Activator.class, Level.WARNING, "Skynet Event Service connection lost\n" + e.toString(), e);
- setEventService(null);
- try {
- OseeEventManager.kickLocalRemEvent(this, RemoteEventServiceEventType.Rem1_DisConnected);
- } catch (OseeCoreException ex) {
- OseeLog.log(Activator.class, Level.SEVERE, ex);
- }
- }
-
- private void connectToService(ISkynetEventService service) {
- try {
- ISkynetEventListener clientListener = getClientEventListenerRemoteReference();
- if (clientListener != null) {
- service.register(clientListener);
- setEventService(service);
- OseeLog.log(Activator.class, Level.INFO,
- "Skynet Event Service connection established " + acceptableServiceName);
- OseeEventManager.kickLocalRemEvent(this, RemoteEventServiceEventType.Rem1_Connected);
- } else {
- OseeLog.log(Activator.class, Level.SEVERE, "Client listener reference was null");
- }
- } catch (Exception ex) {
- OseeLog.log(Activator.class, Level.SEVERE, ex);
- }
- }
-
- @Override
- public void serviceAdded(ServiceItem serviceItem) {
- if (serviceItem.service instanceof ISkynetEventService) {
- ISkynetEventService service = (ISkynetEventService) serviceItem.service;
- if (isValidService(service)) {
- // Check if the service is for the database we are using
- for (Entry entry : serviceItem.attributeSets) {
- if (entry instanceof SimpleFormattedEntry) {
- SimpleFormattedEntry simpleEntry = (SimpleFormattedEntry) entry;
- if ("db".equals(simpleEntry.name) && acceptableServiceName.equals(simpleEntry.value)) {
- connectToService(service);
- break;
- }
- }
- }
- }
- }
- }
-
- @Override
- public void serviceChanged(ServiceItem serviceItem) {
- serviceAdded(serviceItem);
- }
-
- @Override
- public void serviceRemoved(ServiceItem serviceItem) {
- // do nothing
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/systems/ResMessagingConnectionListener.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/systems/ResMessagingConnectionListener.java
index 2519335288..02d40196ad 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/systems/ResMessagingConnectionListener.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/systems/ResMessagingConnectionListener.java
@@ -19,7 +19,7 @@ import org.eclipse.osee.framework.skynet.core.event.EventSystemPreferences;
import org.eclipse.osee.framework.skynet.core.event.EventUtil;
import org.eclipse.osee.framework.skynet.core.event.OseeEventManager;
import org.eclipse.osee.framework.skynet.core.event.model.RemoteEventServiceEventType;
-import org.eclipse.osee.framework.skynet.core.event.systems.InternalEventManager2.ConnectionStatus;
+import org.eclipse.osee.framework.skynet.core.event.systems.InternalEventManager.ConnectionStatus;
import org.eclipse.osee.framework.skynet.core.internal.Activator;
/**
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/OseeEventSystemServiceRegHandler.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/OseeEventSystemServiceRegHandler.java
index 8677bf93c1..94a6822565 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/OseeEventSystemServiceRegHandler.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/OseeEventSystemServiceRegHandler.java
@@ -25,7 +25,7 @@ import org.eclipse.osee.framework.skynet.core.event.listener.IEventListener;
import org.eclipse.osee.framework.skynet.core.event.model.RemoteEventServiceEventType;
import org.eclipse.osee.framework.skynet.core.event.systems.EventManagerData;
import org.eclipse.osee.framework.skynet.core.event.systems.EventManagerFactory;
-import org.eclipse.osee.framework.skynet.core.event.systems.InternalEventManager2;
+import org.eclipse.osee.framework.skynet.core.event.systems.InternalEventManager;
import org.eclipse.osee.framework.skynet.core.event.systems.ResMessagingConnectionListener;
import org.osgi.framework.BundleContext;
@@ -59,7 +59,7 @@ public class OseeEventSystemServiceRegHandler extends AbstractTrackingHandler {
EventManagerFactory factory = new EventManagerFactory();
- InternalEventManager2 eventManager = null;
+ InternalEventManager eventManager = null;
connectionStatusListener = new ResMessagingConnectionListener(eventManagerData.getPreferences());
eventManager =
factory.createNewEventManager(coreModelEventService, eventManagerData.getPreferences(),
@@ -101,7 +101,7 @@ public class OseeEventSystemServiceRegHandler extends AbstractTrackingHandler {
public void onDeActivate() {
removeCoreListeners();
- InternalEventManager2 eventManager = eventManagerData.getMessageEventManager();
+ InternalEventManager eventManager = eventManagerData.getMessageEventManager();
if (eventManager != null) {
coreModelEventService.removeConnectionListener(connectionStatusListener);
eventManager.stop();

Back to the top