/** * 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). * Or if the server version of this filter is different, you have a chance to change the filter. * @param remoteSession The remote session to link/set. */ public BaseMessageFilter linkRemoteSession(Object remoteSession) { return new ServerSessionMessageFilter(this.getQueueName(), this.getQueueType(), null, remoteSession, m_bPrivate, true); // This is hooked to a thin filter } }
/** * Constructor. * @param strQueueName The queue name. * @param strQueueType The queue type. * @param source The source (sender). * @param session The remote session. * @param propertiesForFilter The properties for the filter. */ public ClientSessionMessageFilter(String strQueueName, String strQueueType, Object source, RemoteSession session, Map propertiesForFilter) { this(); this.init(strQueueName, strQueueType, source, session, propertiesForFilter, false); } /**
Properties properties = new Properties(); BaseMessageFilter filterForSession = new ClientSessionMessageFilter(null, m_remoteSession, properties);
/** * Constructor. * @param strQueueName The queue name. * @param strQueueType The queue type. * @param source The source (sender). * @param session The remote session. * @param propertiesForFilter The properties for the filter. */ public void init(String strQueueName, String strQueueType, Object source, RemoteSession session, Map propertiesForFilter, boolean bPrivate) { super.init(strQueueName, strQueueType, source, null); m_session = session; m_propertiesForFilter = propertiesForFilter; m_bPrivate = bPrivate; this.setThinTarget(true); // Yes, this is always a thin target } /**
if (filterForSession instanceof ClientSessionMessageFilter) if (((ClientSessionMessageFilter)filterForSession).getRemoteSession() == remoteSession)
Properties properties = new Properties(); properties.setProperty(MessageConstants.CLASS_NAME, MessageConstants.GRID_FILTER); BaseMessageFilter filterForSession = new ClientSessionMessageFilter(MessageConstants.RECORD_QUEUE_NAME, MessageConstants.INTRANET_QUEUE, this, remoteSessionMain, properties); filterForSession.addMessageListener(listenerForSession); synchronized (this.getBaseApplet().getRemoteTask())
BaseMessageFilter filterForSession = new ClientSessionMessageFilter(MessageConstants.RECORD_QUEUE_NAME, MessageConstants.INTRANET_QUEUE, this, bookingDetailSession, properties); filterForSession.addMessageListener(listenerForSession); synchronized (this.getBaseApplet().getRemoteTask())
/** * Constructor. * @param strQueueName The queue name. * @param strQueueType The queue type. * @param source The source (sender). * @param session The remote session. * @param propertiesForFilter The properties for the filter. */ public ClientSessionMessageFilter(String strQueueName, String strQueueType, Object source, RemoteSession session, Map propertiesForFilter, boolean bPrivate) { this(); this.init(strQueueName, strQueueType, source, session, propertiesForFilter, bPrivate); } /**
/** * Constructor. * @param strQueueName The queue name. * @param strQueueType The queue type. * @param source The source (sender). * @param session The remote session. * @param propertiesForFilter The properties for the filter. */ public ClientSessionMessageFilter(Object source, RemoteSession session, Map propertiesForFilter) { this(); this.init(MessageConstants.SESSION_QUEUE_NAME, MessageConstants.INTRANET_QUEUE, source, session, propertiesForFilter, true); } /**