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


Java ActiveMQBuffer.readBoolean方法代码示例

本文整理汇总了Java中org.apache.activemq.artemis.api.core.ActiveMQBuffer.readBoolean方法的典型用法代码示例。如果您正苦于以下问题:Java ActiveMQBuffer.readBoolean方法的具体用法?Java ActiveMQBuffer.readBoolean怎么用?Java ActiveMQBuffer.readBoolean使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.activemq.artemis.api.core.ActiveMQBuffer的用法示例。


在下文中一共展示了ActiveMQBuffer.readBoolean方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: readNullableBoolean

import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
public static Boolean readNullableBoolean(ActiveMQBuffer buffer) {
   boolean isNotNull = buffer.readBoolean();

   if (isNotNull) {
      return buffer.readBoolean();
   } else {
      return null;
   }
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:10,代码来源:BufferHelper.java

示例2: readNullableDouble

import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
public static Double readNullableDouble(ActiveMQBuffer buffer) {
   boolean isNotNull = buffer.readBoolean();

   if (isNotNull) {
      return buffer.readDouble();
   } else {
      return null;
   }
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:10,代码来源:BufferHelper.java

示例3: decode

import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void decode(final ActiveMQBuffer buffer) {
   name = buffer.readSimpleString();
   int size = buffer.readInt();
   for (int i = 0; i < size; i++) {
      routingTypes.add(RoutingType.getType(buffer.readByte()));
   }
   autoCreated = buffer.readBoolean();
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:10,代码来源:PersistentAddressBindingEncoding.java

示例4: decodeRest

import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void decodeRest(final ActiveMQBuffer buffer) {
   clusterUser = buffer.readString();
   clusterPassword = buffer.readString();
   backupWantsFailBack = buffer.readBoolean();
   connector = new TransportConfiguration();
   connector.decode(buffer);
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:9,代码来源:BackupRegistrationMessage.java

示例5: streamReadObject

import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
public static Object streamReadObject(ActiveMQBuffer buff) {
   byte type = buff.readByte();
   switch (type) {
      case DataConstants.BOOLEAN:
         return buff.readBoolean();
      case DataConstants.BYTE:
         return buff.readByte();
      case DataConstants.SHORT:
         return buff.readShort();
      case DataConstants.CHAR:
         return (char) buff.readShort();
      case DataConstants.INT:
         return buff.readInt();
      case DataConstants.LONG:
         return buff.readLong();
      case DataConstants.FLOAT:
         return Float.intBitsToFloat(buff.readInt());
      case DataConstants.DOUBLE:
         return Double.longBitsToDouble(buff.readLong());
      case DataConstants.STRING:
         return buff.readNullableString();
      case DataConstants.BYTES:
         int bufferLen = buff.readInt();
         byte[] bytes = new byte[bufferLen];
         buff.readBytes(bytes);
         return bytes;
      default:
         throw new IllegalStateException("Invalid conversion");
   }

}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:32,代码来源:StreamMessageUtil.java

示例6: decode

import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void decode(final ActiveMQBuffer buffer) {
   transactionID = buffer.readLong();

   boolean isLargeMessage = buffer.readBoolean();

   if (isLargeMessage) {
      int largeMessageHeaderSize = buffer.readInt();

      if (storageManager == null) {
         largeMessageLazyData = new byte[largeMessageHeaderSize];
         buffer.readBytes(largeMessageLazyData);
      } else {
         this.message = storageManager.createLargeMessage();
         LargeMessagePersister.getInstance().decode(buffer, (LargeServerMessage) message);
         ((LargeServerMessage) message).incrementDelayDeletionCount();
      }
   } else {
      this.message = MessagePersister.getInstance().decode(buffer, null);
   }

   int queueIDsSize = buffer.readInt();

   queueIDs = new long[queueIDsSize];

   for (int i = 0; i < queueIDsSize; i++) {
      queueIDs[i] = buffer.readLong();
   }
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:30,代码来源:PagedMessageImpl.java

示例7: decodeRest

import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void decodeRest(final ActiveMQBuffer buffer) {
   consumerID = buffer.readLong();

   messageID = buffer.readLong();

   requiresResponse = buffer.readBoolean();
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:9,代码来源:SessionAcknowledgeMessage.java

示例8: 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

示例9: decodeRest

import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void decodeRest(final ActiveMQBuffer buffer) {
   address = buffer.readSimpleString();
   int routingTypeSetSize = buffer.readInt();
   routingTypes = new HashSet<>(routingTypeSetSize);
   for (int i = 0; i < routingTypeSetSize; i++) {
      routingTypes.add(RoutingType.getType(buffer.readByte()));
   }
   requiresResponse = buffer.readBoolean();
   autoCreated = buffer.readBoolean();
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:12,代码来源:CreateAddressMessage.java

示例10: decodeRest

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

示例11: decode

import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void decode(ActiveMQBuffer buff) {
   vote = buff.readBoolean();
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:5,代码来源:BooleanVote.java

示例12: decodeRest

import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void decodeRest(final ActiveMQBuffer buffer) {
   storeName = buffer.readSimpleString();
   pageNumber = buffer.readInt();
   isDelete = buffer.readBoolean();
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:7,代码来源:ReplicationPageEventMessage.java

示例13: decodeRest

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

示例14: decodeRest

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

示例15: decodeRest

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


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