Package org.eclipse.ecf.provider.r_osgi.identity

Examples of org.eclipse.ecf.provider.r_osgi.identity.R_OSGiID


        //TODO factor localHost and protocol out?
        final String localHost = InetAddress.getLocalHost().getCanonicalHostName();
        final String protocol = "r-osgi"; //$NON-NLS-1$

        final int port = remoteOSGiService.getListeningPort(protocol);
        final ID containerID = new R_OSGiID(protocol + "://" + localHost + ":" + port); //$NON-NLS-1$ //$NON-NLS-2$
        return new R_OSGiRemoteServiceContainer(remoteOSGiService, containerID);
      } else if (parameters.length > 0) {
        if (parameters[0] instanceof ID) {
          return new R_OSGiRemoteServiceContainer(remoteOSGiService, (ID) parameters[0]);
        } else if (parameters[0] instanceof String) {
          return new R_OSGiRemoteServiceContainer(remoteOSGiService, new R_OSGiID((String) parameters[0]));
        }
      }
      throw new ContainerCreateException("Unsupported arguments " //$NON-NLS-1$
          + Arrays.asList(parameters));
    } catch (IDCreateException e) {
View Full Code Here

TOP

Related Classes of org.eclipse.ecf.provider.r_osgi.identity.R_OSGiID

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.