Package com.sun.star.bridge

Examples of com.sun.star.bridge.XUnoUrlResolver


            com.sun.star.comp.helper.Bootstrap.createInitialComponentContext( null );
        XMultiComponentFactory xLocalServiceManager = xContext.getServiceManager();
 
        Object  xUrlResolver  = xLocalServiceManager.createInstanceWithContext(
            "com.sun.star.bridge.UnoUrlResolver", xContext );
        XUnoUrlResolver urlResolver = (XUnoUrlResolver)UnoRuntime.queryInterface(
            XUnoUrlResolver.class, xUrlResolver );
        Object rInitialObject = urlResolver.resolve( "uno:" + sConnection +
            ";urp;StarOffice.NamingService" );
        XNamingService rName = (XNamingService)UnoRuntime.queryInterface(XNamingService.class,
            rInitialObject );
        if( rName != null )
        {
View Full Code Here


        throws RuntimeException, Exception
    {
        XMultiServiceFactory aLocalServiceManager =
            com.sun.star.comp.helper.Bootstrap.createSimpleServiceManager();

        XUnoUrlResolver aURLResolver = (XUnoUrlResolver) UnoRuntime.queryInterface(
            XUnoUrlResolver.class,
            aLocalServiceManager.createInstance( "com.sun.star.bridge.UnoUrlResolver" ) );

        XMultiServiceFactory aServiceManager = (XMultiServiceFactory) UnoRuntime.queryInterface(
            XMultiServiceFactory.class,
            aURLResolver.resolve( sConnectString ) );

        return aServiceManager;
    }
View Full Code Here

    XMultiServiceFactory xLocalServiceManager =
      com.sun.star.comp.helper.Bootstrap.createSimpleServiceManager();

    // create a connector, so that it can contact the office
    Object  xUrlResolver  = xLocalServiceManager.createInstance( "com.sun.star.bridge.UnoUrlResolver" );
    XUnoUrlResolver urlResolver = (XUnoUrlResolver)UnoRuntime.queryInterface(
            XUnoUrlResolver.class, xUrlResolver );

    Object rInitialObject = urlResolver.resolve( "uno:" + connectStr + ";urp;StarOffice.NamingService" );

    XNamingService rName = (XNamingService)UnoRuntime.queryInterface(
            XNamingService.class, rInitialObject );

    XMultiServiceFactory xMSF = null;
View Full Code Here

          "com.sun.star.bridge.UnoUrlResolver",
          xComponentContext );

      // Create a new url resolver

      XUnoUrlResolver xurlresolver = (XUnoUrlResolver)
        UnoRuntime.queryInterface(XUnoUrlResolver.class, objectUrlResolver);

      // Resolves an object that is specified as follow:
      // uno:<connection description>;<protocol description>;<initial object name>

      Object objectInitial = xurlresolver.resolve(sConnection);

      // Create a service manager from the initial object
      xMultiComponentFactory = (XMultiComponentFactory)
      UnoRuntime.queryInterface(XMultiComponentFactory.class, objectInitial);
View Full Code Here

        xcomponentcontext.getServiceManager();
               
        // create a connector, so that it can contact the office
        Object  xUrlResolver  = xLocalServiceManager.createInstanceWithContext(
        "com.sun.star.bridge.UnoUrlResolver", xcomponentcontext );
        XUnoUrlResolver urlResolver = (XUnoUrlResolver)UnoRuntime.queryInterface(
            XUnoUrlResolver.class, xUrlResolver );
       
        Object rInitialObject = urlResolver.resolve( connectStr );
       
        XNamingService rName = (XNamingService)UnoRuntime.queryInterface(
            XNamingService.class, rInitialObject );
       
        XMultiServiceFactory xMSF = null;
View Full Code Here

            com.sun.star.comp.helper.Bootstrap.createInitialComponentContext(
            null );

        // Initializing serviceManager
        XMultiComponentFactory localServiceManager = xcomponentcontext.getServiceManager();
        XUnoUrlResolver URLResolver = (XUnoUrlResolver) UnoRuntime.queryInterface(
            XUnoUrlResolver.class,
            localServiceManager.createInstanceWithContext(
                "com.sun.star.bridge.UnoUrlResolver",
                xcomponentcontext ) );
        XMultiServiceFactory serviceManager = (XMultiServiceFactory) UnoRuntime.queryInterface(
            XMultiServiceFactory.class,
            URLResolver.resolve( connectString  ) );
        XInterface ucb = ( XInterface )UnoRuntime.queryInterface(
      XInterface.class,
      serviceManager.createInstance( "com.sun.star.ucb.UniversalContentBroker" ));
        return ucb;
    }
