Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrbrooks2010-07-24 17:38:31 +0000
committerrbrooks2010-07-24 17:38:31 +0000
commit4081f04850d3eff9eb1bd7241763707bfbb43a45 (patch)
tree258620df94d4b24077ff103a6c4dea9cb78493fb /plugins/org.eclipse.osee.framework.jini
parent4ed8bddc791fda93940f238c5135556a07041dc0 (diff)
downloadorg.eclipse.osee-4081f04850d3eff9eb1bd7241763707bfbb43a45.tar.gz
org.eclipse.osee-4081f04850d3eff9eb1bd7241763707bfbb43a45.tar.xz
org.eclipse.osee-4081f04850d3eff9eb1bd7241763707bfbb43a45.zip
applied Eclipse source cleanup
Diffstat (limited to 'plugins/org.eclipse.osee.framework.jini')
-rw-r--r--plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/ExperimentalLookup.java9
-rw-r--r--plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/JiniClassServer.java12
-rw-r--r--plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/JiniLookupPlatformRunnable.java2
-rw-r--r--plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/JiniPlugin.java1
-rw-r--r--plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/discovery/EclipseBundleClassloader.java6
-rw-r--r--plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/discovery/EclipseJiniClassloader.java10
-rw-r--r--plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/discovery/OseeJiniConfiguration.java5
-rw-r--r--plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/discovery/RelaxedSecurity.java2
-rw-r--r--plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/discovery/ServiceDataStore.java27
-rw-r--r--plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/event/RemoteEventHandler.java5
-rw-r--r--plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/event/RemoteEventListener.java1
-rw-r--r--plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/event/old/ArtifactModifiedEventListener.java1
-rw-r--r--plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/event/old/ArtifactModifiedRemoteType.java4
-rw-r--r--plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/event/old/OseeRemoteEventInstance.java8
-rw-r--r--plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/event/old/PopupEventType.java2
-rw-r--r--plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/lease/LeaseData.java2
-rw-r--r--plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/lease/OseeLease.java18
-rw-r--r--plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/lease/OseeLeaseGrantor.java37
-rw-r--r--plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/lease/OseeLeaseRenewer.java8
-rw-r--r--plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/FormmatedEntry.java5
-rw-r--r--plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/GroupEntry.java6
-rw-r--r--plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/HostEntry.java1
-rw-r--r--plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/JiniJoinManager.java26
-rw-r--r--plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/JiniService.java9
-rw-r--r--plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/KillService.java3
-rw-r--r--plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/OwnerEntry.java1
-rw-r--r--plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/SimpleFormattedEntry.java1
-rw-r--r--plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/VersionEntry.java6
-rw-r--r--plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/util/OseeJini.java4
-rw-r--r--plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/util/RemotePrintStream.java12
-rw-r--r--plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/utility/StartJini.java17
31 files changed, 163 insertions, 88 deletions
diff --git a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/ExperimentalLookup.java b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/ExperimentalLookup.java
index 7ffca6fdd3..bc38539dd4 100644
--- a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/ExperimentalLookup.java
+++ b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/ExperimentalLookup.java
@@ -57,10 +57,10 @@ public class ExperimentalLookup implements ServiceDiscoveryListener, DiscoveryLi
try {
lookupDiscoveryManager = new LookupDiscoveryManager(new String[] {}, null, this, new OseeJiniConfiguration());
serviceDiscoveryManager =
- new ServiceDiscoveryManager(lookupDiscoveryManager, null, new OseeJiniConfiguration());
+ new ServiceDiscoveryManager(lookupDiscoveryManager, null, new OseeJiniConfiguration());
lookupCache =
- serviceDiscoveryManager.createLookupCache(new ServiceTemplate(null, new Class[] {}, null), null, this);
+ serviceDiscoveryManager.createLookupCache(new ServiceTemplate(null, new Class[] {}, null), null, this);
} catch (RemoteException anRE) {
System.err.println("Failed to setup cache - exiting");
@@ -85,6 +85,7 @@ public class ExperimentalLookup implements ServiceDiscoveryListener, DiscoveryLi
return lookupDiscoveryManager.getGroups();
}
+ @Override
public synchronized void serviceAdded(ServiceDiscoveryEvent event) {
try {
ServiceItem item = event.getPostEventServiceItem();
@@ -113,6 +114,7 @@ public class ExperimentalLookup implements ServiceDiscoveryListener, DiscoveryLi
}
}
+ @Override
public void serviceRemoved(ServiceDiscoveryEvent event) {
ServiceItem item = event.getPreEventServiceItem();
System.out.println("service removed:\n\tid = " + item.serviceID);
@@ -137,10 +139,12 @@ public class ExperimentalLookup implements ServiceDiscoveryListener, DiscoveryLi
}
}
+ @Override
public void serviceChanged(ServiceDiscoveryEvent event) {
}
+ @Override
public synchronized void discovered(DiscoveryEvent event) {
for (ServiceRegistrar registrar : event.getRegistrars()) {
System.out.println("Lookup Discovered: Service ID= " + registrar.getServiceID());
@@ -155,6 +159,7 @@ public class ExperimentalLookup implements ServiceDiscoveryListener, DiscoveryLi
}
+ @Override
public void discarded(DiscoveryEvent arg0) {
}
diff --git a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/JiniClassServer.java b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/JiniClassServer.java
index fb0a3bed36..9e4c305abe 100644
--- a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/JiniClassServer.java
+++ b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/JiniClassServer.java
@@ -21,8 +21,8 @@ public class JiniClassServer {
private static JiniClassServer myself;
private final ClassServer classServer;
- private String hostName;
- private String url;
+ private final String hostName;
+ private final String url;
private JiniClassServer() throws Exception {
hostName = InetAddress.getLocalHost().getHostAddress();
@@ -48,7 +48,9 @@ public class JiniClassServer {
* @throws Exception If there was an error creating a socket on localhost.
*/
public static JiniClassServer getInstance() throws Exception {
- if (myself == null || myself.classServer == null) myself = new JiniClassServer();
+ if (myself == null || myself.classServer == null) {
+ myself = new JiniClassServer();
+ }
return myself;
}
@@ -74,7 +76,9 @@ public class JiniClassServer {
* Stops the class server, if one was started
*/
public static void stopServer() {
- if (myself != null && myself.classServer != null) myself.classServer.terminate();
+ if (myself != null && myself.classServer != null) {
+ myself.classServer.terminate();
+ }
}
/**
diff --git a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/JiniLookupPlatformRunnable.java b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/JiniLookupPlatformRunnable.java
index 1b6d3ffe14..85c86b9f43 100644
--- a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/JiniLookupPlatformRunnable.java
+++ b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/JiniLookupPlatformRunnable.java
@@ -46,6 +46,7 @@ public class JiniLookupPlatformRunnable implements IApplication {
return url.openStream();
}
+ @Override
public Object start(IApplicationContext context) throws Exception {
String[] inputArgs = Platform.getApplicationArgs();
CmdLineArgs args = new CmdLineArgs(inputArgs);
@@ -59,6 +60,7 @@ public class JiniLookupPlatformRunnable implements IApplication {
return IApplication.EXIT_OK;
}
+ @Override
public void stop() {
if (jiniService != null) {
try {
diff --git a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/JiniPlugin.java b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/JiniPlugin.java
index 549be1ffd9..abb7bc0936 100644
--- a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/JiniPlugin.java
+++ b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/JiniPlugin.java
@@ -38,6 +38,7 @@ public class JiniPlugin extends Plugin {
/**
* This method is called when the plug-in is stopped
*/
+ @Override
public void stop(BundleContext context) throws Exception {
super.stop(context);
plugin = null;
diff --git a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/discovery/EclipseBundleClassloader.java b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/discovery/EclipseBundleClassloader.java
index 231b292da7..e5640922e0 100644
--- a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/discovery/EclipseBundleClassloader.java
+++ b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/discovery/EclipseBundleClassloader.java
@@ -27,8 +27,8 @@ import org.osgi.framework.Bundle;
* @author Andrew M. Finkbeiner
*/
public class EclipseBundleClassloader extends ClassLoader {
- private Map<String, Class<?>> classesloaded;
- private Map<String, Bundle> bundleLoaded;
+ private final Map<String, Class<?>> classesloaded;
+ private final Map<String, Bundle> bundleLoaded;
public EclipseBundleClassloader(List<String> bundleNames) {
this(bundleNames, EclipseBundleClassloader.class.getClassLoader());
@@ -56,6 +56,7 @@ public class EclipseBundleClassloader extends ClassLoader {
bundleLoaded.put(bundle.getSymbolicName(), bundle);
}
+ @Override
protected synchronized Class<?> findClass(String classname) throws ClassNotFoundException {
Class<?> loadedclass = classesloaded.get(classname);
if (loadedclass != null) {
@@ -80,6 +81,7 @@ public class EclipseBundleClassloader extends ClassLoader {
return this.getParent().loadClass(classname);
}
+ @Override
@SuppressWarnings("unchecked")
public Class loadClass(String classname) throws ClassNotFoundException {
return loadClass(classname, false);
diff --git a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/discovery/EclipseJiniClassloader.java b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/discovery/EclipseJiniClassloader.java
index f8025dc88b..a8c8348f55 100644
--- a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/discovery/EclipseJiniClassloader.java
+++ b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/discovery/EclipseJiniClassloader.java
@@ -28,9 +28,9 @@ import org.osgi.framework.Bundle;
*/
public class EclipseJiniClassloader extends ClassLoader {
private static EclipseJiniClassloader singleton;
- private Map<String, Class<?>> classesloaded;
+ private final Map<String, Class<?>> classesloaded;
private Map<String, String> registrationMap;
- private List<String> bundleList;
+ private final List<String> bundleList;
public static EclipseJiniClassloader getInstance() {
if (singleton == null) {
@@ -46,7 +46,7 @@ public class EclipseJiniClassloader extends ClassLoader {
bundleList.add("net.jini");
IExtensionPoint point =
- Platform.getExtensionRegistry().getExtensionPoint("org.eclipse.osee.framework.jini.JiniInterface");
+ Platform.getExtensionRegistry().getExtensionPoint("org.eclipse.osee.framework.jini.JiniInterface");
IExtension[] extensions = point.getExtensions();
for (IExtension extension : extensions) {
IConfigurationElement[] elements = extension.getConfigurationElements();
@@ -71,7 +71,7 @@ public class EclipseJiniClassloader extends ClassLoader {
bundleList.add("net.jini");
IExtensionPoint point =
- Platform.getExtensionRegistry().getExtensionPoint("org.eclipse.osee.framework.jini.JiniInterface");
+ Platform.getExtensionRegistry().getExtensionPoint("org.eclipse.osee.framework.jini.JiniInterface");
IExtension[] extensions = point.getExtensions();
for (IExtension extension : extensions) {
IConfigurationElement[] elements = extension.getConfigurationElements();
@@ -98,7 +98,7 @@ public class EclipseJiniClassloader extends ClassLoader {
}
if (registrationMap.containsKey(classname)) {
- String bundleName = (String) registrationMap.get(classname);
+ String bundleName = registrationMap.get(classname);
Bundle bundle = Platform.getBundle(bundleName);
try {
Class<?> foundclass = bundle.loadClass(classname);
diff --git a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/discovery/OseeJiniConfiguration.java b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/discovery/OseeJiniConfiguration.java
index 85195221bd..bed42f1738 100644
--- a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/discovery/OseeJiniConfiguration.java
+++ b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/discovery/OseeJiniConfiguration.java
@@ -18,7 +18,7 @@ import net.jini.config.ConfigurationProvider;
* @author Andrew M. Finkbeiner
*/
public class OseeJiniConfiguration implements Configuration {
- private Configuration config;
+ private final Configuration config;
public OseeJiniConfiguration() throws ConfigurationException {
config = ConfigurationProvider.getInstance(null);
@@ -30,17 +30,20 @@ public class OseeJiniConfiguration implements Configuration {
}
+ @Override
@SuppressWarnings("unchecked")
public Object getEntry(String arg0, String arg1, Class arg2) throws ConfigurationException {
return config.getEntry(arg0, arg1, arg2);
}
+ @Override
@SuppressWarnings("unchecked")
public Object getEntry(String arg0, String arg1, Class arg2, Object arg3) throws ConfigurationException {
Object o = config.getEntry(arg0, arg1, arg2, arg3);
return o;
}
+ @Override
@SuppressWarnings("unchecked")
public Object getEntry(String arg0, String arg1, Class arg2, Object arg3, Object arg4) throws ConfigurationException {
return config.getEntry(arg0, arg1, arg2, arg3, arg4);
diff --git a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/discovery/RelaxedSecurity.java b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/discovery/RelaxedSecurity.java
index 725f11ef3d..c60d7b1e42 100644
--- a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/discovery/RelaxedSecurity.java
+++ b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/discovery/RelaxedSecurity.java
@@ -25,10 +25,12 @@ public class RelaxedSecurity extends SecurityManager {
super();
}
+ @Override
public void checkPermission(Permission perm) {
return;
}
+ @Override
public void checkPermission(Permission perm, Object context) {
return;
}
diff --git a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/discovery/ServiceDataStore.java b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/discovery/ServiceDataStore.java
index 25c6746432..7dbd853d5c 100644
--- a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/discovery/ServiceDataStore.java
+++ b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/discovery/ServiceDataStore.java
@@ -95,15 +95,15 @@ public class ServiceDataStore implements ServiceDiscoveryListener, DiscoveryList
String[] filterGroups = JiniLookupGroupConfig.getOseeJiniServiceGroups();
if (filterGroups == null) {
logger.log(
- Level.SEVERE,
- "[-D" + OseeProperties.getOseeJiniServiceGroups() + "] was not set.\n" + "Please enter the Jini Group this service register with.");
+ Level.SEVERE,
+ "[-D" + OseeProperties.getOseeJiniServiceGroups() + "] was not set.\n" + "Please enter the Jini Group this service register with.");
System.exit(1);
}
LookupLocator[] locator = null;
lookupDiscoveryManager = new LookupDiscoveryManager(filterGroups, locator, this, new OseeJiniConfiguration());
serviceDiscoveryManager =
- new ServiceDiscoveryManager(lookupDiscoveryManager, null, new OseeJiniConfiguration());
+ new ServiceDiscoveryManager(lookupDiscoveryManager, null, new OseeJiniConfiguration());
// We will maintain our own cache, so this call just registers
// ourselves for lookup
@@ -160,13 +160,9 @@ public class ServiceDataStore implements ServiceDiscoveryListener, DiscoveryList
LookupLocator locator = new LookupLocator(host);
return locator.getRegistrar(5000);
/*
- if (lookupDiscoveryManager.getFrom(reg) == LookupDiscoveryManager.FROM_GROUP || compareGroups(reg)) {
- if (reg != null) {
- return locator;
- }
- }
- return null;
- */
+ * if (lookupDiscoveryManager.getFrom(reg) == LookupDiscoveryManager.FROM_GROUP || compareGroups(reg)) { if (reg
+ * != null) { return locator; } } return null;
+ */
}
private class LookupList extends Thread {
@@ -289,7 +285,7 @@ public class ServiceDataStore implements ServiceDiscoveryListener, DiscoveryList
try {
Thread.currentThread().setContextClassLoader(ExportClassLoader.getInstance());
lookupCaches.put(classType, serviceDiscoveryManager.createLookupCache(new ServiceTemplate(null,
- new Class[] {classType}, null), null, this));
+ new Class[] {classType}, null), null, this));
} finally {
Thread.currentThread().setContextClassLoader(currentContext);
}
@@ -555,6 +551,7 @@ public class ServiceDataStore implements ServiceDiscoveryListener, DiscoveryList
return false;
}
+ @Override
public synchronized void serviceAdded(ServiceDiscoveryEvent event) {
try {
if (!findServiceId(serviceItemList, event.getPostEventServiceItem().serviceID, false)) {
@@ -576,6 +573,7 @@ public class ServiceDataStore implements ServiceDiscoveryListener, DiscoveryList
}
}
+ @Override
public void serviceRemoved(ServiceDiscoveryEvent event) {
if (findServiceId(serviceItemList, event.getPreEventServiceItem().serviceID, true)) {
notifyServiceRemoved(event.getPreEventServiceItem());
@@ -590,12 +588,14 @@ public class ServiceDataStore implements ServiceDiscoveryListener, DiscoveryList
}
}
+ @Override
public void serviceChanged(ServiceDiscoveryEvent event) {
if (findServiceId(serviceItemList, event.getPostEventServiceItem().serviceID, false)) {
notifyServiceChanged(event.getPostEventServiceItem());
}
}
+ @Override
public void discovered(DiscoveryEvent arg0) {
synchronized (serviceRegistrars) {
ServiceRegistrar[] reggies = arg0.getRegistrars();
@@ -633,6 +633,7 @@ public class ServiceDataStore implements ServiceDiscoveryListener, DiscoveryList
}
+ @Override
public void discarded(DiscoveryEvent arg0) {
synchronized (serviceRegistrars) {
ServiceRegistrar[] reggies = arg0.getRegistrars();
@@ -664,8 +665,8 @@ public class ServiceDataStore implements ServiceDiscoveryListener, DiscoveryList
/**
* @param lookupList
* @param addToLocators - If true, adds the lookupList to the 'global' lookup list such that a refresh will try to
- * locate the service again. This is provided primarily as an optimization for when this routine is called
- * from refresh().
+ * locate the service again. This is provided primarily as an optimization for when this routine is called from
+ * refresh().
*/
private void addLookupLocators(Collection<String> lookupList, boolean addToLocators) {
boolean isEnabled = OseeProperties.isOseeJiniForcedReggieSearchEnabled();
diff --git a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/event/RemoteEventHandler.java b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/event/RemoteEventHandler.java
index f1b245f510..47b2bb0b1a 100644
--- a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/event/RemoteEventHandler.java
+++ b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/event/RemoteEventHandler.java
@@ -22,19 +22,24 @@ import org.eclipse.osee.framework.jini.event.old.IOseeRemoteSubscriber;
*/
public class RemoteEventHandler implements IServiceLookupListener, IOseeRemoteSubscriber {
+ @Override
public void serviceAdded(ServiceItem serviceItem) {
}
+ @Override
public void serviceChanged(ServiceItem serviceItem) {
}
+ @Override
public void serviceRemoved(ServiceItem serviceItem) {
}
+ @Override
public boolean receiveEventType(String event) throws RemoteException {
return false;
}
+ @Override
public boolean receiveEventGuid(String event) throws RemoteException {
return false;
}
diff --git a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/event/RemoteEventListener.java b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/event/RemoteEventListener.java
index 9f463eef0d..5fd5086508 100644
--- a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/event/RemoteEventListener.java
+++ b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/event/RemoteEventListener.java
@@ -15,6 +15,7 @@ package org.eclipse.osee.framework.jini.event;
*/
public class RemoteEventListener implements IRemoteEventListener {
+ @Override
public void notify(String event) {
}
diff --git a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/event/old/ArtifactModifiedEventListener.java b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/event/old/ArtifactModifiedEventListener.java
index b30c4ac149..315e30d0f9 100644
--- a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/event/old/ArtifactModifiedEventListener.java
+++ b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/event/old/ArtifactModifiedEventListener.java
@@ -12,6 +12,7 @@ package org.eclipse.osee.framework.jini.event.old;
public class ArtifactModifiedEventListener implements IOseeRemoteEventListener {
+ @Override
public void notify(OseeRemoteEvent event) {
if (event.eventData.getEventType().equals(ArtifactModifiedRemoteType.class.getCanonicalName())) {
diff --git a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/event/old/ArtifactModifiedRemoteType.java b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/event/old/ArtifactModifiedRemoteType.java
index 0be8a39e18..cfe0a42e5b 100644
--- a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/event/old/ArtifactModifiedRemoteType.java
+++ b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/event/old/ArtifactModifiedRemoteType.java
@@ -19,8 +19,8 @@ package org.eclipse.osee.framework.jini.event.old;
public class ArtifactModifiedRemoteType extends OseeRemoteEventInstance {
private static final long serialVersionUID = 1665518299340674326L;
- private String guid;
- private String type;
+ private final String guid;
+ private final String type;
public ArtifactModifiedRemoteType(String eventGuid, String changedGuid, String type) {
super(eventGuid);
diff --git a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/event/old/OseeRemoteEventInstance.java b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/event/old/OseeRemoteEventInstance.java
index 627447d606..974c1a5757 100644
--- a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/event/old/OseeRemoteEventInstance.java
+++ b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/event/old/OseeRemoteEventInstance.java
@@ -16,13 +16,17 @@ import java.io.Serializable;
* This class provides all that is needed for sending RemoteEvents. It should be extended for each specific type of
* event.
* <p>
- * Listeners can subscribe using <code>&lt;SubClass&gt;.class.getCanonicalName()</code> as the event type ID (unless
- * the subclass overrides getEventType()).
+ * Listeners can subscribe using <code>&lt;SubClass&gt;.class.getCanonicalName()</code> as the event type ID (unless the
+ * subclass overrides getEventType()).
*
* @author David Diepenbrock
*/
public abstract class OseeRemoteEventInstance implements Serializable {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -2226670843874819289L;
public final String eventGuid;
private final Class<? extends OseeRemoteEventInstance> myClass;
diff --git a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/event/old/PopupEventType.java b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/event/old/PopupEventType.java
index 424f7316d5..57716bd5fe 100644
--- a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/event/old/PopupEventType.java
+++ b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/event/old/PopupEventType.java
@@ -19,7 +19,7 @@ package org.eclipse.osee.framework.jini.event.old;
public class PopupEventType extends OseeRemoteEventInstance {
private static final long serialVersionUID = 8818248591835649870L;
- private String message;
+ private final String message;
public PopupEventType(String eventGuid, String message) {
super(eventGuid);
diff --git a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/lease/LeaseData.java b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/lease/LeaseData.java
index 4fc81ba93e..4e324e3470 100644
--- a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/lease/LeaseData.java
+++ b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/lease/LeaseData.java
@@ -26,7 +26,7 @@ public class LeaseData {
}
/* package */void setStartTime() {
- this.startTime = (System.currentTimeMillis());
+ this.startTime = System.currentTimeMillis();
}
public long getDuration() {
diff --git a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/lease/OseeLease.java b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/lease/OseeLease.java
index 895683e2a6..ad4c873d08 100644
--- a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/lease/OseeLease.java
+++ b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/lease/OseeLease.java
@@ -22,8 +22,8 @@ public class OseeLease implements Lease, Serializable {
private static final long serialVersionUID = -2821773288662499183L;
- private ILeaseGrantor leaseManager;
- private Object myConsumer;
+ private final ILeaseGrantor leaseManager;
+ private final Object myConsumer;
private int serialFormat = Lease.DURATION;
private long duration;
@@ -36,10 +36,12 @@ public class OseeLease implements Lease, Serializable {
leaseManager = manager;
}
+ @Override
public long getExpiration() {
return duration + startTime;
}
+ @Override
public void cancel() throws UnknownLeaseException, RemoteException {
leaseManager.cancelRequest(this, myConsumer);
}
@@ -47,6 +49,7 @@ public class OseeLease implements Lease, Serializable {
/**
* Requests that the lease be renewed.
*/
+ @Override
public void renew(long durationFromNow) throws LeaseDeniedException, UnknownLeaseException, RemoteException {
System.out.println("Requesting Lease Renewal: @" + new Date());
leaseManager.renewRequest(this, myConsumer, duration);
@@ -61,23 +64,28 @@ public class OseeLease implements Lease, Serializable {
startTime = System.currentTimeMillis();
}
+ @Override
public void setSerialFormat(int leaseFormat) {
- if (leaseFormat == Lease.DURATION)
+ if (leaseFormat == Lease.DURATION) {
serialFormat = Lease.DURATION;
- else if (leaseFormat == Lease.ABSOLUTE)
+ } else if (leaseFormat == Lease.ABSOLUTE) {
serialFormat = Lease.ABSOLUTE;
- else
+ } else {
assert false : leaseFormat;
+ }
}
+ @Override
public int getSerialFormat() {
return serialFormat;
}
+ @Override
public LeaseMap createLeaseMap(long duration) {
return null;
}
+ @Override
public boolean canBatch(Lease lease) {
return false;
}
diff --git a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/lease/OseeLeaseGrantor.java b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/lease/OseeLeaseGrantor.java
index f1039c032e..24863e17e4 100644
--- a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/lease/OseeLeaseGrantor.java
+++ b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/lease/OseeLeaseGrantor.java
@@ -17,10 +17,10 @@ import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
+import java.util.Map.Entry;
import java.util.Set;
import java.util.Timer;
import java.util.TimerTask;
-import java.util.Map.Entry;
import net.jini.core.lease.Lease;
import net.jini.core.lease.LeaseDeniedException;
import net.jini.core.lease.UnknownLeaseException;
@@ -38,10 +38,10 @@ public class OseeLeaseGrantor implements ILeaseGrantor {
public static final long maxDuration = 10 * 60 * 1000; /* 10 minutes */
public static final long minDuration = 2 * 60 * 1000; /* 2 minutes */
private ILeaseGrantor thisRemoteReference;
- private Map<Object, LeaseData> leaseStore;
- private WeakReference<ILeasee> leasee;
- private LeaseChecker leaseChecker;
- private Timer myTimer;
+ private final Map<Object, LeaseData> leaseStore;
+ private final WeakReference<ILeasee> leasee;
+ private final LeaseChecker leaseChecker;
+ private final Timer myTimer;
private boolean cancelTimer;
/**
@@ -81,7 +81,9 @@ public class OseeLeaseGrantor implements ILeaseGrantor {
*/
public void shutdown() {
leaseChecker.cancel();
- if (cancelTimer) myTimer.cancel();
+ if (cancelTimer) {
+ myTimer.cancel();
+ }
}
/**
@@ -107,24 +109,29 @@ public class OseeLeaseGrantor implements ILeaseGrantor {
*
* @see org.eclipse.osee.framework.jini.lease.ILeaseGrantor#renewRequest
*/
+ @Override
public void renewRequest(Lease lease, Object consumer, long duration) throws LeaseDeniedException, UnknownLeaseException, RemoteException {
// debug.report("Lease renewRequest: " + consumer + " @" + new Date());
synchronized (leaseStore) {
LeaseData leaseData = leaseStore.get(consumer);
- if (leaseData == null) throw new LeaseDeniedException("Consumer does not currently hold a lease");
+ if (leaseData == null) {
+ throw new LeaseDeniedException("Consumer does not currently hold a lease");
+ }
if (lease instanceof OseeLease) {
long actualDuration = checkDuration(duration);
leaseData.setDuration(actualDuration);
leaseData.setStartTime();
((OseeLease) lease).setDuration(actualDuration);
- } else
+ } else {
throw new UnknownLeaseException("Unknown Lease Type");
+ }
}
}
+ @Override
public void cancelRequest(Lease lease, Object consumer) throws UnknownLeaseException, RemoteException {
// debug.report("Lease cancelRequest: " + consumer + " @" + new Date());
if (leaseStore.remove(consumer) != null) {
@@ -134,27 +141,31 @@ public class OseeLeaseGrantor implements ILeaseGrantor {
public boolean isLeaseExpired(Object consumer) {
LeaseData leaseData = leaseStore.get(consumer);
- if (leaseData != null) return leaseData.isExpired();
+ if (leaseData != null) {
+ return leaseData.isExpired();
+ }
return true;
}
private long checkDuration(long duration) throws LeaseDeniedException {
long actualDuration;
- if (duration > maxDuration)
+ if (duration > maxDuration) {
actualDuration = maxDuration;
- else if (duration >= minDuration)
+ } else if (duration >= minDuration) {
actualDuration = duration;
- else if (duration == Lease.ANY)
+ } else if (duration == Lease.ANY) {
actualDuration = maxDuration;
- else
+ } else {
throw new LeaseDeniedException("Duration too short - must be at least " + minDuration + " milliseconds.");
+ }
return actualDuration;
}
private class LeaseChecker extends TimerTask {
+ @Override
public void run() {
synchronized (leaseStore) {
Set<Entry<Object, LeaseData>> set = leaseStore.entrySet();
diff --git a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/lease/OseeLeaseRenewer.java b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/lease/OseeLeaseRenewer.java
index 18b07b12b2..56405d7d26 100644
--- a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/lease/OseeLeaseRenewer.java
+++ b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/lease/OseeLeaseRenewer.java
@@ -84,7 +84,7 @@ public class OseeLeaseRenewer {
renewer.cancel();
} else {
OseeLog.log(JiniPlugin.class, Level.WARNING,
- this.getClass().getName() + ": Lease Cancel Attempt: Lease Not Found!");
+ this.getClass().getName() + ": Lease Cancel Attempt: Lease Not Found!");
}
if (map.isEmpty()) {
@@ -113,9 +113,9 @@ public class OseeLeaseRenewer {
OseeLog.log(JiniPlugin.class, Level.SEVERE, ex);
}
/*
- * If there was a problem with the lease renewal, retry up until there is less than 250 ms
- * remaining in the lease, at which point we can give up hope. Assuming leases are renewed
- * with 2 minutes remaining & 250 ms for STOP_RETRY_TIME, this will provide 8 attempts.
+ * If there was a problem with the lease renewal, retry up until there is less than 250 ms remaining in the
+ * lease, at which point we can give up hope. Assuming leases are renewed with 2 minutes remaining & 250 ms for
+ * STOP_RETRY_TIME, this will provide 8 attempts.
*/
catch (RemoteException ex) {
long remainingTime = lease.getExpiration() - System.currentTimeMillis();
diff --git a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/FormmatedEntry.java b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/FormmatedEntry.java
index f1e26f497d..e5833cdeaa 100644
--- a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/FormmatedEntry.java
+++ b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/FormmatedEntry.java
@@ -14,5 +14,10 @@ import net.jini.entry.AbstractEntry;
public abstract class FormmatedEntry extends AbstractEntry {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -8845417112982132038L;
+
public abstract String getFormmatedString();
}
diff --git a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/GroupEntry.java b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/GroupEntry.java
index 3f594eb9e4..9d263fd85a 100644
--- a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/GroupEntry.java
+++ b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/GroupEntry.java
@@ -19,6 +19,7 @@ public class GroupEntry extends FormmatedEntry {
group = new String[] {"Public"};
}
+ @Override
public String getFormmatedString() {
String groups = "";
if (group != null) {
@@ -34,8 +35,11 @@ public class GroupEntry extends FormmatedEntry {
return "Group(s): {" + groups + "}";
}
+ @Override
public boolean equals(Object other) {
- if (!(other instanceof GroupEntry)) return false;
+ if (!(other instanceof GroupEntry)) {
+ return false;
+ }
return group.equals(((GroupEntry) other).group);
}
}
diff --git a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/HostEntry.java b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/HostEntry.java
index 60f1bedf00..b4cebcd034 100644
--- a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/HostEntry.java
+++ b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/HostEntry.java
@@ -33,6 +33,7 @@ public class HostEntry extends FormmatedEntry {
return host;
}
+ @Override
public String getFormmatedString() {
return "Host : " + host;
}
diff --git a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/JiniJoinManager.java b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/JiniJoinManager.java
index 3bbc2b5467..b8315e8b39 100644
--- a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/JiniJoinManager.java
+++ b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/JiniJoinManager.java
@@ -48,14 +48,14 @@ public class JiniJoinManager implements IRegistrarListener {
private static final long RENEWAL_TIME = 2 * 60 * 1000; // 2 minutes
// private HashMap<ServiceID, ServiceRegistrar> idToReggie;
- private HashMap<ServiceID, ServiceRegistrar> idToReggie;
+ private final HashMap<ServiceID, ServiceRegistrar> idToReggie;
// private ArrayList<ServiceRegistration> registrations;
- private ArrayList<ServiceRegistration> registrations;
- private Timer renewTimer;
+ private final ArrayList<ServiceRegistration> registrations;
+ private final Timer renewTimer;
private final Remote proxy;
- private Entry[] entry;
- private ServiceID serviceID;
- private ServiceDataStore serviceDataStore;
+ private final Entry[] entry;
+ private final ServiceID serviceID;
+ private final ServiceDataStore serviceDataStore;
public JiniJoinManager(ServiceID serviceID, JiniService js, Entry[] entry) throws IOException {
proxy = OseeJini.getRemoteReference(js);
@@ -115,12 +115,13 @@ public class JiniJoinManager implements IRegistrarListener {
this.registration = registration;
}
+ @Override
public void run() {
try {
// Renew for the maximum amount of time allowed
registration.getLease().renew(Lease.FOREVER);
renewTimer.schedule(new RenewLease(registration),
- registration.getLease().getExpiration() - System.currentTimeMillis() - RENEWAL_TIME);
+ registration.getLease().getExpiration() - System.currentTimeMillis() - RENEWAL_TIME);
} catch (LeaseDeniedException ex) {
// ex.printStackTrace();
} catch (UnknownLeaseException ex) {
@@ -143,9 +144,9 @@ public class JiniJoinManager implements IRegistrarListener {
return serviceDataStore.getGroups();
}
+ @Override
public void reggieAdded(List<ServiceRegistrar> serviceRegistrars) {
- ServiceRegistrar[] reggies =
- (ServiceRegistrar[]) serviceRegistrars.toArray(new ServiceRegistrar[serviceRegistrars.size()]);
+ ServiceRegistrar[] reggies = serviceRegistrars.toArray(new ServiceRegistrar[serviceRegistrars.size()]);
try {
for (int i = 0; i < reggies.length; i++) {
ServiceRegistration registration;
@@ -153,7 +154,7 @@ public class JiniJoinManager implements IRegistrarListener {
idToReggie.put(reggies[i].getServiceID(), reggies[i]);
registrations.add(registration);
renewTimer.schedule(new RenewLease(registration),
- registration.getLease().getExpiration() - System.currentTimeMillis() - RENEWAL_TIME);
+ registration.getLease().getExpiration() - System.currentTimeMillis() - RENEWAL_TIME);
}
} catch (ExportException ex) {
ex.printStackTrace();
@@ -164,14 +165,15 @@ public class JiniJoinManager implements IRegistrarListener {
}
}
+ @Override
public void reggieRemoved(List<ServiceRegistrar> serviceRegistrars) {
- ServiceRegistrar[] reggies =
- (ServiceRegistrar[]) serviceRegistrars.toArray(new ServiceRegistrar[serviceRegistrars.size()]);
+ ServiceRegistrar[] reggies = serviceRegistrars.toArray(new ServiceRegistrar[serviceRegistrars.size()]);
for (int i = 0; i < reggies.length; i++) {
idToReggie.remove(reggies[i].getServiceID());
}
}
+ @Override
public void reggieChanged(List<ServiceRegistrar> serviceRegistrars) {
}
diff --git a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/JiniService.java b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/JiniService.java
index 40339bb3a1..e046cc91a8 100644
--- a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/JiniService.java
+++ b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/JiniService.java
@@ -193,7 +193,7 @@ public abstract class JiniService implements IService {
messageClassServer.addResourceFinder(resource);
messageClassServer.start();
codeBase =
- "http://" + InetAddress.getLocalHost().getCanonicalHostName() + ":" + messageClassServer.getPort() + "/";
+ "http://" + InetAddress.getLocalHost().getCanonicalHostName() + ":" + messageClassServer.getPort() + "/";
hostName = InetAddress.getLocalHost().getHostAddress();
System.setProperty("java.rmi.server.hostname", hostName);
System.setProperty("java.rmi.server.codebase", codeBase);
@@ -218,13 +218,17 @@ public abstract class JiniService implements IService {
}
public void cleanup() {
- if (messageClassServer != null) messageClassServer.terminate();
+ if (messageClassServer != null) {
+ messageClassServer.terminate();
+ }
}
+ @Override
public ServiceID getServiceID() throws RemoteException {
return serviceID;
}
+ @Override
public boolean equals(Object object) {
if (object instanceof JiniService) {
return ((JiniService) object).serviceID.equals(this.serviceID);
@@ -232,6 +236,7 @@ public abstract class JiniService implements IService {
return false;
}
+ @Override
public int hashCode() {
return serviceID.hashCode();
}
diff --git a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/KillService.java b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/KillService.java
index 3ebfb559fa..0e01a2631f 100644
--- a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/KillService.java
+++ b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/KillService.java
@@ -15,12 +15,13 @@ package org.eclipse.osee.framework.jini.service.core;
*/
public class KillService extends Thread {
- private JiniJoinManager mgr;
+ private final JiniJoinManager mgr;
public KillService(JiniJoinManager mgr) {
this.mgr = mgr;
}
+ @Override
public void run() {
try {
mgr.terminate();
diff --git a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/OwnerEntry.java b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/OwnerEntry.java
index fd47d3c32a..d3e7e97a06 100644
--- a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/OwnerEntry.java
+++ b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/OwnerEntry.java
@@ -23,6 +23,7 @@ public class OwnerEntry extends FormmatedEntry {
return owner;
}
+ @Override
public String getFormmatedString() {
return "Owner : " + owner;
}
diff --git a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/SimpleFormattedEntry.java b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/SimpleFormattedEntry.java
index be3ff714c0..793e8e4f02 100644
--- a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/SimpleFormattedEntry.java
+++ b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/SimpleFormattedEntry.java
@@ -34,6 +34,7 @@ public class SimpleFormattedEntry extends FormmatedEntry {
this.value = value;
}
+ @Override
public final String getFormmatedString() {
return name + " : " + value + "\n";
}
diff --git a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/VersionEntry.java b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/VersionEntry.java
index 68efec54d6..caf50bc75d 100644
--- a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/VersionEntry.java
+++ b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/core/VersionEntry.java
@@ -19,12 +19,16 @@ public class VersionEntry extends FormmatedEntry {
version = "1.0.0";
}
+ @Override
public String getFormmatedString() {
return "Version: " + version;
}
+ @Override
public boolean equals(Object other) {
- if (!(other instanceof VersionEntry)) return false;
+ if (!(other instanceof VersionEntry)) {
+ return false;
+ }
return version.equals(((VersionEntry) other).version);
}
diff --git a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/util/OseeJini.java b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/util/OseeJini.java
index 6fd28208c9..448cc2f257 100644
--- a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/util/OseeJini.java
+++ b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/util/OseeJini.java
@@ -37,8 +37,8 @@ public class OseeJini {
public static Remote getRemoteReference(Remote object, InetAddress inetAddress) throws ExportException {
Exporter export =
- new BasicJeriExporter(TcpServerEndpoint.getInstance(inetAddress.getHostAddress(), 0), new BasicILFactory(),
- false, false);
+ new BasicJeriExporter(TcpServerEndpoint.getInstance(inetAddress.getHostAddress(), 0), new BasicILFactory(),
+ false, false);
return export.export(object);
}
diff --git a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/util/RemotePrintStream.java b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/util/RemotePrintStream.java
index 57ddd5cddc..8f67fe3b12 100644
--- a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/util/RemotePrintStream.java
+++ b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/util/RemotePrintStream.java
@@ -19,10 +19,10 @@ import java.rmi.RemoteException;
public class RemotePrintStream extends PrintStream {
- private IRemotePrintTarget target;
- private PipedInputStream pis;
- private StringWriter writer;
- private byte[] buffer;
+ private final IRemotePrintTarget target;
+ private final PipedInputStream pis;
+ private final StringWriter writer;
+ private final byte[] buffer;
public RemotePrintStream(PipedOutputStream os, IRemotePrintTarget target) throws IOException {
super(os, true);
@@ -39,7 +39,9 @@ public class RemotePrintStream extends PrintStream {
try {
read = pis.available();
do {
- if (read > 2048) read = 2048;
+ if (read > 2048) {
+ read = 2048;
+ }
int readbytes = pis.read(buffer, 0, read);
writer.append(new String(buffer, 0, readbytes));
read = pis.available();
diff --git a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/utility/StartJini.java b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/utility/StartJini.java
index b9b7923a7b..554e782d09 100644
--- a/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/utility/StartJini.java
+++ b/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/utility/StartJini.java
@@ -28,11 +28,9 @@ import java.util.List;
import java.util.logging.Level;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-
import net.jini.core.entry.Entry;
import net.jini.lookup.entry.Comment;
import net.jini.lookup.entry.ServiceInfo;
-
import org.eclipse.osee.framework.jdk.core.util.CmdLineArgs;
import org.eclipse.osee.framework.jdk.core.util.Lib;
import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
@@ -73,9 +71,9 @@ public class StartJini extends JiniService {
allowedGroups = Arrays.toString(groups);
} else {
OseeLog.log(
- StartJini.class,
- Level.SEVERE,
- "[-D" + OseeProperties.getOseeJiniServiceGroups() + "] was not set.\nPlease enter the Group(s) this Lookup Server will register with.");
+ StartJini.class,
+ Level.SEVERE,
+ "[-D" + OseeProperties.getOseeJiniServiceGroups() + "] was not set.\nPlease enter the Group(s) this Lookup Server will register with.");
return;
}
String quote = null;
@@ -89,7 +87,7 @@ public class StartJini extends JiniService {
System.out.println("Host Address: " + host);
String javaexeBigMem = quote + javaHome + fs + "bin" + fs + "java" + quote + " -Xmx512M ";
String startServices =
- javaexeBigMem + " -Dlookupcomponent " + " -Dosee.jini.lookup.groups=" + allowedGroups + " " + " -Dosee.jini.install=" + quote + jiniHome + "/jini2_1" + quote + " " + " -Dosee.jini.config=" + quote + jiniHome + "/jini_config" + quote + " " + " -Dosee.classserver.host=" + host + " " + " -Dosee.classserver.port=" + port + " " + " -Djava.security.policy=" + quote + jiniHome + "/jini_config/jsk-all.policy" + quote + " " + " -jar " + quote + jiniHome + "/jini2_1/lib/start.jar" + quote + " " + quote + jiniHome + "/jini_config/start-transient-jeri-services.config" + quote;
+ javaexeBigMem + " -Dlookupcomponent " + " -Dosee.jini.lookup.groups=" + allowedGroups + " " + " -Dosee.jini.install=" + quote + jiniHome + "/jini2_1" + quote + " " + " -Dosee.jini.config=" + quote + jiniHome + "/jini_config" + quote + " " + " -Dosee.classserver.host=" + host + " " + " -Dosee.classserver.port=" + port + " " + " -Djava.security.policy=" + quote + jiniHome + "/jini_config/jsk-all.policy" + quote + " " + " -jar " + quote + jiniHome + "/jini2_1/lib/start.jar" + quote + " " + quote + jiniHome + "/jini_config/start-transient-jeri-services.config" + quote;
OseeLog.log(StartJini.class, Level.INFO, "RUN REGGIE ***************************************************");
OseeLog.log(StartJini.class, Level.INFO, startServices);
@@ -115,8 +113,8 @@ public class StartJini extends JiniService {
String description = "Provides means to shutdown spawned Jini Lookup Services";
this.registerService(new Entry[] {new ServiceInfo("", "", "", "", model, ""), new Comment(description),
- new SimpleFormattedEntry(SPAWNED_REGGIE_SERVICE_ID, reggieServiceId),
- new SimpleFormattedEntry(SPAWNED_REGGIE_ON_HOST, getHostName())}, getHeaders(manifestFile));
+ new SimpleFormattedEntry(SPAWNED_REGGIE_SERVICE_ID, reggieServiceId),
+ new SimpleFormattedEntry(SPAWNED_REGGIE_ON_HOST, getHostName())}, getHeaders(manifestFile));
OseeLog.log(StartJini.class, Level.INFO, "....................Core Jini Service is Alive....................");
this.stayAlive();
@@ -218,7 +216,7 @@ public class StartJini extends JiniService {
new StartJini(args[0], nohup, browser, null, manifestFile);
} else {
OseeLog.log(StartJini.class, Level.INFO,
- "USAGE: -Dosee.jini.lookup.groups=<groups> StartJini <port> ?<-nohup> ?<-browser>");
+ "USAGE: -Dosee.jini.lookup.groups=<groups> StartJini <port> ?<-nohup> ?<-browser>");
}
OseeLog.log(StartJini.class, Level.INFO, "Exiting...");
@@ -234,6 +232,7 @@ public class StartJini extends JiniService {
}
}
+ @Override
public void kill() throws RemoteException {
OseeLog.log(StartJini.class, Level.INFO, "De-registering Core Jini Service...");
deregisterService();

Back to the top