Creates new MessageSender.
@param server The remote server.
@param baseMessageQueue My parent message queue.
540215
public void init(RemoteTask server, BaseMessageQueue baseMessageQueue)
        throws RemoteException
    {
        super.init(baseMessageQueue);
        m_sendQueue = server.createRemoteSendQueue(baseMessageQueue.getQueueName(), baseMessageQueue.getQueueType());
    }
1178912
@Override
    public Message newMessage(final String message, final Object... params) {
        return new FormattedMessage(message, params);
    }
188410
@Override
	public MessageToClient createMessageToClient(MessageFromClient message, HttpSession client) {
		return super.createMessageToClient(message, client);
	}
222213
public void onMessage(Message msg) {
	        try {
                    LOG.debug("Queuing msg [" + msg.getJMSMessageID() + "]");
                } catch (JMSException e) {
                }
		this.queue.offer(msg);
	}
209272
public static BaseMessage createMessage(String strMessageClassName, BaseMessageHeader messageHeader, Object data)
    {
       BaseMessage message = null;
       
       if ((strMessageClassName == null)
           && (messageHeader != null))
       {
           strMessageClassName = (String)messageHeader.get(BaseMessageHeader.INTERNAL_MESSAGE_CLASS);
           if ((strMessageClassName == null) || (strMessageClassName.length() == 0))
           {
//?               String strRequestType = (String)messageHeader.get(TrxMessageHeader.MESSAGE_REQUEST_TYPE);
//?               if ((strRequestType == null) || (strRequestType.length() == 0) || (RequestType.MANUAL.equalsIgnoreCase(strRequestType)))
//?                   strMessageClass = ManualMessage.class.getName();
           }
       }
       if ((strMessageClassName != null) && (strMessageClassName.length() > 0))
       {
           strMessageClassName = ClassServiceUtility.getFullClassName(strMessageClassName);
           Object obj = ClassServiceUtility.getClassService().makeObjectFromClassName(strMessageClassName);
           if (obj instanceof BaseMessage)
           {
               message = (BaseMessage)obj;
               message.init(messageHeader, null);
           }
           else if  (obj instanceof MessageRecordDesc)
           {
               message = new TreeMessage(messageHeader, null);
               ((MessageRecordDesc)obj).init(message, null);
           }
       }
       return message;
   }
425536
@Override
	public QueueSender createSender(Queue queue) throws JMSException
    {
    	externalAccessLock.readLock().lock();
    	try
		{
	        checkNotClosed();
	        LocalQueueSender sender = new LocalQueueSender(this,queue,idProvider.createID());
	        registerProducer(sender);
	        return sender;
		}
    	finally
    	{
    		externalAccessLock.readLock().unlock();
    	}
    }
667343
protected final void safePostMessage (final DownstreamMessage msg)
    {
        _pcmgr._omgr.postRunnable(new Runnable() {
            public void run () {
                postMessage(msg);
            }
        });
    }
142185
public void init(FieldList record, BaseMessageReceiver messageReceiver, BaseMessageFilter messageFilter)
    {
        super.init(messageReceiver, messageFilter);
        m_record = record;
    }
298179
public void messageReceived (MessageEvent event)
    {
        if (_msghandlers != null) {
            MessageHandler handler = _msghandlers.get(event.getName());
            if (handler != null) {
                handler.handleEvent(event, this);
            }
        }

        // If the message is directed at us, see if it's a request for a method invocation
        if (event.isPrivate()) { // aka if (event instanceof ServerMessageEvent)
            // the first argument should be the client object of the caller or null if it is
            // a server-originated event
            int srcoid = event.getSourceOid();
            DObject source = (srcoid <= 0) ? null : _omgr.getObject(srcoid);
            String method = event.getName();
            Object[] args = event.getArgs(), nargs;

            // validate that this call is allowed
            if (!allowManagerCall(method)) {
                log.warning("Client tried to invoke forbidden manager call!",
                    "source", source, "method", method, "args", args);
                return;
            }

            if (args == null) {
                nargs = new Object[] { source };
            } else {
                nargs = new Object[args.length+1];
                nargs[0] = source;
                System.arraycopy(args, 0, nargs, 1, args.length);
            }

            // Lazily create our dispatcher now that it's actually getting a message
            if (_dispatcher == null) {
                Class<?> clazz = getClass();
                MethodFinder finder = _dispatcherFinders.get(clazz);
                if (finder == null) {
                    finder = new MethodFinder(clazz);
                    _dispatcherFinders.put(clazz, finder);
                }
                _dispatcher = new DynamicListener<DSet.Entry>(this, finder);
            }
            _dispatcher.dispatchMethod(method, nargs);
        }
    }
