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:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected 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
    Constructor
    Description
    PipeConnection(String description)
    Constructs a new PipeConnection.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addStreamListener(com.sun.star.io.XStreamListener aListener)
     
    void
    Closes the connection.
    void
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • DEBUG

      public static final boolean DEBUG
      When set to true, enables various debugging output.
      See Also:
    • _aDescription

      protected String _aDescription
    • _nPipeHandle

      protected long _nPipeHandle
    • _aListeners

      protected ArrayList<com.sun.star.io.XStreamListener> _aListeners
    • _bFirstRead

      protected boolean _bFirstRead
  • Constructor Details

    • PipeConnection

      public PipeConnection(String description) throws IOException
      Constructs a new PipeConnection.
      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 interface com.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 interface com.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 interface com.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 interface com.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.RuntimeException
      Flushes the buffer.
      Specified by:
      flush in interface com.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.RuntimeException
      Closes the connection.
      Specified by:
      close in interface com.sun.star.connection.XConnection
      Throws:
      com.sun.star.io.IOException
      com.sun.star.uno.RuntimeException
      See Also:
      • XConnection.close()
    • getDescription

      public String getDescription() throws com.sun.star.uno.RuntimeException
      Gives a description of the connection.
      Specified by:
      getDescription in interface com.sun.star.connection.XConnection
      Returns:
      the description.
      Throws:
      com.sun.star.uno.RuntimeException
      See Also:
      • XConnection.getDescription()