本文整理汇总了Java中org.apache.activemq.artemis.api.core.ActiveMQBuffer.readNullableSimpleString方法的典型用法代码示例。如果您正苦于以下问题:Java ActiveMQBuffer.readNullableSimpleString方法的具体用法?Java ActiveMQBuffer.readNullableSimpleString怎么用?Java ActiveMQBuffer.readNullableSimpleString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.activemq.artemis.api.core.ActiveMQBuffer
的用法示例。
在下文中一共展示了ActiveMQBuffer.readNullableSimpleString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: decode
import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void decode(final ActiveMQBuffer buffer) {
type = PersistedType.getType(buffer.readByte());
name = buffer.readSimpleString().toString();
SimpleString selectorStr = buffer.readNullableSimpleString();
selector = (selectorStr == null) ? null : selectorStr.toString();
durable = buffer.readBoolean();
}
示例2: decode
import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public Message decode(ActiveMQBuffer buffer, Message record) {
// the caller must consume the first byte already, as that will be used to decide what persister (protocol) to use
long id = buffer.readLong();
SimpleString address = buffer.readNullableSimpleString();
record = new CoreMessage();
record.reloadPersistence(buffer);
record.setMessageID(id);
record.setAddress(address);
return record;
}
示例3: decodeRest
import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void decodeRest(final ActiveMQBuffer buffer) {
exists = buffer.readBoolean();
durable = buffer.readBoolean();
temporary = buffer.readBoolean();
consumerCount = buffer.readInt();
messageCount = buffer.readLong();
filterString = buffer.readNullableSimpleString();
address = buffer.readNullableSimpleString();
name = buffer.readNullableSimpleString();
}
示例4: decodeRest
import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void decodeRest(final ActiveMQBuffer buffer) {
address = buffer.readSimpleString();
queueName = buffer.readSimpleString();
filterString = buffer.readNullableSimpleString();
durable = buffer.readBoolean();
routingType = RoutingType.getType(buffer.readByte());
requiresResponse = buffer.readBoolean();
}
示例5: decodeRest
import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void decodeRest(final ActiveMQBuffer buffer) {
address = buffer.readSimpleString();
queueName = buffer.readSimpleString();
filterString = buffer.readNullableSimpleString();
durable = buffer.readBoolean();
temporary = buffer.readBoolean();
requiresResponse = buffer.readBoolean();
}
示例6: decodeRest
import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void decodeRest(final ActiveMQBuffer buffer) {
address = buffer.readSimpleString();
queueName = buffer.readSimpleString();
filterString = buffer.readNullableSimpleString();
durable = buffer.readBoolean();
requiresResponse = buffer.readBoolean();
}
示例7: decodeRest
import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void decodeRest(final ActiveMQBuffer buffer) {
id = buffer.readLong();
queueName = buffer.readSimpleString();
filterString = buffer.readNullableSimpleString();
browseOnly = buffer.readBoolean();
requiresResponse = buffer.readBoolean();
}
示例8: createMessageFrame
import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
public StompFrame createMessageFrame(ICoreMessage serverMessage,
ActiveMQBuffer bodyBuffer,
StompSubscription subscription,
int deliveryCount) throws Exception {
StompFrame frame = createStompFrame(Stomp.Responses.MESSAGE);
if (subscription.getID() != null) {
frame.addHeader(Stomp.Headers.Message.SUBSCRIPTION, subscription.getID());
}
ActiveMQBuffer buffer = bodyBuffer != null ? bodyBuffer : serverMessage.getReadOnlyBodyBuffer();
int size = buffer.writerIndex();
byte[] data = new byte[size];
if (serverMessage.containsProperty(Stomp.Headers.CONTENT_LENGTH) || serverMessage.getType() == Message.BYTES_TYPE) {
frame.addHeader(Headers.CONTENT_LENGTH, String.valueOf(data.length));
buffer.readBytes(data);
} else {
SimpleString text = buffer.readNullableSimpleString();
if (text != null) {
data = text.toString().getBytes(StandardCharsets.UTF_8);
} else {
data = new byte[0];
}
}
frame.setByteBody(data);
StompUtils.copyStandardHeadersFromMessageToFrame((serverMessage), frame, deliveryCount);
return frame;
}
示例9: decode
import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public Message decode(ActiveMQBuffer buffer, Message record) {
long id = buffer.readLong();
long format = buffer.readLong();
SimpleString address = buffer.readNullableSimpleString();
record = new AMQPMessage(format);
record.reloadPersistence(buffer);
record.setMessageID(id);
if (address != null) {
record.setAddress(address);
}
return record;
}
示例10: decodeRest
import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void decodeRest(ActiveMQBuffer buffer) {
super.decodeRest(buffer);
backupSize = buffer.readInt();
journalDirectory = buffer.readNullableString();
bindingsDirectory = buffer.readNullableString();
largeMessagesDirectory = buffer.readNullableString();
pagingDirectory = buffer.readNullableString();
nodeID = buffer.readNullableSimpleString();
}
示例11: decode
import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void decode(final ActiveMQBuffer buffer) {
addressMatch = buffer.readSimpleString();
sendRoles = buffer.readNullableSimpleString();
consumeRoles = buffer.readNullableSimpleString();
createDurableQueueRoles = buffer.readNullableSimpleString();
deleteDurableQueueRoles = buffer.readNullableSimpleString();
createNonDurableQueueRoles = buffer.readNullableSimpleString();
deleteNonDurableQueueRoles = buffer.readNullableSimpleString();
manageRoles = buffer.readNullableSimpleString();
browseRoles = buffer.readNullableSimpleString();
createAddressRoles = buffer.readNullableSimpleString();
deleteAddressRoles = buffer.readNullableSimpleString();
}
示例12: decode
import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void decode(final ActiveMQBuffer buffer) {
name = buffer.readSimpleString();
address = buffer.readSimpleString();
filterString = buffer.readNullableSimpleString();
String metadata = buffer.readNullableSimpleString().toString();
if (metadata != null) {
String[] elements = metadata.split(";");
for (String element : elements) {
String[] keyValuePair = element.split("=");
if (keyValuePair.length == 2) {
if (keyValuePair[0].equals("user")) {
user = SimpleString.toSimpleString(keyValuePair[1]);
}
}
}
}
autoCreated = buffer.readBoolean();
if (buffer.readableBytes() > 0) {
maxConsumers = buffer.readInt();
purgeOnNoConsumers = buffer.readBoolean();
routingType = buffer.readByte();
} else {
maxConsumers = ActiveMQDefaultConfiguration.getDefaultMaxQueueConsumers();
purgeOnNoConsumers = ActiveMQDefaultConfiguration.getDefaultPurgeOnNoConsumers();
routingType = ActiveMQDefaultConfiguration.getDefaultRoutingType().getType();
}
}
示例13: readNullableSimpleStringAsString
import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
public static String readNullableSimpleStringAsString(ActiveMQBuffer buffer) {
SimpleString str = buffer.readNullableSimpleString();
return str != null ? str.toString() : null;
}
示例14: readBodyText
import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
/**
* Utility method to set the Text message on a message body
*/
public static SimpleString readBodyText(ActiveMQBuffer buff) {
buff.resetReaderIndex();
return buff.readNullableSimpleString();
}
示例15: decodeRest
import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void decodeRest(final ActiveMQBuffer buffer) {
super.decodeRest(buffer);
scaleDownNodeID = buffer.readNullableSimpleString();
}