com.mirth.connect.server.userutil
Class VMRouter

java.lang.Object
  extended by com.mirth.connect.server.userutil.VMRouter

public class VMRouter
extends java.lang.Object

Utility class used to dispatch messages to channels.


Constructor Summary
VMRouter()
          Instantiates a VMRouter object.
 
Method Summary
 Response routeMessage(java.lang.String channelName, RawMessage rawMessage)
          Dispatches a message to a channel, specified by the deployed channel name.
 Response routeMessage(java.lang.String channelName, java.lang.String message)
          Dispatches a message to a channel, specified by the deployed channel name.
 Response routeMessage(java.lang.String channelName, java.lang.String message, boolean useQueue)
          Deprecated. This method is deprecated and will soon be removed. Please use routeMessage(channelName, message) instead. The useQueue parameter will not be used. If you want the downstream channel to queue its message and return immediately upon receipt, enable the source queue on the source connector.
 Response routeMessageByChannelId(java.lang.String channelId, java.lang.Object message, boolean useQueue)
          Deprecated. This method is deprecated and will soon be removed. Please use routeMessageByChannelId(channelId, message) instead. The useQueue parameter will not be used. If you want the downstream channel to queue its message and return immediately upon receipt, enable the source queue on the source connector.
 Response routeMessageByChannelId(java.lang.String channelId, RawMessage rawMessage)
          Dispatches a message to a channel, specified by the deployed channel ID.
 Response routeMessageByChannelId(java.lang.String channelId, java.lang.String message)
          Dispatches a message to a channel, specified by the deployed channel ID.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VMRouter

public VMRouter()
Instantiates a VMRouter object.

Method Detail

routeMessage

public Response routeMessage(java.lang.String channelName,
                             java.lang.String message)
Dispatches a message to a channel, specified by the deployed channel name.

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

public Response routeMessage(java.lang.String channelName,
                             RawMessage rawMessage)
Dispatches a message to a channel, specified by the deployed channel name.

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.

routeMessage

public Response routeMessage(java.lang.String channelName,
                             java.lang.String message,
                             boolean useQueue)
Deprecated. This method is deprecated and will soon be removed. Please use routeMessage(channelName, message) instead. The useQueue parameter will not be used. If you want the downstream channel to queue its message and return immediately upon receipt, enable the source queue on the source connector.

Dispatches a message to a channel, specified by the deployed channel name.

Parameters:
channelName - The name of the deployed channel to dispatch the message to.
message - The message to dispatch to the channel.
useQueue - This parameter is no longer used. If you want the downstream channel to queue its message and return immediately upon receipt, enable the source queue on the source connector.
Returns:
The Response object returned by the channel, if its source connector is configured to return one.

routeMessageByChannelId

public Response routeMessageByChannelId(java.lang.String channelId,
                                        java.lang.Object message,
                                        boolean useQueue)
Deprecated. This method is deprecated and will soon be removed. Please use routeMessageByChannelId(channelId, message) instead. The useQueue parameter will not be used. If you want the downstream channel to queue its message and return immediately upon receipt, enable the source queue on the source connector.

Dispatches a message to a channel, specified by the deployed channel ID.

Parameters:
channelId - The ID of the deployed channel to dispatch the message to.
message - The message to dispatch to the channel.
useQueue - This parameter is no longer used. If you want the downstream channel to queue its message and return immediately upon receipt, enable the source queue on the source connector.
Returns:
The Response object returned by the channel, if its source connector is configured to return one.

routeMessageByChannelId

public Response routeMessageByChannelId(java.lang.String channelId,
                                        java.lang.String message)
Dispatches a message to a channel, specified by the deployed channel ID.

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

public Response routeMessageByChannelId(java.lang.String channelId,
                                        RawMessage rawMessage)
Dispatches a message to a channel, specified by the deployed channel ID.

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.