Class OutputController
java.lang.Object
net.sourceforge.jnlp.util.logging.OutputController
- All Implemented Interfaces:
BasicOutputController
OutputController class (thread) must NOT call JNLPRuntime.getConfiguration()
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate classprivate static classprivate static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Threadprivate StdInOutErrControllerprivate booleanprivate final List<MessageWithHeader> private longprivate final Thread -
Constructor Summary
ConstructorsModifierConstructorDescriptionOutputController(OutputStream out, OutputStream err) for testing purposes the logger with custom streams can be created otherwise only getLogger()'s singleton can be called.privateOutputController(StdInOutErrController inOutErrController) for testing purposes the logger with custom streams can be created otherwise only getLogger()'s singleton can be called. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidconsume()private voidconsumeClientAppMessage(MessageWithHeader message) private voidconsumeItwMessage(MessageWithHeader message) private StringconvertToPrintableString(MessageWithHeader s, LogConfig logConfig) voidflush()private SingleStreamLoggerstatic OutputControllerThis should be the only legal way to get logger for ITWprivate SingleStreamLoggerprivate voidvoidvoidprintOutLn(String e) readLine()(package private) voidsetFileLog(SingleStreamLogger fileLog) voidsetInOutErrController(StdInOutErrController inOutErrController) Some tests may require set the output/error stream and check the output.private voidvoid
-
Field Details
-
inOutErrController
-
messageQue
-
consumerThread
-
shutdownThread
-
javaConsoleInitialized
private boolean javaConsoleInitialized -
pollingInterval
private long pollingInterval
-
-
Constructor Details
-
OutputController
for testing purposes the logger with custom streams can be created otherwise only getLogger()'s singleton can be called. -
OutputController
for testing purposes the logger with custom streams can be created otherwise only getLogger()'s singleton can be called.
-
-
Method Details
-
shutdownLogging
private void shutdownLogging() -
flush
public void flush() -
consume
private void consume() -
consumeClientAppMessage
-
consumeItwMessage
-
convertToPrintableString
-
getLogger
This should be the only legal way to get logger for ITW- Returns:
- logging singleton
-
startConsumer
public void startConsumer() -
initJavaConsole
private void initJavaConsole() -
setInOutErrController
Some tests may require set the output/error stream and check the output. This is the gate for it. -
log
- Specified by:
login interfaceBasicOutputController
-
getFileLog
-
getSystemLog
-
printOutLn
-
readLine
- Throws:
IOException
-
setFileLog
-