/** * Update this filter with this new information. * Override this to do something locally. * Remember to call super after updating this filter, as this method updates the remote copy of this filter. * @param properties New filter information (ie, bookmark=345). * @return The new filter change map (must contain enough information for the remote filter to sync). */ public Map<String,Object> handleUpdateFilterMap(Map<String,Object> propFilter) { if (propFilter != null) { Object objDBType = propFilter.get(DB_TYPE); if (objDBType instanceof Integer) m_iDatabaseType = ((Integer)objDBType).intValue(); } if (propFilter == null) propFilter = new Hashtable<String,Object>(); propFilter.put(DB_TYPE, new Integer(m_iDatabaseType)); // Make sure remote has the same filter info return super.handleUpdateFilterMap(propFilter); // Update any remote copy of this. } /**
/** * Update this filter with this new information. * Override this to do something locally. * Remember to call super after updating this filter, as this method updates the remote copy of this filter. * @param properties New filter information (ie, bookmark=345). * @return The new filter change map (must contain enough information for the remote filter to sync). */ public Map<String,Object> handleUpdateFilterMap(Map<String,Object> propFilter) { if (propFilter != null) { Object objDBType = propFilter.get(DB_TYPE); if (objDBType instanceof Integer) m_iDatabaseType = ((Integer)objDBType).intValue(); } if (propFilter == null) propFilter = new Hashtable<String,Object>(); propFilter.put(DB_TYPE, new Integer(m_iDatabaseType)); // Make sure remote has the same filter info return super.handleUpdateFilterMap(propFilter); // Update any remote copy of this. } /**
/** * Update this filter with this new information. * @param messageFilter The message filter I am updating. * @param properties New filter information (ie, bookmark=345). */ public void updateRemoteFilterProperties(BaseMessageFilter messageFilter, Object[][] mxProperties, Map<String,Object> propFilter) throws RemoteException { Utility.getLogger().info("EJB updateRemoteFilter properties: " + mxProperties); // Give the filter the remote environment BaseMessageManager messageManager = ((Application)this.getTask().getApplication()).getMessageManager(); messageFilter = ((BaseMessageReceiver)messageManager.getMessageQueue(messageFilter.getQueueName(), messageFilter.getQueueType()).getMessageReceiver()).getMessageFilter(messageFilter.getRemoteFilterID()); // Must look it up if (messageFilter != null) // Always { if (mxProperties != null) messageFilter.setFilterTree(mxProperties); if (propFilter != null) { propFilter = messageFilter.handleUpdateFilterMap(propFilter); // Update this object's local filter. messageFilter.setFilterMap(propFilter); // Update any remote copy of this. } } } /**