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

public Class PipeConnection

extends Object
implements com.sun.star.connection.XConnection, com.sun.star.connection.XConnectionBroadcaster
Class Inheritance
Imports
java.io.IOException, java.util.ArrayList, .StringTokenizer, com.sun.star.connection.XConnection, com.sun.star.connection.XConnectionBroadcaster, com.sun.star.io.XStreamListener, com.sun.star.lib.util.NativeLibraryLoader

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
com.sun.star.lib.connections.pipe.pipeAcceptor, com.sun.star.lib.connections.pipe.pipeConnector, com.sun.star.connection.XConnection

Field Summary

Modifier and TypeField and Description
protected String
protected ArrayList<com.sun.star.io.XStreamListener>
protected boolean
protected long
public static final boolean
DEBUG

When set to true, enables various debugging output.

Constructor Summary

AccessConstructor and Description
public
PipeConnection(String
the description of the connection.
description
)

Constructs a new PipeConnection.

Method Summary

Modifier and TypeMethod and Description
public void
addStreamListener(com.sun.star.io.XStreamListener aListener)

public void
close()

Closes the connection.

private native void
private native int
public void
flush()

Flushes the buffer.

private native void
public String

Returns:

the description.
getDescription
()

Gives a description of the connection.

private void
private void
notifyListeners_error(com.sun.star.uno.Exception exception)

private void
public int

Returns:

the number of bytes read.
read
(byte[][]
the outparameter, where the bytes have to be placed.
bytes
,
int
the number of bytes to read.
nBytesToRead
)

Read the required number of bytes.

private native int
readJNI(byte[][] bytes, int nBytesToRead)

public void
removeStreamListener(com.sun.star.io.XStreamListener aListener)

public void
write(byte[]
the bytes to write.
aData
)

Write bytes.

private native void
writeJNI(byte[] aData)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_aDescriptionback to summary
protected String _aDescription
_aListenersback to summary
protected ArrayList<com.sun.star.io.XStreamListener> _aListeners
_bFirstReadback to summary
protected boolean _bFirstRead
_nPipeHandleback to summary
protected long _nPipeHandle
DEBUGback to summary
public static final boolean DEBUG

When set to true, enables various debugging output.

Constructor Detail

PipeConnectionback to summary
public PipeConnection(String description) throws IOException

Constructs a new PipeConnection.

Parameters
description:String

the description of the connection.

Method Detail

addStreamListenerback to summary
public void addStreamListener(com.sun.star.io.XStreamListener aListener) throws com.sun.star.uno.RuntimeException
closeback to summary
public void close() throws com.sun.star.io.IOException, com.sun.star.uno.RuntimeException

Closes the connection.

See Also
com.sun.star.connection.XConnection#close
closeJNIback to summary
private native void closeJNI() throws com.sun.star.io.IOException, com.sun.star.uno.RuntimeException
createJNIback to summary
private native int createJNI(String name) throws com.sun.star.io.IOException, com.sun.star.uno.RuntimeException
flushback to summary
public void flush() throws com.sun.star.io.IOException, com.sun.star.uno.RuntimeException

Flushes the buffer.

See Also
com.sun.star.connection.XConnection#flush
flushJNIback to summary
private native void flushJNI() throws com.sun.star.io.IOException, com.sun.star.uno.RuntimeException
getDescriptionback to summary
public String getDescription() throws com.sun.star.uno.RuntimeException

Gives a description of the connection.

Returns:String

the description.

See Also
com.sun.star.connection.XConnection#getDescription
notifyListeners_closeback to summary
private void notifyListeners_close()
notifyListeners_errorback to summary
private void notifyListeners_error(com.sun.star.uno.Exception exception)
notifyListeners_openback to summary
private void notifyListeners_open()
readback to summary
public int read(byte[][] bytes, int nBytesToRead) throws com.sun.star.io.IOException, com.sun.star.uno.RuntimeException

Read the required number of bytes.

Parameters
bytes:byte[][]

the outparameter, where the bytes have to be placed.

nBytesToRead:int

the number of bytes to read.

Returns:int

the number of bytes read.

See Also
com.sun.star.connection.XConnection#read
readJNIback to summary
private native int readJNI(byte[][] bytes, int nBytesToRead) throws com.sun.star.io.IOException, com.sun.star.uno.RuntimeException
removeStreamListenerback to summary
public void removeStreamListener(com.sun.star.io.XStreamListener aListener) throws com.sun.star.uno.RuntimeException
writeback to summary
public void write(byte[] aData) throws com.sun.star.io.IOException, com.sun.star.uno.RuntimeException

Write bytes.

Parameters
aData:byte[]

the bytes to write.

See Also
com.sun.star.connection.XConnection#write
writeJNIback to summary
private native void writeJNI(byte[] aData) throws com.sun.star.io.IOException, com.sun.star.uno.RuntimeException