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

ch.squaredesk.nova.comm.CommAdapter Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (c) Squaredesk GmbH and Oliver Dotzauer.
 *
 * This program is distributed under the squaredesk open source license. See the LICENSE file
 * distributed with this work for additional information regarding copyright ownership. You may also
 * obtain a copy of the license at
 *
 *   https://squaredesk.ch/license/oss/LICENSE
 *
 */
package ch.squaredesk.nova.comm;

import ch.squaredesk.nova.metrics.Metrics;
import io.reactivex.functions.Function;

public abstract class CommAdapter {
    protected MessageTranscriber messageTranscriber;
    protected Metrics metrics;

    protected CommAdapter(MessageTranscriber messageTranscriber, Metrics metrics) {
        this.messageTranscriber = messageTranscriber;
        this.metrics = metrics;
    }

    public  void registerClassSpecificTranscribers (Class targetClass,
                                                       Function outgoingMessageTranscriber,
                                                       Function incomingMessageTranscriber) {
        messageTranscriber.registerClassSpecificTranscribers(targetClass, outgoingMessageTranscriber, incomingMessageTranscriber);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy