Interface LogCallback
-
- All Known Implementing Classes:
DefaultLogCallback
public interface LogCallbackInterface called for each log line received from the docker host when asynchronous log fetching is used.- Since:
- 21/11/14
- Author:
- roland
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classLogCallback.DoneExceptionException indicating that logging is done and should be finished
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Invoked by a user when callback is no longer used.voiderror(String error)Method called in case on an error when reading the logsvoidlog(int type, ZonedDateTime timestamp, String txt)Receive a log entryvoidopen()To be called by a client to start the callback and allocate the underlying output stream.
-
-
-
Method Detail
-
log
void log(int type, ZonedDateTime timestamp, String txt) throws LogCallback.DoneExceptionReceive a log entry- Parameters:
type- 1 for log on standard output, 2 for standard errortimestamp- timestampp on the server side when this entry happenedtxt- log output- Throws:
CancellationException- if thrown will stop the logging.LogCallback.DoneException
-
error
void error(String error)
Method called in case on an error when reading the logs- Parameters:
error- error description
-
open
void open() throws IOException
To be called by a client to start the callback and allocate the underlying output stream. In case of a shared stream it might be that the stream is reused- Throws:
IOException
-
close
void close()
Invoked by a user when callback is no longer used. Closing the underlying stream may be delayed by the implementation when this stream is shared between multiple clients.
-
-