本文整理了Java中org.apache.qpid.proton.amqp.messaging.Header.getDurable()
方法的一些代码示例,展示了Header.getDurable()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Header.getDurable()
方法的具体详情如下:
包路径:org.apache.qpid.proton.amqp.messaging.Header
类名称:Header
方法名:getDurable
暂无
代码示例来源:origin: apache/activemq-artemis
@Override
public boolean isDurable() {
if (header != null && header.getDurable() != null) {
return header.getDurable();
} else {
return false;
}
}
代码示例来源:origin: org.apache.qpid/proton-j
@Override
public boolean isDurable()
{
return (_header == null || _header.getDurable() == null) ? false : _header.getDurable();
}
代码示例来源:origin: com.microsoft.azure.iot/proton-j-azure-iot
@Override
public boolean isDurable()
{
return (_header == null || _header.getDurable() == null) ? false : _header.getDurable();
}
代码示例来源:origin: org.apache.qpid/proton-j-impl
@Override
public boolean isDurable()
{
return (_header == null || _header.getDurable() == null) ? false : _header.getDurable();
}
代码示例来源:origin: org.apache.qpid/proton
@Override
public boolean isDurable()
{
return (_header == null || _header.getDurable() == null) ? false : _header.getDurable();
}
代码示例来源:origin: apache/activemq-artemis
/**
* Checks the durable value in the Message Headers to determine if
* the message was sent as a durable Message.
*
* @return true if the message is marked as being durable.
*/
public boolean isDurable() {
if (message.getHeader() == null || message.getHeader().getDurable() == null) {
return false;
}
return message.getHeader().getDurable();
}
代码示例来源:origin: org.apache.activemq/artemis-amqp-protocol
@Override
public boolean isDurable() {
if (durable != null) {
return durable;
}
parseHeaders();
if (getHeader() != null && getHeader().getDurable() != null) {
durable = getHeader().getDurable();
return durable;
} else {
return durable != null ? durable : false;
}
}
代码示例来源:origin: org.apache.qpid/proton-j-impl
@Override
public Object get(final int index)
{
switch(index)
{
case 0:
return _impl.getDurable();
case 1:
return _impl.getPriority();
case 2:
return _impl.getTtl();
case 3:
return _impl.getFirstAcquirer();
case 4:
return _impl.getDeliveryCount();
}
throw new IllegalStateException("Unknown index " + index);
}
代码示例来源:origin: com.microsoft.azure.iot/proton-j-azure-iot
@Override
public Object get(final int index)
{
switch(index)
{
case 0:
return _impl.getDurable();
case 1:
return _impl.getPriority();
case 2:
return _impl.getTtl();
case 3:
return _impl.getFirstAcquirer();
case 4:
return _impl.getDeliveryCount();
}
throw new IllegalStateException("Unknown index " + index);
}
代码示例来源:origin: org.apache.qpid/proton-j
@Override
public Object get(final int index)
{
switch(index)
{
case 0:
return _impl.getDurable();
case 1:
return _impl.getPriority();
case 2:
return _impl.getTtl();
case 3:
return _impl.getFirstAcquirer();
case 4:
return _impl.getDeliveryCount();
}
throw new IllegalStateException("Unknown index " + index);
}
代码示例来源:origin: org.apache.qpid/proton
@Override
public Object get(final int index)
{
switch(index)
{
case 0:
return _impl.getDurable();
case 1:
return _impl.getPriority();
case 2:
return _impl.getTtl();
case 3:
return _impl.getFirstAcquirer();
case 4:
return _impl.getDeliveryCount();
}
throw new IllegalStateException("Unknown index " + index);
}
代码示例来源:origin: org.apache.qpid/proton-j-impl
public int size()
{
return _impl.getDeliveryCount() != null
? 5
: _impl.getFirstAcquirer() != null
? 4
: _impl.getTtl() != null
? 3
: _impl.getPriority() != null
? 2
: _impl.getDurable() != null
? 1
: 0;
}
代码示例来源:origin: org.apache.qpid/proton-j
public int size()
{
return _impl.getDeliveryCount() != null
? 5
: _impl.getFirstAcquirer() != null
? 4
: _impl.getTtl() != null
? 3
: _impl.getPriority() != null
? 2
: _impl.getDurable() != null
? 1
: 0;
}
代码示例来源:origin: com.microsoft.azure.iot/proton-j-azure-iot
public int size()
{
return _impl.getDeliveryCount() != null
? 5
: _impl.getFirstAcquirer() != null
? 4
: _impl.getTtl() != null
? 3
: _impl.getPriority() != null
? 2
: _impl.getDurable() != null
? 1
: 0;
}
代码示例来源:origin: org.apache.qpid/proton-j
private int getElementCount(Header header) {
if (header.getDeliveryCount() != null) {
return 5;
} else if (header.getFirstAcquirer() != null) {
return 4;
} else if (header.getTtl() != null) {
return 3;
} else if (header.getPriority() != null) {
return 2;
} else if (header.getDurable() != null) {
return 1;
} else {
return 0;
}
}
代码示例来源:origin: org.apache.qpid/proton
public int size()
{
return _impl.getDeliveryCount() != null
? 5
: _impl.getFirstAcquirer() != null
? 4
: _impl.getTtl() != null
? 3
: _impl.getPriority() != null
? 2
: _impl.getDurable() != null
? 1
: 0;
}
代码示例来源:origin: org.apache.qpid/qpid-jms-client
public void setHeader(Header header) {
if (header != null) {
setDurable(header.getDurable());
setPriority(header.getPriority());
setTimeToLive(header.getTtl());
setFirstAcquirer(header.getFirstAcquirer());
setDeliveryCount(header.getDeliveryCount());
}
}
代码示例来源:origin: apache/qpid-jms
public void setHeader(Header header) {
if (header != null) {
setDurable(header.getDurable());
setPriority(header.getPriority());
setTimeToLive(header.getTtl());
setFirstAcquirer(header.getFirstAcquirer());
setDeliveryCount(header.getDeliveryCount());
}
}
代码示例来源:origin: apache/activemq-artemis
private boolean checkMessageProperties(AMQPMessage message, Map<String, Object> expectedProperties) {
assertNotNull(message);
assertNotNull(server.getNodeID());
assertNotNull(message.getConnectionID());
assertEquals(message.getAddress(), expectedProperties.get(ADDRESS));
assertEquals(message.isDurable(), expectedProperties.get(DURABLE));
Properties props = message.getProperties();
assertEquals(props.getCorrelationId(), expectedProperties.get(CORRELATION_ID));
assertEquals(props.getReplyTo(), expectedProperties.get(REPLY_TO));
assertEquals(props.getMessageId(), expectedProperties.get(MESSAGE_ID));
Header header = message.getHeader();
assertEquals(header.getDurable(), expectedProperties.get(DURABLE));
assertEquals(header.getTtl().toString(), expectedProperties.get(TIME_TO_LIVE).toString());
assertEquals(header.getPriority().toString(), expectedProperties.get(PRIORITY).toString());
return true;
}
代码示例来源:origin: org.apache.qpid/proton-j
private void writeElement(Header header, int index) {
switch (index) {
case 0:
getEncoder().writeBoolean(header.getDurable());
break;
case 1:
getEncoder().writeUnsignedByte(header.getPriority());
break;
case 2:
getEncoder().writeUnsignedInteger(header.getTtl());
break;
case 3:
getEncoder().writeBoolean(header.getFirstAcquirer());
break;
case 4:
getEncoder().writeUnsignedInteger(header.getDeliveryCount());
break;
default:
throw new IllegalArgumentException("Unknown Header value index: " + index);
}
}
内容来源于网络,如有侵权,请联系作者删除!