Class Connector

  • All Implemented Interfaces:
    com.sun.star.connection.XConnector, com.sun.star.uno.XInterface

    public class Connector
    extends java.lang.Object
    implements com.sun.star.connection.XConnector
    A component that implements the XConnector interface.

    The Connector is a general component, that uses less general components (like com.sun.star.connection.socketConnector) to implement its functionality.

    Since:
    UDK 1.0
    See Also:
    XAcceptor, XConnection, XConnector, JavaLoader
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String __serviceName
      The name of the service.
      • Fields inherited from interface com.sun.star.connection.XConnector

        UNOTYPEINFO
    • Constructor Summary

      Constructors 
      Constructor Description
      Connector​(com.sun.star.lang.XMultiServiceFactory serviceFactory)
      Constructs a new Connector that uses the given service factory to create a specific XConnector.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static com.sun.star.lang.XSingleServiceFactory __getServiceFactory​(java.lang.String implName, com.sun.star.lang.XMultiServiceFactory multiFactory, com.sun.star.registry.XRegistryKey regKey)
      Returns a factory for creating the service.
      com.sun.star.connection.XConnection connect​(java.lang.String connectionDescription)
      Connects via the given connection type to a waiting server.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • __serviceName

        public static final java.lang.String __serviceName
        The name of the service.

        The JavaLoader accesses this through reflection.

        See Also:
        JavaLoader, Constant Field Values
    • Constructor Detail

      • Connector

        public Connector​(com.sun.star.lang.XMultiServiceFactory serviceFactory)
        Constructs a new Connector that uses the given service factory to create a specific XConnector.
        Parameters:
        serviceFactory - the service factory to use.
    • Method Detail

      • __getServiceFactory

        public static com.sun.star.lang.XSingleServiceFactory __getServiceFactory​(java.lang.String implName,
                                                                                  com.sun.star.lang.XMultiServiceFactory multiFactory,
                                                                                  com.sun.star.registry.XRegistryKey regKey)
        Returns a factory for creating the service.

        This method is called by the JavaLoader.

        Parameters:
        implName - the name of the implementation for which a service is requested.
        multiFactory - the service manager to be used (if needed).
        regKey - the registry key.
        Returns:
        an XSingleServiceFactory for creating the component.
        See Also:
        JavaLoader
      • connect

        public com.sun.star.connection.XConnection connect​(java.lang.String connectionDescription)
                                                    throws com.sun.star.connection.NoConnectException,
                                                           com.sun.star.connection.ConnectionSetupException
        Connects via the given connection type to a waiting server.

        The connection description has the following format: type*(key=value). The specific XConnector implementation is instantiated through the service factory as com.sun.star.connection.typeConnector (with type in lower case).

        Specified by:
        connect in interface com.sun.star.connection.XConnector
        Parameters:
        connectionDescription - the description of the connection.
        Returns:
        an XConnection to the server.
        Throws:
        com.sun.star.connection.NoConnectException
        com.sun.star.connection.ConnectionSetupException
        See Also:
        XAcceptor, XConnection