|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteneter.messaging.messagingsystems.composites.BufferedMonitoredMessagingFactory
public class BufferedMonitoredMessagingFactory
This messaging combines buffered and monitored messaging.
Monitored messaging constantly monitors the connection and if the disconnection is detected the buffered messaging
is notified. Buffered messaging then tries to reconnect and meanwhile stores all sent messages into a buffer.
Once the connection is recovered the messages stored in the buffer are sent.
The buffered monitored messaging is composed from following messagings:
// Create TCP messaging system.
IMessagingSystemFactory anUnderlyingMessaging = new TcpMessagingSystemFactory();
// Create buffered monitored messaging which takes TCP as underlying messaging.
IMessagingSystemFactory aMessaging = new BufferedMonitoredMessagingFactory(anUnderlyingMessaging);
// Then creating channels which can be then attached to communication components.
IDuplexInputChannel anInputChannel = aMessaging.createDuplexInputChannel("tcp://127.0.0.1:8095/");
IDuplexInputChannel anOutputChannel = aMessaging.createDuplexOutputChannel("tcp://127.0.0.1:8095/");
Constructor Summary | |
---|---|
BufferedMonitoredMessagingFactory(IMessagingSystemFactory underlyingMessaging)
Constructs the factory with default settings. |
|
BufferedMonitoredMessagingFactory(IMessagingSystemFactory underlyingMessaging,
long maxOfflineTime,
long pingFrequency,
long pingResponseTimeout)
Constructs the factory with the specified parameters. |
Method Summary | |
---|---|
IDuplexInputChannel |
createDuplexInputChannel(java.lang.String channelId)
Creates the input channel which can receive and send messages. |
IDuplexOutputChannel |
createDuplexOutputChannel(java.lang.String channelId)
Creates the output channel which can send and receive messages. |
IDuplexOutputChannel |
createDuplexOutputChannel(java.lang.String channelId,
java.lang.String responseReceiverId)
Creates the output channel which can send and receive messages. |
BufferedMessagingFactory |
getBufferedMessaging()
Returns underlying buffered messaging. |
MonitoredMessagingFactory |
getMonitoredMessaging()
Returns underlying monitored messaging. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BufferedMonitoredMessagingFactory(IMessagingSystemFactory underlyingMessaging)
underlyingMessaging
- underlying messaging system e.g. TCP, ...public BufferedMonitoredMessagingFactory(IMessagingSystemFactory underlyingMessaging, long maxOfflineTime, long pingFrequency, long pingResponseTimeout)
underlyingMessaging
- underlying messaging system e.g. TCP, ...maxOfflineTime
- the maximum time, the messaging can work offline. When the messaging works offline,
the sent messages are buffered and the connection is being reopened. If the connection is
not reopen within maxOfflineTime, the connection is closed.pingFrequency
- how often the connection is checked with the 'ping' requests.pingResponseTimeout
- the maximum time, the response for the 'ping' is expected.Method Detail |
---|
public IDuplexOutputChannel createDuplexOutputChannel(java.lang.String channelId) throws java.lang.Exception
createDuplexOutputChannel
in interface IMessagingSystemFactory
channelId
- address of the input channel.
java.lang.Exception
public IDuplexOutputChannel createDuplexOutputChannel(java.lang.String channelId, java.lang.String responseReceiverId) throws java.lang.Exception
createDuplexOutputChannel
in interface IMessagingSystemFactory
channelId
- address of the input channel.responseReceiverId
- unique identifier of the output channel. If the value is null then the identifier is genearated automatically
java.lang.Exception
public IDuplexInputChannel createDuplexInputChannel(java.lang.String channelId) throws java.lang.Exception
createDuplexInputChannel
in interface IMessagingSystemFactory
channelId
- address of the input channel.
java.lang.Exception
public BufferedMessagingFactory getBufferedMessaging()
public MonitoredMessagingFactory getMonitoredMessaging()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |