public List doRemoteBrowse(Filter filter)
List doRemoteBrowse(Filter filter)
   public List doRemoteBrowse(Filter filter)   {      if (log.isTraceEnabled()) { log.trace(this + " remote browse" + (filter == null ? "" : ", filter = " + filter)); }      RpcServerCall rpcServerCall =            new RpcServerCall(queue.getName(), "remoteBrowse",                              new Object[] {getPeerIdentity(), filter},                              new String[] {"org.jboss.messaging.core.distributed.PeerIdentity",                                            "org.jboss.messaging.core.Filter"});      // TODO use the timout when I'll change the send() signature or deal with the timeout      Collection responses = rpcServerCall.remoteInvoke(dispatcher, TIMEOUT);      if (log.isTraceEnabled()) { log.trace(this + " received " + responses.size() + " response(s) on browse request"); }      List messages = new ArrayList();      ServerResponse r = null;      try      {         for(Iterator i = responses.iterator(); i.hasNext(); )         {            r = (ServerResponse)i.next();            if (log.isTraceEnabled()) { log.trace(this + " received: " + r); }            Object o = r.getInvocationResult();            if (o instanceof Throwable)            {               throw (Throwable)o;            }            List l = (List)o;            messages.addAll(l);         }      }      catch(Throwable t)      {         String msg = RpcServer.               subordinateToString(r.getCategory(), r.getSubordinateID(), r.getAddress()) +               " failed to handle the browse request";         log.error(msg, t);         // TODO currently I just throw an unchecked exception, but I should modify browse() signature to throw a Throwable         //throw new DistributedException(msg, t);         throw new RuntimeException(msg, t);      }      return messages;   }