All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.webbitserver.handler.logging.LoggingEventSourceConnection Maven / Gradle / Ivy

package org.webbitserver.handler.logging;

import org.webbitserver.EventSourceConnection;
import org.webbitserver.wrapper.EventSourceConnectionWrapper;

class LoggingEventSourceConnection extends EventSourceConnectionWrapper {

    private final LogSink logSink;

    LoggingEventSourceConnection(LogSink logSink, EventSourceConnection connection) {
        super(connection);
        this.logSink = logSink;
    }

    @Override
    public EventSourceConnectionWrapper send(org.webbitserver.EventSourceMessage message) {
        logSink.eventSourceOutboundData(this, message.build());
        return super.send(message);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy