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

eu.hgross.blaubot.messaging.ConnectionInfo Maven / Gradle / Ivy

Go to download

An easy to use publish/subscribe middleware to create and communicate through dynamically created adhoc networks.

There is a newer version: 2.0.0-beta.2
Show newest version
package eu.hgross.blaubot.messaging;

import eu.hgross.blaubot.core.IBlaubotConnection;
import eu.hgross.blaubot.core.IBlaubotDevice;

public class ConnectionInfo {
    private final BlaubotMessageManager messageManager;
    private final BlaubotMessageSender messageSender;
    private final BlaubotMessageReceiver messageReceiver;

    public ConnectionInfo(BlaubotMessageManager messageManager) {
        this.messageManager = messageManager;
        this.messageSender = messageManager.getMessageSender();
        this.messageReceiver = messageManager.getMessageReceiver();
    }

    public int getMessageSenderQueueSize() {
        return messageSender.getQueueSize();
    }

    public IBlaubotDevice getBlaubotDevice() {
        return messageSender.getBlaubotConnection().getRemoteDevice();
    }

    public long getSentMessages() {
        return messageSender.getSentMessages();
    }

    public long getSentPayloadBytes() {
        return messageSender.getSentPayloadBytes();
    }

    public IBlaubotConnection getBlaubotConnection() {
        return messageSender.getBlaubotConnection();
    }

    public long getReceivedMessages() {
        return messageReceiver.getReceivedMessages();
    }

    public long getReceivedPayloadBytes() {
        return messageReceiver.getReceivedPayloadBytes();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy