Package eneter.messaging.messagingsystems.composites

Functionality extending the default behavior of messaging systems.

See:
          Description

Interface Summary
ICompositeDuplexInputChannel The interface declares the composite duplex input channel.
ICompositeDuplexOutputChannel The interface declares the composite duplex output channel.
ICompositeOutputChannel The interface declares the composit output channel.
 

Class Summary
BufferedMonitoredMessagingFactory Extends the communication by the buffered messaging and the network connection monitoring.
 

Package eneter.messaging.messagingsystems.composites Description

Functionality extending the default behavior of messaging systems. E.g.: Buffering of sent messages, or network connection monitoring.
The composite is a messaging system derived from IMessagingSystemFactory and implements the extending functionality. It means, e.g. if you wish to buffer sent messages during the disconnection, you can create the buffered messaging system.

 Creating of the buffered messaging using the TCP as the underlying messaging system.

 // Create TCP messaging system.
 IMessagingSystemFactory anUnderlyingMessaging = new TcpMessagingSystemFactory();
 
 // Create the buffered messaging using TCP as the underlying messaging.
 IMessagingSystemFactory aBufferedMessaging = new BufferedMessagingFactory(anUnderlyingMessaging);

 
Creating buffered messaging that internally uses monitored messaging constantly monitoring the connection.
 Creating the TCP based messaging system constantly checking the network connection and providing the buffer
 for sent messages in case of the disconnection.

 // Create TCP messaging system.
 IMessagingSystemFactory aTcpMessaging = new TcpMessagingSystemFactory();
 
 // Create the composite providing the network connection monitor.
 IMessagingSystemFactory aMonitoredMessaging = new MonitoredMessagingFactory(aTcpMessaging);
 
 // Create the composite providing the buffer used for the sent messages in case of the disconnection.
 IMessagingSystemFactory aBufferedMonitoredMessaging = new BufferedMessagingFactory(aMonitoredMessaging);
 
 
 ...
 
 // Create the duplex output channel, that monitores the network connection and buffers sent messages if disconnected.
 IDuplexOutputChannel aDuplexOutputChannel = aBufferedMonitoredMessaging.createDuplexOutputChannel("tcp://127.0.0.1:6080/");