| New file |
| 0,0 → 1,95 |
| package org.ow2.chameleon.rose.admin; |
| |
| import java.util.Collection; |
| import java.util.Collections; |
| import java.util.Map; |
| import java.util.Vector; |
| |
| import org.osgi.framework.Bundle; |
| import org.osgi.framework.BundleContext; |
| import org.osgi.framework.ServiceFactory; |
| import org.osgi.framework.ServiceReference; |
| import org.osgi.framework.ServiceRegistration; |
| import org.osgi.service.remoteserviceadmin.EndpointDescription; |
| import org.osgi.service.remoteserviceadmin.ExportReference; |
| import org.osgi.service.remoteserviceadmin.ExportRegistration; |
| import org.osgi.service.remoteserviceadmin.ImportReference; |
| import org.osgi.service.remoteserviceadmin.ImportRegistration; |
| import org.osgi.service.remoteserviceadmin.RemoteServiceAdmin; |
| import org.ow2.chameleon.rose.server.EndpointFactory; |
| |
| /** |
| * |
| * @see org.osgi.service.remoteserviceadmin.RemoteServiceAdmin |
| * @author barjo |
| */ |
| public class RemoteAdminFactory implements ServiceFactory { |
| |
| private BundleContext context; //set in the constructor |
| |
| private ServiceRegistration registration; //set within the start callback |
| |
| private EndpointFactory efactory; //injected by iPOJO |
| |
| |
| |
| // private Set<ExportReference> |
| |
| |
| |
| |
| //----------------------------- |
| // Component life-cycle methods |
| //----------------------------- |
| |
| |
| public RemoteAdminFactory(BundleContext pContext) { |
| context = pContext; |
| } |
| |
| /** |
| * On validate callback. |
| * Called by iPOJO. |
| */ |
| @SuppressWarnings("unused") |
| private void start(){ |
| |
| //Registered itself as a ServiceFactory of a RemoteServiceAdmin |
| registration = context.registerService(RemoteServiceAdmin.class.getName(), this, null); |
| } |
| |
| /** |
| * On invalidate callback. |
| * Called by iPOJO. |
| */ |
| @SuppressWarnings("unused") |
| private void stop(){ |
| |
| //Unregister the ServiceFactory |
| registration.unregister(); |
| } |
| |
| //----------------------------- |
| // RemoteServiceAdmin Factory methods |
| //----------------------------- |
| |
| public Object getService(Bundle bundle, ServiceRegistration registration) { |
| // TODO Auto-generated method stub |
| return null; |
| } |
| |
| public void ungetService(Bundle bundle, ServiceRegistration registration, |
| Object service) { |
| // TODO Auto-generated method stub |
| |
| } |
| |
| |
| public Collection<ExportReference> exportService( |
| ServiceReference reference, Map<String, Object> properties) { |
| // TODO Auto-generated method stub |
| return null; |
| } |
| |
| |
| } |
| Property changes: |
| Added: svn:eol-style |
| + native |