BaseMessageHeader messageHeader = message.getMessageHeader(); String strQueueName = messageHeader.getQueueName(); String strQueueType = messageHeader.getQueueType(); Integer intRegID = messageHeader.getRegistryIDMatch(); JSONObject jsonObj = new JSONObject();
m_properties.put(MessageConstants.QUEUE_NAME, message.getMessageHeader().getQueueName()); if (m_properties.get(MessageConstants.QUEUE_TYPE) == null) m_properties.put(MessageConstants.QUEUE_TYPE, message.getMessageHeader().getQueueType()); m_properties.remove(ServletTask.APPLICATION); m_properties.remove(MessageInfoApplication.AUTOSTART); properties.remove(MessageInfoApplication.AUTOSTART); properties.put(DBParams.PROCESS, strProcessClass); BaseMessage messageInitial = new MapMessage(new BaseMessageHeader(message.getMessageHeader().getQueueName(), message.getMessageHeader().getQueueType(), this, null), properties); env.getMessageManager(m_application, true).sendMessage(messageInitial); // Resend it! (Don't consume it!)
/** * Send this message to the remote send queue (who will pass it on). * @param message The message to send. */ public void sendMessage(Message message) { try { if (((RemoteMessageQueue)this.getMessageQueue()).isSendRemoteMessage((BaseMessage)message) == false) return; if (((BaseMessage)message).isProcessedByServer()) return; // Don't send back down (the server already processed it). if (((BaseMessage)message).isConsumed()) return; // Don't send if already handled. if (MessageConstants.LOCAL_QUEUE.equalsIgnoreCase(((BaseMessage)message).getMessageHeader().getQueueType())) return; // Local queue only synchronized (m_sendQueue) { // In case this is called from another task m_sendQueue.sendMessage(message); } } catch (RemoteException ex) { ex.printStackTrace(); } } }
m_properties.put(MessageConstants.QUEUE_NAME, message.getMessageHeader().getQueueName()); if (m_properties.get(MessageConstants.QUEUE_TYPE) == null) m_properties.put(MessageConstants.QUEUE_TYPE, message.getMessageHeader().getQueueType()); m_properties.remove(DBParams.APPLICATION); m_properties.remove(MessageApplication.AUTOSTART); properties.remove(MessageApplication.AUTOSTART); properties.put(DBParams.PROCESS, strProcessClass); BaseMessage messageInitial = new MapMessage(new BaseMessageHeader(message.getMessageHeader().getQueueName(), message.getMessageHeader().getQueueType(), this, null), properties); env.getMessageManager(m_application, true).sendMessage(messageInitial); // Resend it! (Don't consume it!)
/** * If you are sending a thick message to a thin client, convert it first. * Since BaseMessage is already, so conversion is necessary... return this message. * @return this message. */ public BaseMessage convertToThinMessage() { int iChangeType = ((RecordMessageHeader)this.getMessageHeader()).getRecordMessageType(); // See if this record is currently displayed or buffered, if so, refresh and display. Object data = this.getData(); BaseMessage messageTableUpdate = null; // NOTE: The only way I will send this message to the client is if the ModelMessageHandler.START_INDEX_PARAM has been added to this message by the TableSession // if (properties.get(ModelMessageHandler.START_INDEX_PARAM) != null) { BaseMessageHeader messageHeader = new SessionMessageHeader(this.getMessageHeader().getQueueName(), this.getMessageHeader().getQueueType(), null, this); messageTableUpdate = new MapMessage(messageHeader, data); messageTableUpdate.put(MessageConstants.MESSAGE_TYPE_PARAM, Integer.toString(iChangeType)); } return messageTableUpdate; } }
/** * If you are sending a thick message to a thin client, convert it first. * Since BaseMessage is already, so conversion is necessary... return this message. * @return this message. */ public BaseMessage convertToThinMessage() { int iChangeType = ((RecordMessageHeader)this.getMessageHeader()).getRecordMessageType(); // See if this record is currently displayed or buffered, if so, refresh and display. Object data = this.getData(); BaseMessage messageTableUpdate = null; // NOTE: The only way I will send this message to the client is if the ModelMessageHandler.START_INDEX_PARAM has been added to this message by the TableSession // if (properties.get(ModelMessageHandler.START_INDEX_PARAM) != null) { BaseMessageHeader messageHeader = new SessionMessageHeader(this.getMessageHeader().getQueueName(), this.getMessageHeader().getQueueType(), null, this); messageTableUpdate = new MapMessage(messageHeader, data); messageTableUpdate.put(MessageConstants.MESSAGE_TYPE_PARAM, Integer.toString(iChangeType)); } return messageTableUpdate; } }
String strQueueType = messageHeader.getQueueType(); String strQueueName = messageHeader.getQueueName(); if (MessageConstants.LOCAL_QUEUE.equalsIgnoreCase(strQueueType))
String strMessage = (String)internalMessage.get(MESSAGE_PARAM); BaseMessageHeader messageReplyHeader = null; messageReplyHeader = new TrxMessageHeader(inMessageHeader.getQueueName(), inMessageHeader.getQueueType(), null);
String strQueueType = messageHeader.getQueueType(); String strQueueName = messageHeader.getQueueName(); if (MessageConstants.LOCAL_QUEUE.equalsIgnoreCase(strQueueType))
String strQueueType = messageHeader.getQueueType(); String strQueueName = messageHeader.getQueueName(); if (MessageConstants.LOCAL_QUEUE.equalsIgnoreCase(strQueueType))
recMessageLog.getField(MessageLog.kMessageQueueType).setString(trxMessage.getMessageHeader().getQueueType()); Map<String,Object> propHeaderInfo = ((TrxMessageHeader)trxMessage.getMessageHeader()).getMessageInfoMap(); if (propHeaderInfo != null)