FromEclipseQueue
Keywords: com.parctechnologies.eclipse.FromEclipseQueue class

Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.parctechnologies.eclipse
Class FromEclipseQueue

    java.lang.Object
      java.io.InputStream
          com.parctechnologies.eclipse.FromEclipseQueue

public class FromEclipseQueue
extends java.io.InputStream

A queue for sending data from ECLiPSe to Java. This class performs no processing of the data and cannot for example, deal with EXDR format (see `EXDRInputStream` for a class which can handle this).

In addition to the standard methods inherited from its superclass, this class also provides the ability to attach a `QueueListener` object to the FromEclipseQueue, as a handler for incoming data.

There is no public constructor; to access an FromEclipseQueue use the `createFromEclipseQueue()` of an object implementing the `EclipseConnection` interface or the `getEclipseStderr()` or `getEclipseStdout()` method of an object implementing the `EclipseEngine` interface.

Method Summary
`int` | `available()`
`void` | `close()` Closes the queue (both eclipse and Java sides), removing any listener.
`int` | `read()`
`int` | `read(byte[] b, int off, int len)` Read bytes from the FromEclipseQueue into a byte array.
`void` | `removeListener()` Detach any QueueListener from this FromEclipseQueue.
`void` | `setListener(QueueListener l)` Attach a QueueListener to this FromEclipseQueue for handling incoming data.

Methods inherited from class java.io.InputStream
`mark, markSupported, read, reset, skip`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### available

    public int available()
                  throws java.io.IOException

  Throws:
    `java.io.IOException`

### read

    public int read(byte[] b,
                    int off,
                    int len)
             throws java.io.IOException

  Read bytes from the FromEclipseQueue into a byte array. `len` bytes are read from the queue and stored in byte array `b` at offset `off`.

  Returns:
    the number of bytes read.
  Throws:
    `java.io.IOException`

### read

    public int read()
             throws java.io.IOException

  Throws:
    `java.io.IOException`

### setListener

    public void setListener(QueueListener l)
                     throws java.io.IOException

  Attach a QueueListener to this FromEclipseQueue for handling incoming data. When ECLiPSe flushes the queue, the `dataAvailable()` method of the QueueListener is invoked.

  Throws:
    `java.io.IOException`

### removeListener

    public void removeListener()
                        throws java.io.IOException

  Detach any QueueListener from this FromEclipseQueue.

  Throws:
    `java.io.IOException`

### close

    public void close()
               throws java.io.IOException

  Closes the queue (both eclipse and Java sides), removing any listener.

  Throws:
    `java.io.IOException`

Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD