public interface IDuplexBroker extends IAttachableDuplexInputChannel
Modifier and Type | Method and Description |
---|---|
Event<BrokerMessageReceivedEventArgs> |
brokerMessageReceived()
The event is invoked when the observed message is received.
|
Event<SubscribeInfoEventArgs> |
clientSubscribed()
The event is invoked when the broker subscribed a client for messages.
|
Event<SubscribeInfoEventArgs> |
clientUnsubscribed()
The event is invoked when the broker unsubscribed a client from messages.
|
java.lang.String[] |
getSubscribedMessages(java.lang.String responseReceiverId)
Returns messages which are subscribed by the given subscriber.
|
java.lang.String[] |
GetSubscribedResponseReceivers(java.lang.String messageTypeId)
Returns subscribers which are subscribed for the given message type id.
|
Event<PublishInfoEventArgs> |
messagePublished()
The event is invoked when the publisher published a message to subscribers.
|
void |
sendMessage(java.lang.String messageType,
java.lang.Object serializedMessage)
Publishes the message.
|
void |
subscribe(java.lang.String messageType)
Subscribes for the message type.
|
void |
subscribe(java.lang.String[] messageTypes)
Subscribes for list of message types.
|
void |
unsubscribe()
Unsubscribe all messages.
|
void |
unsubscribe(java.lang.String messageType)
Unsubscribes from the specified message type.
|
void |
unsubscribe(java.lang.String[] messageTypes)
Unsubscribes from specified message types.
|
attachDuplexInputChannel, detachDuplexInputChannel, getAttachedDuplexInputChannel, isDuplexInputChannelAttached
Event<PublishInfoEventArgs> messagePublished()
Event<SubscribeInfoEventArgs> clientSubscribed()
Event<SubscribeInfoEventArgs> clientUnsubscribed()
Event<BrokerMessageReceivedEventArgs> brokerMessageReceived()
void sendMessage(java.lang.String messageType, java.lang.Object serializedMessage) throws java.lang.Exception
messageType
- identifies the type of the published message. The broker will forward the message
to all subscribers subscribed to this message type.serializedMessage
- message content.java.lang.Exception
void subscribe(java.lang.String messageType) throws java.lang.Exception
messageType
- identifies the type of the message which shall be subscribed.java.lang.Exception
void subscribe(java.lang.String[] messageTypes) throws java.lang.Exception
messageTypes
- list of message types which shall be subscribed.java.lang.Exception
void unsubscribe(java.lang.String messageType) throws java.lang.Exception
messageType
- message type the client does not want to receive anymore.java.lang.Exception
void unsubscribe(java.lang.String[] messageTypes) throws java.lang.Exception
messageTypes
- list of message types the client does not want to receive anymore.java.lang.Exception
void unsubscribe() throws java.lang.Exception
java.lang.Exception
java.lang.String[] getSubscribedMessages(java.lang.String responseReceiverId)
responseReceiverId
- subscriber response receiver id.java.lang.String[] GetSubscribedResponseReceivers(java.lang.String messageTypeId)
messageTypeId
- >message type id