Top Description Fields Constructors Methods
com.sun.star.lib.connections.socket

public final Class socketAcceptor

extends Object
implements com.sun.star.connection.XAcceptor
Class Inheritance
Imports
com.sun.star.comp.loader.FactoryHelper, com.sun.star.connection.AlreadyAcceptingException, com.sun.star.connection.ConnectionSetupException, com.sun.star.connection.XAcceptor, com.sun.star.connection.XConnection, com.sun.star.lang.XMultiServiceFactory, com.sun.star.lang.XSingleServiceFactory, com.sun.star.registry.XRegistryKey, java.io.IOException, java.net.*

A component that implements the XAcceptor interface.

The socketAcceptor is a specialized component that uses TCP sockets for communication. The socketAcceptor is generally used by the com.sun.star.connection.Acceptor service.

Since
UDK 1.0
See Also
com.sun.star.connection.XAcceptor, com.sun.star.connection.XConnection2, 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 String
private static final boolean
private ServerSocket
private Boolean

Constructor Summary

AccessConstructor and Description
public

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 com.sun.star.connection.XConnection

Returns:

an XConnection to the client.
accept
(String
the description of the connection.
connectionDescription
)

Accepts a connection request via the described socket.

public void
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
acceptingDescriptionback to summary
private String acceptingDescription
DEBUGback to summary
private static final boolean DEBUG
serverback to summary
private ServerSocket server
tcpNoDelayback to summary
private Boolean tcpNoDelay

Constructor Detail

socketAcceptorback to summary
public socketAcceptor()

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
acceptback to summary
public com.sun.star.connection.XConnection accept(String connectionDescription) throws com.sun.star.connection.AlreadyAcceptingException, com.sun.star.connection.ConnectionSetupException, com.sun.star.lang.IllegalArgumentException

Accepts a connection request via the described socket.

This call blocks until a connection has been established.

The connection description has the following format: type*(key=value), where type should be socket (ignoring case). Supported keys (ignoring case) currently are

host
The name or address of the accepting interface (defaults to 0, meaning any interface).
port
The TCP port number to accept on (defaults to 6001).
backlog
The maximum length of the acceptor's queue (defaults to 50).
tcpnodelay
A flag (0/1) enabling or disabling Nagle's algorithm on the resulting connection.
Parameters
connectionDescription:String

the description of the connection.

Returns:com.sun.star.connection.XConnection

an XConnection to the client.

See Also
com.sun.star.connection.XConnection, com.sun.star.connection.XConnector
stopAcceptingback to summary
public void stopAccepting()
See Also
com.sun.star.connection.XAcceptor#stopAccepting