Interface | Description |
---|---|
Message |
A
Message that can be sent to a MessageChannel . |
MessageChannelObserver |
A
MessageChannelObserver observes changes made to a MessageChannel instance. |
MessageFilter | |
MessageHandler | |
MessageTranslator |
A
MessageTranslator is used to translate one Message being processed by a MessageChannel instance, into a possibly different one. |
MessagingObserver |
A
MessagingObserver observes changes made to a Messaging instance. |
Class | Description |
---|---|
MessageChannel |
A
MessageChannel is a channel in which you can send Message s. |
MessageChannelObservers |
A class that consists exclusively of static methods that operates on or returns
MessageChannelObserver s. |
Messages |
A class that consists exclusively of static methods that operates on or returns
Message s. |
Messaging |
A
Messaging is an abstract base class for defining a messaging system. |
CIT Messaging is a library for creating arbitrary messaging systems.
This library mainly provides the abstractions upon which you build your messaging system. This means that you will either have to use an existing extension of it, or build your own, in order to use it. Only a few concrete classes are available for use.
To use this library, you need to understand the concepts provided. So here follows an overview of the concepts.
Message
is an abstraction for arbitrary messages that can be sent to and received from a message channel.MessageChannel
is an abstraction for a message channel to which you can send, or from which you can receive messages.MessageChannelObserver
is an interface that you can implement to observe what's going on in a MessageChannel
instance.MessageFilter
is an interface that you can implement to filter what messages a message channel should process.MessageHandler
is an interface that you can implement to handle messages that were processed by a message channel.MessageTranslator
is an interface that you can implement to translate a message into a different message as part of the message channel processing.Messaging
is the core class of this library, which you may have to implement yourself.MessagingObserver
is an interface that you can implement to observe what's going on in a Messaging
instance.The following example demonstrates how you can use this library.
MyMessaging myMessaging = new MyMessaging();
myMessaging.addMessagingObserver(new MyMessagingObserver());
myMessaging.getMessageChannel().addMessageChannelObserver(new MyMessageChannelObserver());
myMessaging.getMessageChannel().addMessageFilter(new MyMessageFilter());
myMessaging.getMessageChannel().addMessageHandler(new MyMessageHandler());
myMessaging.getMessageChannel().addMessageTranslator(new MyMessageTranslator());
myMessaging.start();
myMessaging.getMessageChannel().sendMessage(new MyMessage("Hello, World!"));
The official extensions of this library will be listed below.
Messaging
and adds an API for logging.Messaging
and adds an API for server development.