diff options
Diffstat (limited to 'sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/remoteserviceadmin/impl/ExportRegistrationImpl.java')
-rw-r--r-- | sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/remoteserviceadmin/impl/ExportRegistrationImpl.java | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/remoteserviceadmin/impl/ExportRegistrationImpl.java b/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/remoteserviceadmin/impl/ExportRegistrationImpl.java index 2335d31020..39cbd7b9e6 100644 --- a/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/remoteserviceadmin/impl/ExportRegistrationImpl.java +++ b/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/remoteserviceadmin/impl/ExportRegistrationImpl.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.osgi.remoteserviceadmin.impl; -import org.apache.tuscany.sca.node.Node; import org.osgi.framework.ServiceReference; import org.osgi.service.remoteserviceadmin.EndpointDescription; import org.osgi.service.remoteserviceadmin.ExportReference; @@ -29,8 +28,7 @@ import org.osgi.service.remoteserviceadmin.ExportRegistration; * Implementation of {@link ExportRegistration} */ public class ExportRegistrationImpl implements ExportRegistration { - private Node node; - private ExportReference exportReference; + private ExportReferenceImpl exportReference; private Throwable exception; /** @@ -38,13 +36,9 @@ public class ExportRegistrationImpl implements ExportRegistration { * @param endpointDescription * @param exception */ - public ExportRegistrationImpl(Node node, - ServiceReference exportedService, - EndpointDescription endpointDescription, - Throwable exception) { + public ExportRegistrationImpl(ExportReferenceImpl exportReference, Throwable exception) { super(); - this.node = node; - this.exportReference = new ExportReferenceImpl(exportedService, endpointDescription); + this.exportReference = exportReference; this.exception = exception; } @@ -52,20 +46,19 @@ public class ExportRegistrationImpl implements ExportRegistration { * @param exportedService * @param endpointDescription */ - public ExportRegistrationImpl(Node node, ServiceReference exportedService, EndpointDescription endpointDescription) { - this(node, exportedService, endpointDescription, null); + public ExportRegistrationImpl(ExportReferenceImpl exportReference) { + this(exportReference, null); } /** * @see org.osgi.remoteserviceadmin.ExportRegistration#close() */ public void close() { - if (node != null) { - node.stop(); - node = null; + if (exportReference != null) { + exportReference.unregister(); } exception = null; - exportReference = new ExportReferenceImpl(null, null); + exportReference = null; } public ServiceReference getExportedService() { @@ -80,10 +73,6 @@ public class ExportRegistrationImpl implements ExportRegistration { return exception; } - public Node getNode() { - return node; - } - public ExportReference getExportReference() throws IllegalStateException { return exportReference; } |