|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteneter.messaging.messagingsystems.httpmessagingsystem.HttpMessagingSystemFactory
public class HttpMessagingSystemFactory
Messaging system delivering messages via HTTP.
It creates the communication channels using HTTP for sending and receiving messages.
The channel id must be a valid URI address. E.g.: http://127.0.0.1/something/ or https://127.0.0.1/something/.
Because HTTP is request-response based protocol, it does not keep the connection open.
Therefore, for the bidirectional communication used by duplex channels, the polling mechanism is used.
The duplex output channel regularly polls for response messages and the duplex input channel constantly measures the inactivity time
to recognize whether the duplex output channel is still connected.
Notice, to start listening via input channel (or duplex input channel), the application must be executed with sufficient rights.
Otherwise the exception will be thrown.
Constructor Summary | |
---|---|
HttpMessagingSystemFactory()
Constructs the factory that will create channels with default settings. |
|
HttpMessagingSystemFactory(int pollingFrequency,
int inactivityTimeout)
Constructs the factory that will create channel with specified settings. |
|
HttpMessagingSystemFactory(int pollingFrequency,
int inactivityTimeout,
IProtocolFormatter protocolFormatter)
Constructs the factory that will create channel with specified settings. |
Method Summary | |
---|---|
IDuplexInputChannel |
createDuplexInputChannel(java.lang.String channelId)
Creates the duplex input channel which can receive and send messages to the duplex output channel using UDP. |
IDuplexOutputChannel |
createDuplexOutputChannel(java.lang.String channelId)
Creates duplex output channel which can send and receive messages from the duplex input channel using HTTP. |
IDuplexOutputChannel |
createDuplexOutputChannel(java.lang.String channelId,
java.lang.String responseReceiverId)
Creates duplex output channel which can send and receive messages from the duplex input channel using HTTP. |
IThreadDispatcherProvider |
getInputChannelThreading()
Gets threading mode used for input channels. |
IThreadDispatcherProvider |
getOutputChannelThreading()
Gets threading mode used for output channels. |
HttpMessagingSystemFactory |
setInputChannelThreading(IThreadDispatcherProvider inputChannelThreading)
Sets threading mode for input channels. |
HttpMessagingSystemFactory |
setOutputChannelThreading(IThreadDispatcherProvider outputChannelThreading)
Sets threading mode for output channels. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HttpMessagingSystemFactory()
public HttpMessagingSystemFactory(int pollingFrequency, int inactivityTimeout)
pollingFrequency
- how often the duplex output channel polls for the pending response messagesinactivityTimeout
- maximum time (measured by duplex input channel),
the duplex output channel does not have to poll
for response messages. If the time is exceeded, the duplex output channel is considered as disconnected.public HttpMessagingSystemFactory(int pollingFrequency, int inactivityTimeout, IProtocolFormatter protocolFormatter)
pollingFrequency
- how often the duplex output channel polls for the pending response messagesinactivityTimeout
- maximum time (measured by duplex input channel),
the duplex output channel does not have to poll
for response messages. If the time is exceeded, the duplex output channel is considered as disconnected.protocolFormatter
- formatter for low-level messages between duplex output channel and duplex input channelMethod 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 HttpMessagingSystemFactory setInputChannelThreading(IThreadDispatcherProvider inputChannelThreading)
inputChannelThreading
- threading model
public IThreadDispatcherProvider getInputChannelThreading()
public HttpMessagingSystemFactory setOutputChannelThreading(IThreadDispatcherProvider outputChannelThreading)
outputChannelThreading
-
public IThreadDispatcherProvider getOutputChannelThreading()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |