Top Description Fields Constructors Methods
com.sun.star.comp.connections

public Class Connector

extends Object
implements com.sun.star.connection.XConnector
Class Inheritance
Imports
com.sun.star.comp.loader.FactoryHelper, com.sun.star.connection.ConnectionSetupException, com.sun.star.connection.NoConnectException, com.sun.star.connection.XConnection, com.sun.star.connection.XConnector, com.sun.star.lang.XMultiServiceFactory, com.sun.star.lang.XSingleServiceFactory, com.sun.star.registry.XRegistryKey

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
com.sun.star.connection.XAcceptor, com.sun.star.connection.XConnection, com.sun.star.connection.XConnector, com.sun.star.comp.loader.JavaLoader

Field Summary

Modifier and TypeField and Description
public static final String
__serviceName

The name of the service.

private boolean
private static final boolean
private final com.sun.star.lang.XMultiServiceFactory

Constructor Summary

AccessConstructor and Description
public
Connector(com.sun.star.lang.XMultiServiceFactory
the service factory to use.
serviceFactory
)

Constructs a new Connector that uses the given service factory to create a specific XConnector.

Method Summary

Modifier and TypeMethod and Description
public static com.sun.star.lang.XSingleServiceFactory

Returns:

an XSingleServiceFactory for creating the component.
__getServiceFactory
(String
the name of the implementation for which a service is requested.
implName
,
com.sun.star.lang.XMultiServiceFactory
the service manager to be used (if needed).
multiFactory
,
com.sun.star.registry.XRegistryKey
the registry key.
regKey
)

Returns a factory for creating the service.

public synchronized com.sun.star.connection.XConnection

Returns:

an XConnection to the server.
connect
(String
the description of the connection.
connectionDescription
)

Connects via the given connection type to a waiting server.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

__serviceNameback to summary
public static final String __serviceName

The name of the service.

The JavaLoader accesses this through reflection.

See Also
com.sun.star.comp.loader.JavaLoader
connectedback to summary
private boolean connected
DEBUGback to summary
private static final boolean DEBUG
serviceFactoryback to summary
private final com.sun.star.lang.XMultiServiceFactory serviceFactory

Constructor Detail

Connectorback to summary
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:com.sun.star.lang.XMultiServiceFactory

the service factory to use.

Method Detail

__getServiceFactoryback to summary
public static com.sun.star.lang.XSingleServiceFactory __getServiceFactory(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:String

the name of the implementation for which a service is requested.

multiFactory:com.sun.star.lang.XMultiServiceFactory

the service manager to be used (if needed).

regKey:com.sun.star.registry.XRegistryKey

the registry key.

Returns:com.sun.star.lang.XSingleServiceFactory

an XSingleServiceFactory for creating the component.

See Also
com.sun.star.comp.loader.JavaLoader
connectback to summary
public synchronized com.sun.star.connection.XConnection connect(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).

Parameters
connectionDescription:String

the description of the connection.

Returns:com.sun.star.connection.XConnection

an XConnection to the server.

See Also
com.sun.star.connection.XAcceptor, com.sun.star.connection.XConnection