
org.miv.mbox.MBox Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mbox2 Show documentation
Show all versions of mbox2 Show documentation
The message box acts as a buffer for incoming messages. Its major property is
to be usable from any thread. This allows any external source to post any
message at any time without having to wonder about synchronisation.
The newest version!
package org.miv.mbox;
/**
* Container for incoming messages.
*
*
* The message box acts as a buffer for incoming messages. Its major property is
* to be usable from any thread. This allows any external source to post any
* message at any time without having to wonder about synchronisation.
*
*
*
* This interface contains only one command: {@link #post(String, Object[])}
* that allow to post messages in the message box. The way messages are
* retrieved inside the box depends on particular implementations (after all,
* only a postman can open mail boxes).
*
*
* @author Antoine Dutot
* @since 20040624
*/
public interface MBox
{
// Commands
/**
* Post a message in the message box. This method can be called from another
* thread.
* @param from Identifier of the sending object.
* @param data Array of posted objects.
*/
void
post( String from, Object ... data ) throws CannotPostException;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy