public class PipedConnection
extends java.lang.Object
XConnection
Interface.
It is useful for Thread
communication
in one Process.
com.sun.star.connections.XConnection
,
com.sun.star.loader.JavaLoader
Modifier and Type | Field and Description |
---|---|
protected static int |
__waitTime
The amount of time in milliseconds, to wait to
see check the buffers.
|
protected byte[] |
_buffer |
protected boolean |
_closed |
protected int |
_in |
protected PipedConnection |
_otherSide |
protected int |
_out |
static boolean |
DEBUG
When set to true, enables various debugging output.
|
Constructor and Description |
---|
PipedConnection(java.lang.Object[] args)
Constructs a new
PipedConnection , sees if there
is an other side, which it should be connected to. |
Modifier and Type | Method and Description |
---|---|
static XSingleServiceFactory |
__getServiceFactory(java.lang.String implName,
XMultiServiceFactory multiFactory,
XRegistryKey regKey)
Gives a factory for creating the service.
|
void |
close()
Closes the pipe.
|
void |
flush()
Flushes the buffer, notifies if necessary the other side that new data has arrived.
|
java.lang.String |
getDescription()
Gives a description of this pipe.
|
int |
read(byte[][] aReadBytes,
int nBytesToRead)
Read the required number of bytes.
|
void |
write(byte[] aData)
Write bytes.
|
public static final boolean DEBUG
protected static final int __waitTime
protected byte[] _buffer
protected int _in
protected int _out
protected boolean _closed
protected PipedConnection _otherSide
public PipedConnection(java.lang.Object[] args) throws com.sun.star.uno.RuntimeException
PipedConnection
, sees if there
is an other side, which it should be connected to.
args
- Another side could be in index 0.com.sun.star.uno.RuntimeException
public static XSingleServiceFactory __getServiceFactory(java.lang.String implName, XMultiServiceFactory multiFactory, XRegistryKey regKey)
JavaLoader
implName
- the name of the implementation for which a service is desiredmultiFactory
- the service manager to be uses if neededregKey
- the registryKeyXSingleServiceFactory
for creating the componentJavaLoader
public int read(byte[][] aReadBytes, int nBytesToRead) throws com.sun.star.io.IOException, com.sun.star.uno.RuntimeException
aReadBytes
- the outparameter, where the bytes have to be placednBytesToRead
- the number of bytes to readcom.sun.star.io.IOException
com.sun.star.uno.RuntimeException
com.sun.star.connections.XConnection#read
public void write(byte[] aData) throws com.sun.star.io.IOException, com.sun.star.uno.RuntimeException
aData
- the bytes to writecom.sun.star.io.IOException
com.sun.star.uno.RuntimeException
com.sun.star.connections.XConnection#write
public void flush() throws com.sun.star.io.IOException, com.sun.star.uno.RuntimeException
com.sun.star.io.IOException
com.sun.star.uno.RuntimeException
com.sun.star.connections.XConnection#flush
public void close() throws com.sun.star.io.IOException, com.sun.star.uno.RuntimeException
com.sun.star.io.IOException
com.sun.star.uno.RuntimeException
com.sun.star.connections.XConnection#closed
public java.lang.String getDescription() throws com.sun.star.uno.RuntimeException
com.sun.star.uno.RuntimeException
com.sun.star.connections.XConnection#getDescription