* @param client target client
* @param format a format string, such as spectrum/fits or spectrum/votable
* @return sender
*/
private Sender getSender(Client client, String format) {
Subscriptions subs = client.getSubscriptions();
for (Sender sender : SENDERS) {
if (subs.isSubscribed(sender.getMtype())
&& (format == null || format.equals(sender.getFormat()))) {
return sender;
}
}
return null;