Class VMRouter
java.lang.Object
com.mirth.connect.server.userutil.VMRouter
Utility class used to dispatch messages to channels.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionrouteMessage(String channelName, RawMessage rawMessage) Dispatches a message to a channel, specified by the deployed channel name.routeMessage(String channelName, String message) Dispatches a message to a channel, specified by the deployed channel name.routeMessageByChannelId(String channelId, RawMessage rawMessage) Dispatches a message to a channel, specified by the deployed channel ID.routeMessageByChannelId(String channelId, String message) Dispatches a message to a channel, specified by the deployed channel ID.
-
Constructor Details
-
VMRouter
public VMRouter()Instantiates a VMRouter object.
-
-
Method Details
-
routeMessage
Dispatches a message to a channel, specified by the deployed channel name. If the dispatch fails for any reason (for example, if the target channel is not started), a Response object with the ERROR status and the error message will be returned.- Parameters:
channelName- The name of the deployed channel to dispatch the message to.message- The message to dispatch to the channel.- Returns:
- The Response object returned by the channel, if its source connector is configured to return one.
-
routeMessage
Dispatches a message to a channel, specified by the deployed channel name. If the dispatch fails for any reason (for example, if the target channel is not started), a Response object with the ERROR status and the error message will be returned.- Parameters:
channelName- The name of the deployed channel to dispatch the message to.rawMessage- A RawMessage object to dispatch to the channel.- Returns:
- The Response object returned by the channel, if its source connector is configured to return one.
-
routeMessageByChannelId
Dispatches a message to a channel, specified by the deployed channel ID. If the dispatch fails for any reason (for example, if the target channel is not started), a Response object with the ERROR status and the error message will be returned.- Parameters:
channelId- The ID of the deployed channel to dispatch the message to.message- The message to dispatch to the channel.- Returns:
- The Response object returned by the channel, if its source connector is configured to return one.
-
routeMessageByChannelId
Dispatches a message to a channel, specified by the deployed channel ID. If the dispatch fails for any reason (for example, if the target channel is not started), a Response object with the ERROR status and the error message will be returned.- Parameters:
channelId- The ID of the deployed channel to dispatch the message to.rawMessage- A RawMessage object to dispatch to the channel.- Returns:
- The Response object returned by the channel, if its source connector is configured to return one.
-