com.flash3388.flashlib.net.messaging.Messenger Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of flashlib.net.core Show documentation
Show all versions of flashlib.net.core Show documentation
Robotics development framework (flashlib.net.core)
The newest version!
package com.flash3388.flashlib.net.messaging;
import com.beans.observables.RegisteredListener;
/**
* A sender/receiver service for {@link Message} objects with other processes.
*
* @since FlashLib 3.2.0
*/
public interface Messenger {
/**
* Registers a listener for messages. Receives notifications
* on any message type.
*
* @param listener listener
* @return a registration
*/
RegisteredListener addListener(MessageListener listener);
/**
* Registers a listener for messages. Receives notifications only for messages
* of a specific type.
*
* @param listener listener
* @param type type of message
* @return a registrations
*/
RegisteredListener addListener(MessageListener listener, MessageType type);
/**
* Sends a message to the connected remote. If not connected, the message
* is queued until connection is established.
*
* @param message message
*/
void send(Message message);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy