summaryrefslogtreecommitdiffstats
path: root/java/sca/modules
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-08-13 00:15:42 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-08-13 00:15:42 +0000
commit18940688871a0d2f0d98b629b0b388c4dde1cf74 (patch)
tree7e6d0bc4ef53a6e51e1fbd4366e824899c62b0d9 /java/sca/modules
parentc122a7379b57d45d2c994728171d20609842f7c5 (diff)
A few renames of the classes
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@803747 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules')
-rw-r--r--java/sca/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/impl/NodeActivator.java6
-rw-r--r--java/sca/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/discovery/impl/AbstractDiscoveryService.java6
-rw-r--r--java/sca/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/remoteadmin/RemoteServiceAdmin.java (renamed from java/sca/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/remoteadmin/RemoteAdmin.java)2
-rw-r--r--java/sca/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/remoteadmin/impl/OSGiHelper.java (renamed from java/sca/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/remoteadmin/impl/RemoteAdminHelper.java)4
-rw-r--r--java/sca/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/remoteadmin/impl/RemoteControllerImpl.java8
-rw-r--r--java/sca/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/remoteadmin/impl/RemoteServiceAdminImpl.java (renamed from java/sca/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/remoteadmin/impl/RemoteAdminImpl.java)20
6 files changed, 23 insertions, 23 deletions
diff --git a/java/sca/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/impl/NodeActivator.java b/java/sca/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/impl/NodeActivator.java
index 2684bcc2ae..126ffd941a 100644
--- a/java/sca/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/impl/NodeActivator.java
+++ b/java/sca/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/impl/NodeActivator.java
@@ -22,7 +22,7 @@ package org.apache.tuscany.sca.node.osgi.impl;
import static org.apache.tuscany.sca.node.osgi.impl.NodeManager.isSCABundle;
import org.apache.tuscany.sca.osgi.service.discovery.impl.DiscoveryActivator;
-import org.apache.tuscany.sca.osgi.service.remoteadmin.impl.RemoteAdminImpl;
+import org.apache.tuscany.sca.osgi.service.remoteadmin.impl.RemoteServiceAdminImpl;
import org.apache.tuscany.sca.osgi.service.remoteadmin.impl.RemoteControllerImpl;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleActivator;
@@ -39,7 +39,7 @@ public class NodeActivator implements BundleActivator, SynchronousBundleListener
private NodeManager manager;
private DiscoveryActivator discoveryActivator = new DiscoveryActivator();
- private RemoteAdminImpl remoteAdmin;
+ private RemoteServiceAdminImpl remoteAdmin;
private RemoteControllerImpl controller;
private void init() {
@@ -60,7 +60,7 @@ public class NodeActivator implements BundleActivator, SynchronousBundleListener
// FIXME: We should try to avoid aggressive initialization
init();
- remoteAdmin = new RemoteAdminImpl(context);
+ remoteAdmin = new RemoteServiceAdminImpl(context);
remoteAdmin.start();
controller = new RemoteControllerImpl(context);
diff --git a/java/sca/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/discovery/impl/AbstractDiscoveryService.java b/java/sca/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/discovery/impl/AbstractDiscoveryService.java
index d56b25ef40..d6ae4c5bdb 100644
--- a/java/sca/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/discovery/impl/AbstractDiscoveryService.java
+++ b/java/sca/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/discovery/impl/AbstractDiscoveryService.java
@@ -40,7 +40,7 @@ import org.apache.tuscany.sca.node.impl.NodeFactoryImpl;
import org.apache.tuscany.sca.osgi.service.remoteadmin.EndpointDescription;
import org.apache.tuscany.sca.osgi.service.remoteadmin.EndpointListener;
import org.apache.tuscany.sca.osgi.service.remoteadmin.RemoteConstants;
-import org.apache.tuscany.sca.osgi.service.remoteadmin.impl.RemoteAdminHelper;
+import org.apache.tuscany.sca.osgi.service.remoteadmin.impl.OSGiHelper;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.Constants;
@@ -207,7 +207,7 @@ public abstract class AbstractDiscoveryService implements Discovery, LifeCycleLi
}
private boolean filterMatches(String filterValue, EndpointDescription sd) {
- Filter filter = RemoteAdminHelper.createFilter(context, filterValue);
+ Filter filter = OSGiHelper.createFilter(context, filterValue);
Hashtable<String, Object> props = new Hashtable<String, Object>(sd.getProperties());
// Add two faked properties to make the filter match
props.put(Constants.OBJECTCLASS, sd.getInterfaces());
@@ -242,7 +242,7 @@ public abstract class AbstractDiscoveryService implements Discovery, LifeCycleLi
String property,
Map<String, List<EndpointListener>> forwardMap,
Map<EndpointListener, Collection<String>> reverseMap) {
- Collection<String> collection = RemoteAdminHelper.getStringCollection(reference, property);
+ Collection<String> collection = OSGiHelper.getStringCollection(reference, property);
if (logger.isLoggable(Level.FINE)) {
logger.fine("adding listener: " + listener
+ " collection: "
diff --git a/java/sca/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/remoteadmin/RemoteAdmin.java b/java/sca/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/remoteadmin/RemoteServiceAdmin.java
index c1b2f3d826..5057089e7d 100644
--- a/java/sca/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/remoteadmin/RemoteAdmin.java
+++ b/java/sca/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/remoteadmin/RemoteServiceAdmin.java
@@ -36,7 +36,7 @@ import org.osgi.framework.ServiceReference;
* @ThreadSafe
*/
-public interface RemoteAdmin {
+public interface RemoteServiceAdmin {
/**
* Export a service to an endpoint. The Remote Service Admin must create an
* endpoint that can be used by other Distrbution Providers to connect to
diff --git a/java/sca/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/remoteadmin/impl/RemoteAdminHelper.java b/java/sca/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/remoteadmin/impl/OSGiHelper.java
index 7f467854a0..dc69a5c232 100644
--- a/java/sca/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/remoteadmin/impl/RemoteAdminHelper.java
+++ b/java/sca/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/remoteadmin/impl/OSGiHelper.java
@@ -30,8 +30,8 @@ import org.osgi.framework.ServiceReference;
/**
*
*/
-public class RemoteAdminHelper {
- private RemoteAdminHelper() {
+public class OSGiHelper {
+ private OSGiHelper() {
}
/**
diff --git a/java/sca/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/remoteadmin/impl/RemoteControllerImpl.java b/java/sca/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/remoteadmin/impl/RemoteControllerImpl.java
index b7fe173c85..53c9d6fb4a 100644
--- a/java/sca/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/remoteadmin/impl/RemoteControllerImpl.java
+++ b/java/sca/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/remoteadmin/impl/RemoteControllerImpl.java
@@ -49,7 +49,7 @@ import org.apache.tuscany.sca.osgi.service.remoteadmin.EndpointDescription;
import org.apache.tuscany.sca.osgi.service.remoteadmin.EndpointListener;
import org.apache.tuscany.sca.osgi.service.remoteadmin.ExportRegistration;
import org.apache.tuscany.sca.osgi.service.remoteadmin.ImportRegistration;
-import org.apache.tuscany.sca.osgi.service.remoteadmin.RemoteAdmin;
+import org.apache.tuscany.sca.osgi.service.remoteadmin.RemoteServiceAdmin;
import org.apache.tuscany.sca.osgi.service.remoteadmin.RemoteAdminEvent;
import org.apache.tuscany.sca.osgi.service.remoteadmin.RemoteAdminListener;
import org.osgi.framework.Bundle;
@@ -107,7 +107,7 @@ public class RemoteControllerImpl implements ListenerHook, RemoteAdminListener,
}
endpointListener = context.registerService(EndpointListener.class.getName(), this, null);
- remoteAdmins = new ServiceTracker(this.context, RemoteAdmin.class.getName(), null);
+ remoteAdmins = new ServiceTracker(this.context, RemoteServiceAdmin.class.getName(), null);
remoteAdmins.open();
// DO NOT register EventHook.class.getName() as it cannot report existing services
@@ -183,7 +183,7 @@ public class RemoteControllerImpl implements ListenerHook, RemoteAdminListener,
logger.warning("No RemoteAdmin services are available.");
} else {
for (Object ra : admins) {
- RemoteAdmin remoteAdmin = (RemoteAdmin)ra;
+ RemoteServiceAdmin remoteAdmin = (RemoteServiceAdmin)ra;
List<ExportRegistration> exportRegistrations = remoteAdmin.exportService(reference);
if (exportRegistrations != null && !exportRegistrations.isEmpty()) {
exportedServices.putValue(reference, exportRegistrations);
@@ -331,7 +331,7 @@ public class RemoteControllerImpl implements ListenerHook, RemoteAdminListener,
if (admins != null) {
for (Object ra : admins) {
- RemoteAdmin remoteAdmin = (RemoteAdmin)ra;
+ RemoteServiceAdmin remoteAdmin = (RemoteServiceAdmin)ra;
ImportRegistration importRegistration = remoteAdmin.importService(description);
if (importRegistration != null) {
importedServices.putValue(endpoint, importRegistration);
diff --git a/java/sca/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/remoteadmin/impl/RemoteAdminImpl.java b/java/sca/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/remoteadmin/impl/RemoteServiceAdminImpl.java
index f05c17b4dc..325911d916 100644
--- a/java/sca/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/remoteadmin/impl/RemoteAdminImpl.java
+++ b/java/sca/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/remoteadmin/impl/RemoteServiceAdminImpl.java
@@ -27,7 +27,7 @@ import java.util.Map;
import org.apache.tuscany.sca.osgi.service.remoteadmin.EndpointDescription;
import org.apache.tuscany.sca.osgi.service.remoteadmin.ExportRegistration;
import org.apache.tuscany.sca.osgi.service.remoteadmin.ImportRegistration;
-import org.apache.tuscany.sca.osgi.service.remoteadmin.RemoteAdmin;
+import org.apache.tuscany.sca.osgi.service.remoteadmin.RemoteServiceAdmin;
import org.apache.tuscany.sca.osgi.service.remoteadmin.RemoteAdminListener;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
@@ -36,9 +36,9 @@ import org.osgi.framework.ServiceRegistration;
import org.osgi.util.tracker.ServiceTracker;
/**
- * SCA Implementation of {@link RemoteAdmin}
+ * SCA Implementation of {@link RemoteServiceAdmin}
*/
-public class RemoteAdminImpl implements RemoteAdmin {
+public class RemoteServiceAdminImpl implements RemoteServiceAdmin {
private BundleContext context;
private ServiceRegistration registration;
private ServiceTracker listeners;
@@ -49,7 +49,7 @@ public class RemoteAdminImpl implements RemoteAdmin {
private Collection<ImportRegistration> importedEndpoints = new ArrayList<ImportRegistration>();
private Collection<ExportRegistration> exportedServices = new ArrayList<ExportRegistration>();
- public RemoteAdminImpl(BundleContext context) {
+ public RemoteServiceAdminImpl(BundleContext context) {
this.context = context;
}
@@ -58,7 +58,7 @@ public class RemoteAdminImpl implements RemoteAdmin {
this.importer = new OSGiServiceImporter(context);
exporter.start();
importer.start();
- registration = context.registerService(RemoteAdmin.class.getName(), this, null);
+ registration = context.registerService(RemoteServiceAdmin.class.getName(), this, null);
listeners = new ServiceTracker(this.context, RemoteAdminListener.class.getName(), null);
listeners.open();
}
@@ -91,7 +91,7 @@ public class RemoteAdminImpl implements RemoteAdmin {
}
/**
- * @see org.apache.tuscany.sca.osgi.service.remoteadmin.RemoteAdmin#exportService(org.osgi.framework.ServiceReference)
+ * @see org.apache.tuscany.sca.osgi.service.remoteadmin.RemoteServiceAdmin#exportService(org.osgi.framework.ServiceReference)
*/
public List<ExportRegistration> exportService(ServiceReference ref) {
List<ExportRegistration> exportRegistrations = exporter.exportService(ref);
@@ -102,7 +102,7 @@ public class RemoteAdminImpl implements RemoteAdmin {
}
/**
- * @see org.apache.tuscany.sca.osgi.service.remoteadmin.RemoteAdmin#exportService(org.osgi.framework.ServiceReference,
+ * @see org.apache.tuscany.sca.osgi.service.remoteadmin.RemoteServiceAdmin#exportService(org.osgi.framework.ServiceReference,
* java.util.Map)
*/
public List<ExportRegistration> exportService(ServiceReference ref, Map<String, Object> properties) {
@@ -114,21 +114,21 @@ public class RemoteAdminImpl implements RemoteAdmin {
}
/**
- * @see org.apache.tuscany.sca.osgi.service.remoteadmin.RemoteAdmin#getExportedServices()
+ * @see org.apache.tuscany.sca.osgi.service.remoteadmin.RemoteServiceAdmin#getExportedServices()
*/
public Collection<ExportRegistration> getExportedServices() {
return exportedServices;
}
/**
- * @see org.apache.tuscany.sca.osgi.service.remoteadmin.RemoteAdmin#getImportedEndpoints()
+ * @see org.apache.tuscany.sca.osgi.service.remoteadmin.RemoteServiceAdmin#getImportedEndpoints()
*/
public Collection<ImportRegistration> getImportedEndpoints() {
return importedEndpoints;
}
/**
- * @see org.apache.tuscany.sca.osgi.service.remoteadmin.RemoteAdmin#importService(org.apache.tuscany.sca.dosgi.discovery.EndpointDescription)
+ * @see org.apache.tuscany.sca.osgi.service.remoteadmin.RemoteServiceAdmin#importService(org.apache.tuscany.sca.dosgi.discovery.EndpointDescription)
*/
public ImportRegistration importService(EndpointDescription endpoint) {
Bundle bundle = (Bundle) endpoint.getProperties().get(Bundle.class.getName());