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

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

Go to download

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

The newest version!
package eu.hgross.blaubot.messaging;

import java.util.concurrent.ConcurrentSkipListSet;

public class ChannelInfo {
    private final String ownDeviceId;
    private BlaubotChannel channel;

    public ChannelInfo(BlaubotChannel channel, String ownDeviceId) {
        this.channel = channel;
        this.ownDeviceId = ownDeviceId;
    }

    public BlaubotChannelConfig getChannelConfig() {
        return channel.getChannelConfig();
    }

    public int getQueueSize() {
        return channel.getQueueSize();
    }

    public int getQueueCapacity() {
        return channel.getQueueCapacity();
    }

    public ConcurrentSkipListSet getSubscriptions() {
        return channel.getSubscriptions();
    }

    public boolean isActive() {
        return channel.isActive();
    }

    public long getSentBytes() {
        return channel.getSentBytes();
    }

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

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

    public long getReceivedBytes() {
        return channel.getReceivedBytes();
    }

    public BlaubotChannel getChannel() {
        return channel;
    }

    public boolean isOwnDeviceSubscriberToChannel() {
        return getSubscriptions().contains(ownDeviceId);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy