当前位置: 首页>>代码示例>>Java>>正文


Java ActiveMQBuffer.readNullableSimpleString方法代码示例

本文整理汇总了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();
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:9,代码来源:PersistedDestination.java

示例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;
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:12,代码来源:CoreMessagePersister.java

示例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();
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:12,代码来源:SessionQueueQueryResponseMessage.java

示例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();
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:10,代码来源:CreateSharedQueueMessage_V2.java

示例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();
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:10,代码来源:CreateQueueMessage.java

示例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();
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:9,代码来源:CreateSharedQueueMessage.java

示例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();
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:9,代码来源:SessionCreateConsumerMessage.java

示例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;
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:34,代码来源:VersionedStompFrameHandler.java

示例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;
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:14,代码来源:AMQPMessagePersister.java

示例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();
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:11,代码来源:BackupRequestMessage.java

示例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();
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:15,代码来源:PersistedRoles.java

示例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();
   }
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:32,代码来源:PersistentQueueBindingEncoding.java

示例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;
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:5,代码来源:BufferHelper.java

示例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();
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:8,代码来源:TextMessageUtil.java

示例15: decodeRest

import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void decodeRest(final ActiveMQBuffer buffer) {
   super.decodeRest(buffer);
   scaleDownNodeID = buffer.readNullableSimpleString();
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:6,代码来源:DisconnectMessage_V2.java


注:本文中的org.apache.activemq.artemis.api.core.ActiveMQBuffer.readNullableSimpleString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。