org.apache.qpid.proton.amqp.messaging.Header.setPriority()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(4.7k)|赞(0)|评价(0)|浏览(99)

本文整理了Java中org.apache.qpid.proton.amqp.messaging.Header.setPriority()方法的一些代码示例,展示了Header.setPriority()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Header.setPriority()方法的具体详情如下:
包路径:org.apache.qpid.proton.amqp.messaging.Header
类名称:Header
方法名:setPriority

Header.setPriority介绍

暂无

代码示例

代码示例来源:origin: apache/activemq-artemis

@Override
public org.apache.activemq.artemis.api.core.Message setPriority(byte priority) {
 if (header == null) {
   header = new Header();
 }
 header.setPriority(UnsignedByte.valueOf(priority));
 return this;
}

代码示例来源:origin: com.microsoft.azure.iot/proton-j-azure-iot

@Override
public void setPriority(short priority)
{
  if (_header == null)
  {
    if (priority == DEFAULT_PRIORITY)
    {
      return;
    }
    _header = new Header();
  }
  _header.setPriority(UnsignedByte.valueOf((byte) priority));
}

代码示例来源:origin: org.apache.qpid/proton

@Override
public void setPriority(short priority)
{
  if (_header == null)
  {
    if (priority == DEFAULT_PRIORITY)
    {
      return;
    }
    _header = new Header();
  }
  _header.setPriority(UnsignedByte.valueOf((byte) priority));
}

代码示例来源:origin: org.apache.activemq/artemis-amqp-protocol

@Override
public org.apache.activemq.artemis.api.core.Message setPriority(byte priority) {
 getHeader().setPriority(UnsignedByte.valueOf(priority));
 return this;
}

代码示例来源:origin: org.apache.qpid/proton-j-impl

@Override
public void setPriority(short priority)
{
  if (_header == null)
  {
    if (priority == DEFAULT_PRIORITY)
    {
      return;
    }
    _header = new Header();
  }
  _header.setPriority(UnsignedByte.valueOf((byte) priority));
}

代码示例来源:origin: org.apache.qpid/proton-j

@Override
public void setPriority(short priority)
{
  if (_header == null)
  {
    if (priority == DEFAULT_PRIORITY)
    {
      return;
    }
    _header = new Header();
  }
  _header.setPriority(UnsignedByte.valueOf((byte) priority));
}

代码示例来源:origin: org.apache.qpid/proton-j

public Header newInstance(Object described)
{
  List l = (List) described;
  Header o = new Header();
  switch(5 - l.size())
  {
    case 0:
      o.setDeliveryCount( (UnsignedInteger) l.get( 4 ) );
    case 1:
      o.setFirstAcquirer( (Boolean) l.get( 3 ) );
    case 2:
      o.setTtl( (UnsignedInteger) l.get( 2 ) );
    case 3:
      o.setPriority( (UnsignedByte) l.get( 1 ) );
    case 4:
      o.setDurable( (Boolean) l.get( 0 ) );
  }
  return o;
}

代码示例来源:origin: com.microsoft.azure.iot/proton-j-azure-iot

public Header newInstance(Object described)
{
  List l = (List) described;
  Header o = new Header();
  switch(5 - l.size())
  {
    case 0:
      o.setDeliveryCount( (UnsignedInteger) l.get( 4 ) );
    case 1:
      o.setFirstAcquirer( (Boolean) l.get( 3 ) );
    case 2:
      o.setTtl( (UnsignedInteger) l.get( 2 ) );
    case 3:
      o.setPriority( (UnsignedByte) l.get( 1 ) );
    case 4:
      o.setDurable( (Boolean) l.get( 0 ) );
  }
  return o;
}

代码示例来源:origin: org.apache.qpid/proton

public Header newInstance(Object described)
{
  List l = (List) described;
  Header o = new Header();
  switch(5 - l.size())
  {
    case 0:
      o.setDeliveryCount( (UnsignedInteger) l.get( 4 ) );
    case 1:
      o.setFirstAcquirer( (Boolean) l.get( 3 ) );
    case 2:
      o.setTtl( (UnsignedInteger) l.get( 2 ) );
    case 3:
      o.setPriority( (UnsignedByte) l.get( 1 ) );
    case 4:
      o.setDurable( (Boolean) l.get( 0 ) );
  }
  return o;
}

代码示例来源:origin: org.apache.qpid/proton-j-impl

public Header newInstance(Object described)
{
  List l = (List) described;
  Header o = new Header();
  switch(5 - l.size())
  {
    case 0:
      o.setDeliveryCount( (UnsignedInteger) l.get( 4 ) );
    case 1:
      o.setFirstAcquirer( (Boolean) l.get( 3 ) );
    case 2:
      o.setTtl( (UnsignedInteger) l.get( 2 ) );
    case 3:
      o.setPriority( (UnsignedByte) l.get( 1 ) );
    case 4:
      o.setDurable( (Boolean) l.get( 0 ) );
  }
  return o;
}

代码示例来源:origin: apache/qpid-jms

public Header getHeader() {
  Header result = null;
  if (!isDefault()) {
    result = new Header();
    result.setDurable(durable);
    result.setPriority(priority);
    result.setFirstAcquirer(firstAcquirer);
    result.setTtl(timeToLive);
    result.setDeliveryCount(deliveryCount);
  }
  return result;
}

代码示例来源:origin: org.apache.qpid/qpid-jms-client

public Header getHeader() {
  Header result = null;
  if (!isDefault()) {
    result = new Header();
    result.setDurable(durable);
    result.setPriority(priority);
    result.setFirstAcquirer(firstAcquirer);
    result.setTtl(timeToLive);
    result.setDeliveryCount(deliveryCount);
  }
  return result;
}

代码示例来源:origin: org.apache.qpid/proton-jms

header.setPriority(new UnsignedByte((byte) msg.getJMSPriority()));
if( msg.getJMSType()!=null ) {
  if( maMap==null ) maMap = new HashMap<Symbol, Object>();

代码示例来源:origin: org.apache.activemq/activemq-all

header = new Header();
header.setPriority(UnsignedByte.valueOf(priority));

代码示例来源:origin: org.apache.activemq/activemq-osgi

header = new Header();
header.setPriority(UnsignedByte.valueOf(priority));

代码示例来源:origin: apache/activemq-artemis

header = new Header();
header.setPriority(UnsignedByte.valueOf(priority));
    header = new Header();
   header.setPriority(UnsignedByte.valueOf(priority));
   continue;
 } else if (key.startsWith(JMS_AMQP_PROPERTIES)) {

代码示例来源:origin: org.apache.activemq/artemis-amqp-protocol

header = new Header();
header.setPriority(UnsignedByte.valueOf(priority));
    header = new Header();
   header.setPriority(UnsignedByte.valueOf(priority));
   continue;
 } else if (key.startsWith(JMS_AMQP_PROPERTIES)) {

代码示例来源:origin: org.apache.qpid/proton-j

break;
case 1:
  header.setPriority(decoder.readUnsignedByte(null));
  break;
case 2:

相关文章