Package com.sun.star.lib.uno.helper

Examples of com.sun.star.lib.uno.helper.UnoUrl


      parseUnoUrlWithOfficePath( url, prefix );
    else
    {
      try
      {
        UnoUrl aURL = UnoUrl.parseUnoUrl( url );
        mProgramPath = null;
        mConnType = aURL.getConnection();
        mPipe = (String) aURL.getConnectionParameters().get( "pipe" );
        mPort = (String) aURL.getConnectionParameters().get( "port" );
        mProtocol = aURL.getProtocol();
        mInitialObject = aURL.getRootOid();
      }
      catch ( com.sun.star.lang.IllegalArgumentException eIll )
      {
        throw new java.net.MalformedURLException(
          "Invalid UNO connection URL.");
View Full Code Here


        XAcceptor acceptor = Acceptor.create(context);
        XBridgeFactory factory = UnoRuntime.queryInterface(
            XBridgeFactory.class,
            context.getServiceManager().createInstanceWithContext(
                "com.sun.star.bridge.BridgeFactory", context));
        UnoUrl unoUrl = UnoUrl.parseUnoUrl(url);
        System.out.println("Server: Accepting...");
        XConnection connection = acceptor.accept(
            unoUrl.getConnectionAndParametersAsString());
        System.out.println("Server: ...connected...");
        factory.createBridge(
            "", unoUrl.getProtocolAndParametersAsString(), connection,
            new Provider());
        System.out.println("Server: ...bridged.");
    }
View Full Code Here

            manager.createInstanceWithContext(
                "com.sun.star.bridge.BridgeFactory", context));
        if (factory == null) {
            throw new NullPointerException("no bridge factory");
        }
        UnoUrl url = UnoUrl.parseUnoUrl(arguments[0]);
        XBridge bridge = factory.createBridge(
            "", url.getProtocolAndParametersAsString(),
            Connector.create(context).connect(
                url.getConnectionAndParametersAsString()),
            null);
        Data d = UnoRuntime.queryInterface(
            XServer.class, bridge.getInstance(url.getRootOid())).getData();
        UnoRuntime.queryInterface(XComponent.class, bridge).dispose();
        if (!d.m1.equals("Hello") || d.m2 != 42) {
            throw new RuntimeException("Data object contains bad values");
        }
    }
View Full Code Here

      parseUnoUrlWithOfficePath( url, prefix );
    else
    {
      try
      {
        UnoUrl aURL = UnoUrl.parseUnoUrl( url );
        mProgramPath = null;
        mConnType = aURL.getConnection();
        mPipe = (String) aURL.getConnectionParameters().get( "pipe" );
        mPort = (String) aURL.getConnectionParameters().get( "port" );
        mProtocol = aURL.getProtocol();
        mInitialObject = aURL.getRootOid();
      }
      catch ( com.sun.star.lang.IllegalArgumentException eIll )
      {
        throw new java.net.MalformedURLException(
          "Invalid UNO connection URL.");
View Full Code Here

      parseUnoUrlWithOfficePath( url, prefix );
    else
    {
      try
      {
        UnoUrl aURL = UnoUrl.parseUnoUrl( url );
        mProgramPath = null;
        mConnType = aURL.getConnection();
        mPipe = (String) aURL.getConnectionParameters().get( "pipe" );
        mPort = (String) aURL.getConnectionParameters().get( "port" );
        mProtocol = aURL.getProtocol();
        mInitialObject = aURL.getRootOid();
      }
      catch ( com.sun.star.lang.IllegalArgumentException eIll )
      {
        throw new java.net.MalformedURLException(
          "Invalid UNO connection URL.");
View Full Code Here

        XAcceptor acceptor = Acceptor.create(context);
        XBridgeFactory factory = UnoRuntime.queryInterface(
            XBridgeFactory.class,
            context.getServiceManager().createInstanceWithContext(
                "com.sun.star.bridge.BridgeFactory", context));
        UnoUrl unoUrl = UnoUrl.parseUnoUrl(url);
        System.out.println("Server: Accepting...");
        XConnection connection = acceptor.accept(
            unoUrl.getConnectionAndParametersAsString());
        System.out.println("Server: ...connected...");
        factory.createBridge(
            "", unoUrl.getProtocolAndParametersAsString(), connection,
            new Provider());
        System.out.println("Server: ...bridged.");
    }
View Full Code Here

      parseUnoUrlWithOfficePath( url, prefix );
    else
    {
      try
      {
        UnoUrl aURL = UnoUrl.parseUnoUrl( url );
        mProgramPath = null;
        mConnType = aURL.getConnection();
        mPipe = (String) aURL.getConnectionParameters().get( "pipe" );
        mPort = (String) aURL.getConnectionParameters().get( "port" );
        mProtocol = aURL.getProtocol();
        mInitialObject = aURL.getRootOid();
      }
      catch ( com.sun.star.lang.IllegalArgumentException eIll )
      {
        throw new java.net.MalformedURLException(
          "Invalid UNO connection URL.");
View Full Code Here

    String prefix = "uno:localoffice"; //$NON-NLS-1$
    if (url.startsWith(prefix))
      parseUnoUrlWithOfficePath(url, prefix);
    else {
      try {
        UnoUrl aURL = UnoUrl.parseUnoUrl(url);
        mProgramPath = null;
        connType = aURL.getConnection();
        pipe = (String) aURL.getConnectionParameters().get("pipe"); //$NON-NLS-1$
        port = (String) aURL.getConnectionParameters().get("port"); //$NON-NLS-1$
        protocol = aURL.getProtocol();
        initialObject = aURL.getRootOid();
      } catch (com.sun.star.lang.IllegalArgumentException illegalArgumentException) {
        throw new java.net.MalformedURLException(
            "Invalid UNO connection URL."); //$NON-NLS-1$
      }
    }
View Full Code Here

    String prefix = "uno:localoffice"; //$NON-NLS-1$
    if(url.startsWith(prefix))
      parseUnoUrlWithOfficePath(url, prefix);
    else {
      try {
        UnoUrl aURL = UnoUrl.parseUnoUrl(url);
        mProgramPath = null;
        connType = aURL.getConnection();
        pipe = (String) aURL.getConnectionParameters().get("pipe"); //$NON-NLS-1$
        port = (String) aURL.getConnectionParameters().get("port"); //$NON-NLS-1$
        protocol = aURL.getProtocol();
        initialObject = aURL.getRootOid();
      }
      catch(com.sun.star.lang.IllegalArgumentException illegalArgumentException) {
        throw new java.net.MalformedURLException("Invalid UNO connection URL."); //$NON-NLS-1$
      }
    }
View Full Code Here

      parseUnoUrlWithOfficePath( url, prefix );
    else
    {
      try
      {
        UnoUrl aURL = UnoUrl.parseUnoUrl( url );
        mProgramPath = null;
        mConnType = aURL.getConnection();
        mPipe = (String) aURL.getConnectionParameters().get( "pipe" );
        mPort = (String) aURL.getConnectionParameters().get( "port" );
        mProtocol = aURL.getProtocol();
        mInitialObject = aURL.getRootOid();
      }
      catch ( com.sun.star.lang.IllegalArgumentException eIll )
      {
        throw new java.net.MalformedURLException(
          "Invalid UNO connection URL.");
View Full Code Here

TOP

Related Classes of com.sun.star.lib.uno.helper.UnoUrl

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.