/** * Link this filter to this remote session. * This is ONLY used in the server (remote) version of a filter. * Override this to finish setting up the filter (such as behavior to adjust this filter). * In this case, the source cannot be passed to the remote session because it is the * record, so the record must be re-linked to this (remote) session. */ public BaseMessageFilter linkRemoteSession(Object remoteSession) { if (remoteSession instanceof RemoteSession) if (remoteSession instanceof RecordOwner) // Always if (m_source == null) { String strTableName = (String)this.getProperties().get(TABLE_NAME); Record record = (Record)((RecordOwner)remoteSession).getRecord(strTableName); if (record != null) { record.addListener(new SyncRecordMessageFilterHandler(this, true)); m_source = record; } } return super.linkRemoteSession(remoteSession); } /**
/** * Link this filter to this remote session. * This is ONLY used in the server (remote) version of a filter. * Override this to finish setting up the filter (such as behavior to adjust this filter). * In this case, the source cannot be passed to the remote session because it is the * record, so the record must be re-linked to this (remote) session. */ public BaseMessageFilter linkRemoteSession(Object remoteSession) { if (remoteSession instanceof org.jbundle.base.remote.db.Session) if (m_source == null) { String strTableName = (String)this.getProperties().get(TABLE_NAME); Record record = ((org.jbundle.base.remote.db.Session)remoteSession).getRecord(strTableName); if (record != null) { record.addListener(new SyncRecordMessageFilterHandler(this, true)); m_source = record; } } return super.linkRemoteSession(remoteSession); } /**
MessageReceiver messageReceiver = messageManager.getMessageQueue(messageFilter.getQueueName(), messageFilter.getQueueType()).getMessageReceiver(); BaseMessageFilter messageFilterNew = messageFilter.linkRemoteSession(this); // Link the filter and give filter a chance to change the remote version. if (messageFilterNew != messageFilter)