Class PipeConnection
java.lang.Object
com.sun.star.lib.connections.pipe.PipeConnection
- All Implemented Interfaces:
com.sun.star.connection.XConnection
,com.sun.star.connection.XConnectionBroadcaster
,com.sun.star.uno.XInterface
public class PipeConnection
extends Object
implements com.sun.star.connection.XConnection, com.sun.star.connection.XConnectionBroadcaster
The PipeConnection implements the
XConnection
interface
and is uses by the PipeConnector
and the PipeAcceptor
.
This class is not part of the provided api
.
The native implementation is in jurt/source/pipe/com_sun_star_lib_connections_pipe_PipeConnection.c- Since:
- UDK1.0
- See Also:
-
pipeAcceptor
pipeConnector
XConnection
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
protected ArrayList<com.sun.star.io.XStreamListener>
protected boolean
protected long
static final boolean
When set to true, enables various debugging output.Fields inherited from interface com.sun.star.connection.XConnection
UNOTYPEINFO
Fields inherited from interface com.sun.star.connection.XConnectionBroadcaster
UNOTYPEINFO
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addStreamListener
(com.sun.star.io.XStreamListener aListener) void
close()
Closes the connection.void
flush()
Flushes the buffer.Gives a description of the connection.int
read
(byte[][] bytes, int nBytesToRead) Read the required number of bytes.void
removeStreamListener
(com.sun.star.io.XStreamListener aListener) void
write
(byte[] aData) Write bytes.
-
Field Details
-
DEBUG
public static final boolean DEBUGWhen set to true, enables various debugging output.- See Also:
-
_aDescription
-
_nPipeHandle
protected long _nPipeHandle -
_aListeners
-
_bFirstRead
protected boolean _bFirstRead
-
-
Constructor Details
-
PipeConnection
Constructs a newPipeConnection
.- Parameters:
description
- the description of the connection.- Throws:
IOException
-
-
Method Details
-
addStreamListener
public void addStreamListener(com.sun.star.io.XStreamListener aListener) throws com.sun.star.uno.RuntimeException - Specified by:
addStreamListener
in interfacecom.sun.star.connection.XConnectionBroadcaster
- Throws:
com.sun.star.uno.RuntimeException
-
removeStreamListener
public void removeStreamListener(com.sun.star.io.XStreamListener aListener) throws com.sun.star.uno.RuntimeException - Specified by:
removeStreamListener
in interfacecom.sun.star.connection.XConnectionBroadcaster
- Throws:
com.sun.star.uno.RuntimeException
-
read
public int read(byte[][] bytes, int nBytesToRead) throws com.sun.star.io.IOException, com.sun.star.uno.RuntimeException Read the required number of bytes.- Specified by:
read
in interfacecom.sun.star.connection.XConnection
- Parameters:
bytes
- the outparameter, where the bytes have to be placed.nBytesToRead
- the number of bytes to read.- Returns:
- the number of bytes read.
- Throws:
com.sun.star.io.IOException
com.sun.star.uno.RuntimeException
- See Also:
-
XConnection.read(byte[][], int)
-
write
public void write(byte[] aData) throws com.sun.star.io.IOException, com.sun.star.uno.RuntimeException Write bytes.- Specified by:
write
in interfacecom.sun.star.connection.XConnection
- Parameters:
aData
- the bytes to write.- Throws:
com.sun.star.io.IOException
com.sun.star.uno.RuntimeException
- See Also:
-
XConnection.write(byte[])
-
flush
public void flush() throws com.sun.star.io.IOException, com.sun.star.uno.RuntimeExceptionFlushes the buffer.- Specified by:
flush
in interfacecom.sun.star.connection.XConnection
- Throws:
com.sun.star.io.IOException
com.sun.star.uno.RuntimeException
- See Also:
-
XConnection.flush()
-
close
public void close() throws com.sun.star.io.IOException, com.sun.star.uno.RuntimeExceptionCloses the connection.- Specified by:
close
in interfacecom.sun.star.connection.XConnection
- Throws:
com.sun.star.io.IOException
com.sun.star.uno.RuntimeException
- See Also:
-
XConnection.close()
-
getDescription
Gives a description of the connection.- Specified by:
getDescription
in interfacecom.sun.star.connection.XConnection
- Returns:
- the description.
- Throws:
com.sun.star.uno.RuntimeException
- See Also:
-
XConnection.getDescription()
-