/** * Free this object. */ public void free() { super.free(); } /**
/** * Initializes this message queue. * Adds this queue to the message manager. * @param manager My parent message manager. * @param strQueueName This queue's name. * @param strQueueType This queue's type (LOCAL/JMS). */ public void init(BaseMessageManager manager, String strQueueName, String strQueueType) { super.init(manager, strQueueName, strQueueType); } /**
/** * Creates new MessageSender. * @param server The remote server. * @param baseMessageQueue My parent message queue. */ public void init(RemoteTask server, BaseMessageQueue baseMessageQueue) throws RemoteException { super.init(baseMessageQueue); m_sendQueue = server.createRemoteSendQueue(baseMessageQueue.getQueueName(), baseMessageQueue.getQueueType()); } /**
/** * Get the message sender. * Or create it if it doesn't exist. * @return The message sender. */ public BaseMessageSender getMessageSender() { this.getMessageReceiver(); // This makes sure that a receiver exists to process messages return super.getMessageSender(); } /**
/** * Get the message filter list. * Create a new filter list the first time. * @return The filter list. */ public MessageReceiverFilterList getMessageFilterList() { if (m_filterList == null) { String strFilterType = null; App app = this.getMessageQueue().getMessageManager().getApplication(); if (app != null) strFilterType = app.getProperty(MessageConstants.MESSAGE_FILTER); if (MessageConstants.TREE_FILTER.equals(strFilterType)) m_filterList = new TreeMessageFilterList(this); } return super.getMessageFilterList(); } }
/** * Constructor. * @param server The remote server. * @param baseMessageQueue My parent message queue. */ public void init(RemoteTask server, BaseMessageQueue baseMessageQueue) throws RemoteException { super.init(baseMessageQueue); m_receiveQueue = server.createRemoteReceiveQueue(baseMessageQueue.getQueueName(), baseMessageQueue.getQueueType()); } /**
/** * Run this task thats only job is to pull messages from the server and place them on the local queue. */ public void run() { while (m_receiveQueueThread != null) { Message message = this.receiveMessage(); // Hang until a message comes through if ((m_receiveQueueThread == null) || (message == null)) return; // End of processing, stop this thread. getMessageQueue().getMessageSender().sendMessage(message); // Add to the queue to process } } /**
/** * Get the message filter list. * Create a new filter list the first time. * @return The filter list. */ public MessageReceiverFilterList getMessageFilterList() { if (m_filterList == null) { String strFilterType = null; App app = (Application)this.getMessageQueue().getMessageManager().getApplication(); if (app != null) strFilterType = app.getProperty(MessageConstants.MESSAGE_FILTER); if (MessageConstants.TREE_FILTER.equals(strFilterType)) m_filterList = new TreeMessageFilterList(this); } return super.getMessageFilterList(); } /**
/** * Free all the resources belonging to this applet. If all applet screens are closed, shut down the applet. */ public void free() { if (m_messageStack != null) m_messageStack.free(); m_messageStack = null; super.free(); } /**
/** * Initializes the BaseApplication. * Usually you pass the object that wants to use this sesssion. * For example, the applet or BaseApplication. */ public void init(BaseMessageManager manager, String strQueueName) { super.init(manager, strQueueName, MessageConstants.INTRANET_QUEUE); } /**