public class Connector
extends java.lang.Object
XConnector interface.
The Connector is a general component, that uses less general
components (like com.sun.star.connection.socketConnector) to
implement its functionality.
com.sun.star.connections.XAcceptor,
com.sun.star.connections.XConnection,
com.sun.star.connections.XConnector,
com.sun.star.loader.JavaLoader| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
__serviceName
The name of the service.
|
| Constructor and Description |
|---|
Connector(XMultiServiceFactory serviceFactory)
Constructs a new
Connector that uses the given service
factory to create a specific XConnector. |
| Modifier and Type | Method and Description |
|---|---|
static XSingleServiceFactory |
__getServiceFactory(java.lang.String implName,
XMultiServiceFactory multiFactory,
XRegistryKey regKey)
Returns a factory for creating the service.
|
XConnection |
connect(java.lang.String connectionDescription)
Connects via the given connection type to a waiting server.
|
public static final java.lang.String __serviceName
The JavaLoader acceses this through reflection.
JavaLoader,
Constant Field Valuespublic Connector(XMultiServiceFactory serviceFactory)
Connector that uses the given service
factory to create a specific XConnector.serviceFactory - the service factory to use.public static XSingleServiceFactory __getServiceFactory(java.lang.String implName,
XMultiServiceFactory multiFactory,
XRegistryKey regKey)
This method is called by the JavaLoader.
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.XSingleServiceFactory for creating the component.JavaLoaderpublic XConnection connect(java.lang.String connectionDescription)
throws NoConnectException,
ConnectionSetupException
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).
connectionDescription - the description of the connection.XConnection to the server.NoConnectExceptionConnectionSetupExceptioncom.sun.star.connections.XAcceptor,
com.sun.star.connections.XConnection