964678
@Override
    public Queue createQueue(String queueName) throws JMSException {
        checkClosed();
        return new SQSQueueDestination(queueName, amazonSQSClient.getQueueUrl(queueName).getQueueUrl());
    }
1230449
@Override
    public Message newMessage(final String message, final Object... params) {
        return new ParameterizedMessage(message, params);
    }
90235
public Message createMessage(BaseMessageHeader messageHeader, MessageRecordDesc messageDataDesc)
    {
        BaseMessage message = null;
        String strMessageClassName = this.getField(MessageLog.MESSAGE_CLASS_NAME).toString();
        message = BaseMessage.createMessage(strMessageClassName, messageHeader, null);
        if (messageDataDesc != null)
            message.addMessageDataDesc(messageDataDesc);
        if (messageHeader instanceof TrxMessageHeader)
        {
            if (message == null)
                message = BaseMessage.createMessage((TrxMessageHeader)messageHeader);
            if (message == null)
                message = new TreeMessage((TrxMessageHeader)messageHeader, null);
        }
        String strXMLData = this.getField(MessageLog.XML_MESSAGE_DATA).getString();
        message.setXML(strXMLData);
        return message;
    }
1117766
public BaseMessageReceiver getMessageReceiver()
    {
        if (m_receiver == null)
        {
            m_receiver = this.createMessageReceiver();
            if (m_receiver != null)
                new Thread(m_receiver, "MessageReceiver").start();
        }
        return m_receiver;
    }
1238750
public void init(BaseMessageManager manager, String strQueueName, String strQueueType)
    {
        m_manager = manager;
        m_strQueueName = strQueueName;
        m_strQueueType = strQueueType;
        
        if (m_manager != null)
            m_manager.addMessageQueue(this);
    }
249366
@Override
    public java.util.concurrent.Future<SendMessageResult> sendMessageAsync(String queueUrl, String messageBody) {

        return sendMessageAsync(new SendMessageRequest().withQueueUrl(queueUrl).withMessageBody(messageBody));
    }
656969
public BaseMessageFilter createDefaultFilter(JMessageListener listener)
    {
        BaseMessageFilter messageFilter = null;
        String strQueueName = MessageConstants.RECORD_QUEUE_NAME; // Default queue name=
        String strQueueType = MessageConstants.INTRANET_QUEUE;    // Default queue type
        if (m_baseMessageQueue != null)
        {
            strQueueName = m_baseMessageQueue.getQueueName();
            strQueueType = m_baseMessageQueue.getQueueType();
        }
        messageFilter = new BaseMessageFilter(strQueueName, strQueueType, null, null);    // Take all messages
        messageFilter.addMessageListener(listener);
        //xif (bAddToReceiver)  // Already added at previous line.
        //x    this.addMessageFilter(messageFilter);
        return messageFilter;
    }
1161415
public BaseMessageReceiver createMessageReceiver()
    {
        RemoteTask server = (RemoteTask)((Application)this.getMessageManager().getApplication()).getRemoteTask(null);
        try   {
            return new DualMessageReceiver(server, this);
        } catch (RemoteException ex)    {
            ex.printStackTrace();
        }
        return null;
    }