Class ThreadIOImpl
- java.lang.Object
-
- org.apache.felix.gogo.runtime.threadio.ThreadIOImpl
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.lang.ThreadLocal<Marker>
current
(package private) Marker
defaultMarker
(package private) ThreadPrintStream
err
(package private) ThreadInputStream
in
private static java.util.logging.Logger
log
(package private) ThreadPrintStream
out
-
Constructor Summary
Constructors Constructor Description ThreadIOImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
checkIO()
void
close()
Cancel the streams associated with the current thread.(package private) Marker
current()
void
setStreams(java.io.InputStream in, java.io.PrintStream out, java.io.PrintStream err)
Associate this streams with the current thread.void
start()
void
stop()
-
-
-
Field Detail
-
log
private static final java.util.logging.Logger log
-
defaultMarker
final Marker defaultMarker
-
err
final ThreadPrintStream err
-
out
final ThreadPrintStream out
-
in
final ThreadInputStream in
-
current
final java.lang.ThreadLocal<Marker> current
-
-
Method Detail
-
start
public void start()
-
stop
public void stop()
-
checkIO
private void checkIO()
-
current
Marker current()
-
close
public void close()
Description copied from interface:ThreadIO
Cancel the streams associated with the current thread. This method will not do anything when no streams are associated.
-
setStreams
public void setStreams(java.io.InputStream in, java.io.PrintStream out, java.io.PrintStream err)
Description copied from interface:ThreadIO
Associate this streams with the current thread. Ensure that when output is performed on System.in, System.out, System.err it will happen on the given streams. The streams will automatically be canceled when the bundle that has gotten this service is stopped or returns this service.- Specified by:
setStreams
in interfaceThreadIO
- Parameters:
in
- InputStream to use for the current thread when System.in is usedout
- PrintStream to use for the current thread when System.out is usederr
- PrintStream to use for the current thread when System.err is used
-
-