Search in sources :

Example 16 with MessageImpl

use of com.swiftmq.jms.MessageImpl in project swiftmq-client by iitsoftware.

the class FileDeleteReply method toMessage.

public Message toMessage() throws JMSException {
    Message message = new MessageImpl();
    message.setIntProperty(ProtocolFactory.DUMPID_PROP, ProtocolFactory.FILEDELETE_REP);
    return fillMessage(message);
}
Also used : Message(javax.jms.Message) MessageImpl(com.swiftmq.jms.MessageImpl)

Example 17 with MessageImpl

use of com.swiftmq.jms.MessageImpl in project swiftmq-client by iitsoftware.

the class FileConsumeReply method toMessage.

public Message toMessage() throws JMSException {
    Message message = new MessageImpl();
    message.setIntProperty(ProtocolFactory.DUMPID_PROP, ProtocolFactory.FILECONSUME_REP);
    message.setStringProperty(FILENAME_PROP, filename);
    message.setIntProperty(CHUNKLENGTH_PROP, chunkLength);
    message.setLongProperty(SIZE_PROP, size);
    return fillMessage(message);
}
Also used : Message(javax.jms.Message) MessageImpl(com.swiftmq.jms.MessageImpl)

Example 18 with MessageImpl

use of com.swiftmq.jms.MessageImpl in project swiftmq-client by iitsoftware.

the class FilePublishReply method toMessage.

public Message toMessage() throws JMSException {
    Message message = new MessageImpl();
    message.setIntProperty(ProtocolFactory.DUMPID_PROP, ProtocolFactory.FILEPUBLISH_REP);
    message.setIntProperty(CHUNKLENGTH_PROP, chunkLength);
    return fillMessage(message);
}
Also used : Message(javax.jms.Message) MessageImpl(com.swiftmq.jms.MessageImpl)

Example 19 with MessageImpl

use of com.swiftmq.jms.MessageImpl in project swiftmq-client by iitsoftware.

the class ProtocolReply method toMessage.

public Message toMessage() throws JMSException {
    Message message = new MessageImpl();
    message.setIntProperty(ProtocolFactory.DUMPID_PROP, ProtocolFactory.PROTOCOL_REP);
    message.setStringProperty(QUEUENAME_PROP, queueName);
    return fillMessage(message);
}
Also used : Message(javax.jms.Message) MessageImpl(com.swiftmq.jms.MessageImpl)

Example 20 with MessageImpl

use of com.swiftmq.jms.MessageImpl in project swiftmq-ce by iitsoftware.

the class SourceMessageProcessor method copyMessage.

private MessageImpl copyMessage(MessageImpl msg) throws Exception {
    dbos.rewind();
    msg.writeContent(dbos);
    dbis.reset();
    dbis.setBuffer(dbos.getBuffer(), 0, dbos.getCount());
    MessageImpl msgCopy = MessageImpl.createInstance(dbis.readInt());
    msgCopy.readContent(dbis);
    return msgCopy;
}
Also used : MessageImpl(com.swiftmq.jms.MessageImpl)

Aggregations

MessageImpl (com.swiftmq.jms.MessageImpl)106 JMSException (javax.jms.JMSException)42 QueuePushTransaction (com.swiftmq.swiftlet.queue.QueuePushTransaction)33 InvalidSelectorException (javax.jms.InvalidSelectorException)31 ResourceLimitException (com.swiftmq.swiftlet.auth.ResourceLimitException)28 QueueImpl (com.swiftmq.jms.QueueImpl)21 DataByteArrayInputStream (com.swiftmq.tools.util.DataByteArrayInputStream)20 TopicImpl (com.swiftmq.jms.TopicImpl)17 MessageEntry (com.swiftmq.swiftlet.queue.MessageEntry)15 MessageIndex (com.swiftmq.swiftlet.queue.MessageIndex)15 RingBuffer (com.swiftmq.tools.collection.RingBuffer)14 InvalidDestinationException (javax.jms.InvalidDestinationException)14 List (java.util.List)13 EntityList (com.swiftmq.mgmt.EntityList)10 Message (javax.jms.Message)10 XidImpl (com.swiftmq.jms.XidImpl)6 DataByteArrayOutputStream (com.swiftmq.tools.util.DataByteArrayOutputStream)6 MessageSelector (com.swiftmq.ms.MessageSelector)5 XAContextException (com.swiftmq.swiftlet.xa.XAContextException)4 ArrayList (java.util.ArrayList)4