View Full Code Here

            XMultiComponentFactory xLocalServiceManager = xLocalContext.getServiceManager();

            Object urlResolver  = xLocalServiceManager.createInstanceWithContext(
                "com.sun.star.bridge.UnoUrlResolver", xLocalContext );
            // query XUnoUrlResolver interface from urlResolver object
            XUnoUrlResolver xUnoUrlResolver = (XUnoUrlResolver) UnoRuntime.queryInterface(
                XUnoUrlResolver.class, urlResolver );

            // Second step: use xUrlResolver interface to import the remote StarOffice.ServiceManager,
            // retrieve its property DefaultContext and get the remote servicemanager
            Object initialObject = xUnoUrlResolver.resolve( unoUrl );
            XPropertySet xPropertySet = (XPropertySet)UnoRuntime.queryInterface(
                XPropertySet.class, initialObject);
            Object context = xPropertySet.getPropertyValue("DefaultContext");
            xRemoteContext = (XComponentContext)UnoRuntime.queryInterface(
                XComponentContext.class, context);
View Full Code Here

            XMultiComponentFactory xLocalServiceManager = xLocalContext.getServiceManager();
           
            Object urlResolver  = xLocalServiceManager.createInstanceWithContext(
            "com.sun.star.bridge.UnoUrlResolver", xLocalContext );
            // query XUnoUrlResolver interface from urlResolver object
            XUnoUrlResolver xUnoUrlResolver = (XUnoUrlResolver) UnoRuntime.queryInterface(
            XUnoUrlResolver.class, urlResolver );
            //XUnoUrlResolver xUnoUrlResolver = (XUnoUrlResolver)urlResolver;
           
            // Second step: use xUrlResolver interface to import the remote StarOffice.ServiceManager,
            // retrieve its property DefaultContext and get the remote servicemanager
            Object initialObject = xUnoUrlResolver.resolve( unoUrl );
            XPropertySet xPropertySet = (XPropertySet)UnoRuntime.queryInterface(
            XPropertySet.class, initialObject);
            Object context = xPropertySet.getPropertyValue("DefaultContext");
            xRemoteContext = (XComponentContext)UnoRuntime.queryInterface(
            XComponentContext.class, context);
View Full Code Here

        xcomponentcontext.getServiceManager();
       
        // create a connector, so that it can contact the office
        Object  xUrlResolver  = xLocalServiceManager.createInstanceWithContext(
        "com.sun.star.bridge.UnoUrlResolver", xcomponentcontext );
        XUnoUrlResolver urlResolver = (XUnoUrlResolver)UnoRuntime.queryInterface(
            XUnoUrlResolver.class, xUrlResolver );
       
        Object rInitialObject = urlResolver.resolve( connectStr );
       
        XNamingService rName = (XNamingService)UnoRuntime.queryInterface(
            XNamingService.class, rInitialObject );
       
        XMultiServiceFactory xMSF = null;
View Full Code Here

      Object objectUrlResolver =
      xmulticomponentfactory.createInstanceWithContext(
      "com.sun.star.bridge.UnoUrlResolver", xcomponentcontext );
     
      // Create a new url resolver
      XUnoUrlResolver xurlresolver = ( XUnoUrlResolver )
      UnoRuntime.queryInterface( XUnoUrlResolver.class,
      objectUrlResolver );
     
      /* Resolves an object that is specified as follow:
         uno:<connection description>;<protocol description>;<initial object name>
       */
      Object objectInitial = xurlresolver.resolve( sConnectionString );
     
      // Create a service manager from the initial object
      xmulticomponentfactory = ( XMultiComponentFactory )
      UnoRuntime.queryInterface( XMultiComponentFactory.class,
      objectInitial );
View Full Code Here

TOP

Related Classes of com.sun.star.bridge.XUnoUrlResolver

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.