*/
public void subscribeFromPeer(String destinationId, Boolean subscribe, String selector, String subtopic, Object remoteAddress)
{
Destination destination = getDestination(destinationId);
RemoteSubscriptionManager subMgr = ((MessageDestination) destination).getRemoteSubscriptionManager();
if (destination instanceof MessageDestination)
{
if (Log.isDebug())
Log.getLogger(MessageService.LOG_CATEGORY).debug("Received subscription from peer: " + remoteAddress + " subscribe? " + subscribe + " selector: " + selector + " subtopic: " + subtopic);
if (subscribe.booleanValue())
subMgr.addSubscriber(remoteAddress, selector, subtopic, null);
else
subMgr.removeSubscriber(remoteAddress, selector, subtopic, null);
}
else if (Log.isError())
Log.getLogger(LOG_CATEGORY).error("subscribeFromPeer called with destination: " + destinationId + " that is not a MessageDestination");
}