use of com.swiftmq.jms.TextMessageImpl in project swiftmq-client by iitsoftware.
the class SessionCloseRequest method toMessage.
public Message toMessage() throws JMSException {
TextMessage message = new TextMessageImpl();
fillMessage(message);
message.setIntProperty(ProtocolFactory.DUMPID_PROP, ProtocolFactory.SESSIONCLOSE_REQ);
return message;
}
use of com.swiftmq.jms.TextMessageImpl in project swiftmq-client by iitsoftware.
the class FileChunkReply method toMessage.
public Message toMessage() throws JMSException {
TextMessage message = new TextMessageImpl();
message.setIntProperty(ProtocolFactory.DUMPID_PROP, ProtocolFactory.FILECHUNK_REP);
message.setIntProperty(CHUNKNO_PROP, chunkNo);
if (link != null)
message.setText(link);
return fillMessage(message);
}
use of com.swiftmq.jms.TextMessageImpl in project swiftmq-client by iitsoftware.
the class FileConsumeRequest method toMessage.
public Message toMessage() throws JMSException {
TextMessage message = new TextMessageImpl();
fillMessage(message);
message.setIntProperty(ProtocolFactory.DUMPID_PROP, ProtocolFactory.FILECONSUME_REQ);
message.setStringProperty(QUEUENAME_PROP, queueName);
message.setIntProperty(REPLYINTERVAL_PROP, replyInterval);
if (passwordHexDigest != null)
message.setStringProperty(PWDHEXDIGEST_PROP, passwordHexDigest);
message.setText(link);
return message;
}
use of com.swiftmq.jms.TextMessageImpl in project swiftmq-client by iitsoftware.
the class FileDeleteRequest method toMessage.
public Message toMessage() throws JMSException {
TextMessage message = new TextMessageImpl();
fillMessage(message);
message.setIntProperty(ProtocolFactory.DUMPID_PROP, ProtocolFactory.FILEDELETE_REQ);
if (passwordHexDigest != null)
message.setStringProperty(PWDHEXDIGEST_PROP, passwordHexDigest);
message.setText(link);
return message;
}
use of com.swiftmq.jms.TextMessageImpl in project swiftmq-ce by iitsoftware.
the class SessionStore method load.
public synchronized Map<String, MQTTSession> load() throws Exception {
Map<String, MQTTSession> result = new HashMap<String, MQTTSession>();
QueueReceiver receiver = ctx.queueManager.createQueueReceiver(STORE_QUEUE, null, null);
QueuePullTransaction t = receiver.createTransaction(false);
MessageEntry entry = null;
while ((entry = t.getMessage(0)) != null) {
TextMessageImpl msg = (TextMessageImpl) entry.getMessage();
String clientId = msg.getStringProperty(PROP_CLIENTID);
result.put(clientId, new MQTTSession(ctx, clientId, (SessionStoreEntry) xStream.fromXML(msg.getText())));
}
t.rollback();
receiver.close();
if (ctx.traceSpace.enabled)
ctx.traceSpace.trace(ctx.mqttSwiftlet.getName(), toString() + ", load, result.size=" + result.size());
return result;
}
Aggregations