*
* @return remoting destination corresponding to the supplied server id and destination name
*/
public static RemotingDestination getRemotingDestination(String serverId, String destinationName)
{
MessageBroker broker = MessageBroker.getMessageBroker(serverId);
if (broker == null)
{
// Unable to locate a MessageBroker initialized with server id ''{0}''
MessageException me = new MessageException();
me.setMessage(NO_MESSAGE_BROKER, new Object[] { serverId });
throw me;
}
RemotingService rs = (RemotingService) broker.getServiceByType(REMOTING_SERVICE_CLASS);
if (rs == null)
{
// MessageBroker with server id ''{0}'' does not contain a service with class flex.messaging.remoting.RemotingService
MessageException me = new MessageException();
me.setMessage(NO_REMOTING_SERVICE, new Object[] { serverId });