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


Java UnsignedLong.toString方法代码示例

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


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

示例1: testToMessageIdStringWithUnsignedLong

import org.apache.qpid.proton.amqp.UnsignedLong; //导入方法依赖的package包/类
/**
 * Test that {@link AMQPMessageIdHelper#toMessageIdString(Object)} returns a
 * string indicating an AMQP encoded ulong when given a UnsignedLong object.
 */
@Test
public void testToMessageIdStringWithUnsignedLong() {
   UnsignedLong uLongMessageId = UnsignedLong.valueOf(123456789L);
   String expected = AMQPMessageIdHelper.JMS_ID_PREFIX + AMQPMessageIdHelper.AMQP_ULONG_PREFIX + uLongMessageId.toString();

   doToMessageIdTestImpl(uLongMessageId, expected);
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:12,代码来源:AMQPMessageIdHelperTest.java

示例2: testToCorrelationIdStringWithUnsignedLong

import org.apache.qpid.proton.amqp.UnsignedLong; //导入方法依赖的package包/类
/**
 * Test that {@link AMQPMessageIdHelper#toCorrelationIdString(Object)}
 * returns a string indicating an AMQP encoded ulong when given a
 * UnsignedLong object.
 */
@Test
public void testToCorrelationIdStringWithUnsignedLong() {
   UnsignedLong uLongCorrelationId = UnsignedLong.valueOf(123456789L);
   String expected = AMQPMessageIdHelper.JMS_ID_PREFIX + AMQPMessageIdHelper.AMQP_ULONG_PREFIX + uLongCorrelationId.toString();

   doToCorrelationIDTestImpl(uLongCorrelationId, expected);
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:13,代码来源:AMQPMessageIdHelperTest.java

示例3: testReceivedMessageWithLongCorrelationIdReturnsExpectedJMSCorrelationID

import org.apache.qpid.proton.amqp.UnsignedLong; //导入方法依赖的package包/类
/**
 * Tests that receiving a message with a UUID typed correlation-id results in returning the
 * expected value for JMSCorrelationID where the JMS "ID:" prefix has been added to the UUID.tostring()
 *
 * @throws Exception if an error occurs during the test.
 */
@Test(timeout = 20000)
public void testReceivedMessageWithLongCorrelationIdReturnsExpectedJMSCorrelationID() throws Exception {
    UnsignedLong underlyingCorrelationId = UnsignedLong.valueOf(123456789L);
    String expected = "ID:AMQP_ULONG:" + underlyingCorrelationId.toString();
    receivedMessageWithCorrelationIdTestImpl(underlyingCorrelationId, expected);
}
 
开发者ID:apache,项目名称:qpid-jms,代码行数:13,代码来源:MessageIntegrationTest.java

示例4: testGetCorrelationIdOnReceivedMessageWithUnsignedLong

import org.apache.qpid.proton.amqp.UnsignedLong; //导入方法依赖的package包/类
/**
 * Test that getting the correlationId when using an underlying received message with a
 * ulong correlation id (using BigInteger) returns the expected value.
 */
@Test
public void testGetCorrelationIdOnReceivedMessageWithUnsignedLong() {
    UnsignedLong testCorrelationId = UnsignedLong.valueOf(123456789L);
    String expected = AmqpMessageIdHelper.JMS_ID_PREFIX + AmqpMessageIdHelper.AMQP_ULONG_PREFIX + testCorrelationId.toString();
    correlationIdOnReceivedMessageTestImpl(testCorrelationId, expected, false);
}
 
开发者ID:apache,项目名称:qpid-jms,代码行数:11,代码来源:AmqpJmsMessageFacadeTest.java

示例5: testToMessageIdStringWithUnsignedLong

import org.apache.qpid.proton.amqp.UnsignedLong; //导入方法依赖的package包/类
/**
 * Test that {@link AmqpMessageIdHelper#toMessageIdString(Object)} returns a string
 * indicating an AMQP encoded ulong when given a UnsignedLong object.
 */
@Test
public void testToMessageIdStringWithUnsignedLong() {
    UnsignedLong uLongMessageId = UnsignedLong.valueOf(123456789L);
    String expected = AmqpMessageIdHelper.JMS_ID_PREFIX + AmqpMessageIdHelper.AMQP_ULONG_PREFIX + uLongMessageId.toString();

    doToMessageIdTestImpl(uLongMessageId, expected);
}
 
开发者ID:apache,项目名称:qpid-jms,代码行数:12,代码来源:AmqpMessageIdHelperTest.java

示例6: testToCorrelationIdStringWithUnsignedLong

import org.apache.qpid.proton.amqp.UnsignedLong; //导入方法依赖的package包/类
/**
 * Test that {@link AmqpMessageIdHelper#toCorrelationIdString(Object)} returns a string
 * indicating an AMQP encoded ulong when given a UnsignedLong object.
 */
@Test
public void testToCorrelationIdStringWithUnsignedLong() {
    UnsignedLong uLongCorrelationId = UnsignedLong.valueOf(123456789L);
    String expected = AmqpMessageIdHelper.JMS_ID_PREFIX + AmqpMessageIdHelper.AMQP_ULONG_PREFIX + uLongCorrelationId.toString();

    doToCorrelationIDTestImpl(uLongCorrelationId, expected);
}
 
开发者ID:apache,项目名称:qpid-jms,代码行数:12,代码来源:AmqpMessageIdHelperTest.java

示例7: testSentMessageWithUlongCorrelationId

import org.apache.qpid.proton.amqp.UnsignedLong; //导入方法依赖的package包/类
/**
 * Tests that sending a message with a ulong typed correlation-id value which is a
 * message-id results in an AMQP message with the expected encoding of the correlation-id,
 * where the type is ulong, the "ID:" prefix of the JMSCorrelationID value is (obviously) not present.
 *
 * @throws Exception if an error occurs during the test.
 */
@Test(timeout = 20000)
public void testSentMessageWithUlongCorrelationId() throws Exception {
    UnsignedLong ulong = UnsignedLong.valueOf(Long.MAX_VALUE);
    String stringCorrelationId = AmqpMessageIdHelper.JMS_ID_PREFIX + AmqpMessageIdHelper.AMQP_ULONG_PREFIX +  ulong.toString();
    sentMessageWithCorrelationIdTestImpl(stringCorrelationId, ulong);
}
 
开发者ID:apache,项目名称:qpid-jms,代码行数:14,代码来源:MessageIntegrationTest.java


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