/** * Handle the command send from my client peer. * @param in The (optional) Inputstream to get the params from. * @param out The stream to write the results. */ public void doProcess(InputStream in, PrintWriter out, Map<String, Object> properties) throws RemoteException { String strCommand = this.getProperty(REMOTE_COMMAND, properties); if (GET_REMOTE_TABLE.equals(strCommand)) { String strName = this.getNextStringParam(in, NAME, properties); RemoteTable remoteTable = ((RemoteSession)m_remoteObject).getRemoteTable(strName); // First, see if this is in my list already? String strID = this.find(remoteTable); if (strID == null) strID = this.add(new TableHolder(this, remoteTable)); this.setReturnString(out, strID); } else if (SETUP_REMOTE_SESSION_FILTER.equals(strCommand)) { org.jbundle.thin.base.message.BaseMessageFilter filter = (org.jbundle.thin.base.message.BaseMessageFilter)this.getNextObjectParam(in, FILTER, properties); filter = ((RemoteSession)m_remoteObject).setupRemoteSessionFilter(filter); this.setReturnObject(out, filter); } else super.doProcess(in, out, properties); } }
remoteFilter = remoteSession.setupRemoteSessionFilter(remoteFilter); // This has the effect of calling: messageFilter.linkRemoteSession(remoteSession);