IRemoteServiceContainerAdapter containerAdapter = rsContainer
.getContainerAdapter();
// Register remote service via ECF container adapter to create
// remote service registration
IRemoteServiceRegistration remoteRegistration = null;
if (containerAdapter instanceof IOSGiRemoteServiceContainerAdapter) {
IOSGiRemoteServiceContainerAdapter osgiContainerAdapter = (IOSGiRemoteServiceContainerAdapter) containerAdapter;
remoteRegistration = osgiContainerAdapter.registerRemoteService(
exportedInterfaces, serviceReference, PropertiesUtil
.createDictionaryFromMap(remoteServiceProperties));
} else {
Object service = AccessController
.doPrivileged(new PrivilegedAction<Object>() {
public Object run() {
return getClientBundleContext().getService(
serviceReference);
}
});
remoteRegistration = containerAdapter.registerRemoteService(
exportedInterfaces, service, PropertiesUtil
.createDictionaryFromMap(remoteServiceProperties));
}
endpointDescriptionProperties.put(
org.eclipse.ecf.remoteservice.Constants.SERVICE_ID,
remoteRegistration.getID().getContainerRelativeID());
if (remoteRegistration instanceof IExtendedRemoteServiceRegistration) {
IExtendedRemoteServiceRegistration iersr = (IExtendedRemoteServiceRegistration) remoteRegistration;
Map<String, Object> extraProperties = iersr.getExtraProperties();
if (extraProperties != null)