Package com.parctechnologies.eclipse
Class ToEclipseQueue
java.lang.Object
java.io.OutputStream
com.parctechnologies.eclipse.ToEclipseQueue
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
A queue for
sending data from Java to ECLiPSe. This class performs no processing of the
data and cannot for example, convert to EXDR format (see
EXDROutputStream
for a class which can do this).
In addition to the standard methods inherited from its superclass, this class
also provides the ability to attach a QueueListener object to the
ToEclipseQueue, as a handler for data requests from ECLiPSe.
There is no public constructor; to access an ToEclipseQueue use the
createToEclipseQueue() of an object implementing the EclipseConnection interface or the getEclipseStdin() method of
an object implementing the EclipseEngine interface.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the queue (both eclipse and Java sides), removing any listener.voidflush()Calls the superclass'flushmethodvoidDetach any QueueListener from this ToEclipseQueue.voidAttach a QueueListener to this ToEclipseQueue for handling requests for data.voidwrite(byte[] b, int off, int len) voidwrite(int b) Methods inherited from class java.io.OutputStream
nullOutputStream, write
-
Method Details
-
write
- Specified by:
writein classOutputStream- Throws:
IOException
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
setListener
Attach a QueueListener to this ToEclipseQueue for handling requests for data. When ECLiPSe tries to read from an empty queue with a QueueListener attached, thedataAvailable()method of the QueueListener is invoked.- Throws:
IOException
-
removeListener
Detach any QueueListener from this ToEclipseQueue.- Throws:
IOException
-
flush
Calls the superclass'flushmethod- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
close
Closes the queue (both eclipse and Java sides), removing any listener.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-