org.jdiameter.api.Message.setReTransmitted()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(11.6k)|赞(0)|评价(0)|浏览(194)

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

Message.setReTransmitted介绍

[英]Set 1 or 0 to T bit field of header
[中]将1或0设置为标头的T位字段

代码示例

代码示例来源:origin: org.mobicents.resources/mobicents-slee-ra-diameter-sh-common-events

/**
 * 
 * @param msg
 */
public PushNotificationAnswerImpl(Message msg) {
 super(msg);
 msg.setRequest(false);
 msg.setReTransmitted(false); // just in case. answers never have T flag set
 super.longMessageName = "Push-Notificaton-Answer";
 super.shortMessageName = "PNA";
}

代码示例来源:origin: org.mobicents.resources/restcomm-slee-ra-diameter-sh-common-events

/**
 * 
 * @param msg
 */
public SubscribeNotificationsAnswerImpl(Message msg) {
 super(msg);
 msg.setRequest(false);
 msg.setReTransmitted(false); // just in case. answers never have T flag set
 super.longMessageName = "Subscribe-Notification-Answer";
 super.shortMessageName = "SNA";
}

代码示例来源:origin: org.mobicents.resources/restcomm-slee-ra-diameter-sh-common-events

public ProfileUpdateAnswerImpl(Message msg) {
 super(msg);
 msg.setRequest(false);
 msg.setReTransmitted(false); // just in case. answers never have T flag set
 super.longMessageName = "Profile-Update-Answer";
 super.shortMessageName = "PUA";
}

代码示例来源:origin: org.mobicents.resources/mobicents-slee-ra-diameter-sh-common-events

/**
 * 
 * @param msg
 */
public UserDataAnswerImpl(Message msg) {
 super(msg);
 msg.setRequest(false);
 msg.setReTransmitted(false); // just in case. answers never have T flag set
 super.longMessageName = "User-Data-Answer";
 super.shortMessageName = "UDA";
}

代码示例来源:origin: org.mobicents.resources/restcomm-slee-ra-diameter-sh-common-events

/**
 * 
 * @param msg
 */
public UserDataAnswerImpl(Message msg) {
 super(msg);
 msg.setRequest(false);
 msg.setReTransmitted(false); // just in case. answers never have T flag set
 super.longMessageName = "User-Data-Answer";
 super.shortMessageName = "UDA";
}

代码示例来源:origin: org.mobicents.resources/restcomm-slee-ra-diameter-sh-common-events

/**
 * 
 * @param msg
 */
public PushNotificationAnswerImpl(Message msg) {
 super(msg);
 msg.setRequest(false);
 msg.setReTransmitted(false); // just in case. answers never have T flag set
 super.longMessageName = "Push-Notificaton-Answer";
 super.shortMessageName = "PNA";
}

代码示例来源:origin: org.mobicents.resources/mobicents-slee-ra-diameter-sh-common-events

public ProfileUpdateAnswerImpl(Message msg) {
 super(msg);
 msg.setRequest(false);
 msg.setReTransmitted(false); // just in case. answers never have T flag set
 super.longMessageName = "Profile-Update-Answer";
 super.shortMessageName = "PUA";
}

代码示例来源:origin: org.mobicents.resources/mobicents-slee-ra-diameter-sh-common-events

/**
 * 
 * @param msg
 */
public SubscribeNotificationsAnswerImpl(Message msg) {
 super(msg);
 msg.setRequest(false);
 msg.setReTransmitted(false); // just in case. answers never have T flag set
 super.longMessageName = "Subscribe-Notification-Answer";
 super.shortMessageName = "SNA";
}

代码示例来源:origin: org.mobicents.resources/restcomm-slee-ra-diameter-sh-client-ra

private Message createShMessage(DiameterHeader diameterHeader, DiameterAvp[] avps, int _commandCode) throws IllegalArgumentException {
 // List<DiameterAvp> list = (List<DiameterAvp>) this.avpList.clone();
 boolean isRequest = diameterHeader == null;
 Message msg = null;
 if (!isRequest) {
  Message raw = createMessage(diameterHeader, avps,0);
  raw.setProxiable(diameterHeader.isProxiable());
  raw.setRequest(false);
  raw.setReTransmitted(false); // just in case. answers never have T flag set
  msg = raw;
 }
 else {
  Message raw = createMessage(null, avps,_commandCode);
  raw.setProxiable(true);
  raw.setRequest(true);
  msg = raw;
 }
 return msg;
}

代码示例来源:origin: org.mobicents.resources/restcomm-slee-ra-diameter-gx-ra

private GxCreditControlMessage createGxCreditControlRequest(final DiameterHeader diameterHeader, final DiameterAvp[] avps) throws IllegalArgumentException {
  boolean isRequest = false;
  if (diameterHeader == null) {
    isRequest = true;
  }
  GxCreditControlMessage msg = null;
  if (!isRequest) {
    final Message raw = createGxMessage(diameterHeader, avps, GxCreditControlRequest.commandCode);
    raw.setProxiable(true);
    raw.setRequest(false);
    raw.setReTransmitted(false); // just in case. answers never have T flag set
    msg = new GxCreditControlAnswerImpl(raw);
  } else {
    final Message raw = createGxMessage(null, avps, GxCreditControlRequest.commandCode);
    raw.setProxiable(true);
    raw.setRequest(true);
    msg = new GxCreditControlRequestImpl(raw);
  }
  return msg;
}

代码示例来源:origin: org.mobicents.resources/restcomm-slee-ra-diameter-gx-ra

private GxReAuthMessage createGxReAuthRequest(final DiameterHeader diameterHeader, final DiameterAvp[] avps) throws IllegalArgumentException {
  boolean isRequest = false;
  if (diameterHeader == null) {
    isRequest = true;
  }
  GxReAuthMessage msg = null;
  if (!isRequest) {
    final Message raw = createGxMessage(diameterHeader, avps, GxReAuthAnswer.commandCode);
    raw.setProxiable(true);
    raw.setRequest(false);
    raw.setReTransmitted(false); // just in case. answers never have T flag set
    msg = new GxReAuthAnswerImpl(raw);
  } else {
    final Message raw = createGxMessage(null, avps, GxReAuthRequest.commandCode);
    raw.setProxiable(true);
    raw.setRequest(true);
    msg = new GxReAuthRequestImpl(raw);
  }
  return msg;
}

代码示例来源:origin: org.mobicents.resources/mobicents-slee-ra-diameter-ro-ra

private RoCreditControlMessage createRoCreditControlRequest(DiameterHeader diameterHeader, DiameterAvp[] avps) throws IllegalArgumentException {
 // List<DiameterAvp> list = (List<DiameterAvp>) this.avpList.clone();
 boolean isRequest = diameterHeader == null;
 RoCreditControlMessage msg = null;
 if (!isRequest) {
  Message raw = createMessage(diameterHeader, avps);
  raw.setProxiable(diameterHeader.isProxiable());
  raw.setRequest(false);
  raw.setReTransmitted(false); // just in case. answers never have T flag set
  msg = new RoCreditControlAnswerImpl(raw);
 } else {
  Message raw = createMessage(null, avps);
  raw.setProxiable(true);
  raw.setRequest(true);
  msg = new RoCreditControlRequestImpl(raw);
 }
 return msg;
}

代码示例来源:origin: org.mobicents.resources/restcomm-slee-ra-diameter-ro-ra

private RoCreditControlMessage createRoCreditControlRequest(DiameterHeader diameterHeader, DiameterAvp[] avps) throws IllegalArgumentException {
 // List<DiameterAvp> list = (List<DiameterAvp>) this.avpList.clone();
 boolean isRequest = diameterHeader == null;
 RoCreditControlMessage msg = null;
 if (!isRequest) {
  Message raw = createMessage(diameterHeader, avps);
  raw.setProxiable(diameterHeader.isProxiable());
  raw.setRequest(false);
  raw.setReTransmitted(false); // just in case. answers never have T flag set
  msg = new RoCreditControlAnswerImpl(raw);
 } else {
  Message raw = createMessage(null, avps);
  raw.setProxiable(true);
  raw.setRequest(true);
  msg = new RoCreditControlRequestImpl(raw);
 }
 return msg;
}

代码示例来源:origin: org.mobicents.resources/mobicents-slee-ra-diameter-rf-ra

protected RfAccountingMessage createRfAccountingMessage(DiameterHeader diameterHeader, DiameterAvp[] avps) throws IllegalArgumentException {
 // List<DiameterAvp> list = (List<DiameterAvp>) this.avpList.clone();
 boolean isRequest = diameterHeader == null;
 RfAccountingMessage msg = null;
 if (!isRequest) {
  Message raw = createMessage(diameterHeader, avps);
  raw.setProxiable(diameterHeader.isProxiable());
  raw.setRequest(false);
  raw.setReTransmitted(false); // just in case. answers never have T flag set
  msg = new RfAccountingAnswerImpl(raw);
 } else {
  Message raw = createMessage(null, avps);
  raw.setProxiable(true);
  raw.setRequest(true);
  msg = new RfAccountingRequestImpl(raw);
 }
 return msg;
}

代码示例来源:origin: org.mobicents.resources/mobicents-slee-ra-diameter-cca-common-ra

private CreditControlMessage createCreditControlMessage(DiameterHeader diameterHeader, DiameterAvp[] avps) throws IllegalArgumentException {
 //List<DiameterAvp> list = (List<DiameterAvp>) this.avpList.clone();
 boolean isRequest = diameterHeader == null;
 CreditControlMessage msg = null;
 if(!isRequest) {
  Message raw = createMessage(diameterHeader, avps);
  raw.setProxiable(diameterHeader.isProxiable());
  raw.setRequest(false);
  raw.setReTransmitted(false); // just in case. answers never have T flag set
  msg = new CreditControlAnswerImpl(raw);
 }
 else {
  Message raw = createMessage(null, avps);
  raw.setProxiable(true);
  raw.setRequest(true);
  msg = new CreditControlRequestImpl(raw);
 }
 return msg;
}

代码示例来源:origin: org.mobicents.resources/restcomm-slee-ra-diameter-cca-common-ra

private CreditControlMessage createCreditControlMessage(DiameterHeader diameterHeader, DiameterAvp[] avps) throws IllegalArgumentException {
 //List<DiameterAvp> list = (List<DiameterAvp>) this.avpList.clone();
 boolean isRequest = diameterHeader == null;
 CreditControlMessage msg = null;
 if(!isRequest) {
  Message raw = createMessage(diameterHeader, avps);
  raw.setProxiable(diameterHeader.isProxiable());
  raw.setRequest(false);
  raw.setReTransmitted(false); // just in case. answers never have T flag set
  msg = new CreditControlAnswerImpl(raw);
 }
 else {
  Message raw = createMessage(null, avps);
  raw.setProxiable(true);
  raw.setRequest(true);
  msg = new CreditControlRequestImpl(raw);
 }
 return msg;
}

代码示例来源:origin: org.mobicents.resources/restcomm-slee-ra-diameter-gq-ra

@Override
public GqSessionTerminationAnswer createGqSessionTerminationAnswer(GqSessionTerminationRequest str) {
 Message raw = createMessage(str.getHeader(), new DiameterAvp[] {});
 raw.setRequest(false); // this should be different ...
 raw.setReTransmitted(false); // just in case. answers never have T flag set
 GqSessionTerminationAnswerImpl sta = new GqSessionTerminationAnswerImpl(raw);
 sta.getGenericData().getAvps().removeAvp(DiameterAvpCodes.DESTINATION_HOST);
 sta.getGenericData().getAvps().removeAvp(DiameterAvpCodes.DESTINATION_REALM);
 sta.getGenericData().getAvps().removeAvp(DiameterAvpCodes.ORIGIN_HOST);
 sta.getGenericData().getAvps().removeAvp(DiameterAvpCodes.ORIGIN_REALM);
 sta.setSessionId(str.getSessionId());
 addOrigin(sta);
 return sta;
}

代码示例来源:origin: org.mobicents.resources/restcomm-slee-ra-diameter-gq-ra

@Override
public GqAAAnswer createGqAAAnswer(GqAARequest aar) {
 Message raw = createMessage(aar.getHeader(), new DiameterAvp[] {});
 raw.setRequest(false); // this should be different ...
 raw.setReTransmitted(false); // just in case. answers never have T flag set
 GqAAAnswerImpl aaa = new GqAAAnswerImpl(raw);
 aaa.getGenericData().getAvps().removeAvp(DiameterAvpCodes.DESTINATION_HOST);
 aaa.getGenericData().getAvps().removeAvp(DiameterAvpCodes.DESTINATION_REALM);
 aaa.getGenericData().getAvps().removeAvp(DiameterAvpCodes.ORIGIN_HOST);
 aaa.getGenericData().getAvps().removeAvp(DiameterAvpCodes.ORIGIN_REALM);
 aaa.setSessionId(aar.getSessionId());
 addOrigin(aaa);
 return aaa;
}

代码示例来源:origin: org.mobicents.resources/restcomm-slee-ra-diameter-gq-ra

@Override
public GqReAuthAnswer createGqReAuthAnswer(GqReAuthRequest rar) {
 Message raw = createMessage(rar.getHeader(), new DiameterAvp[] {});
 raw.setRequest(false); // this should be different ...
 raw.setReTransmitted(false); // just in case. answers never have T flag set
 GqReAuthAnswerImpl raa = new GqReAuthAnswerImpl(raw);
 raa.getGenericData().getAvps().removeAvp(DiameterAvpCodes.DESTINATION_HOST);
 raa.getGenericData().getAvps().removeAvp(DiameterAvpCodes.DESTINATION_REALM);
 raa.getGenericData().getAvps().removeAvp(DiameterAvpCodes.ORIGIN_HOST);
 raa.getGenericData().getAvps().removeAvp(DiameterAvpCodes.ORIGIN_REALM);
 raa.setSessionId(rar.getSessionId());
 addOrigin(raa);
 return raa;
}

代码示例来源:origin: org.mobicents.resources/restcomm-slee-ra-diameter-gq-ra

@Override
public GqAbortSessionAnswer createGqAbortSessionAnswer(GqAbortSessionRequest asr) {
 Message raw = createMessage(asr.getHeader(), new DiameterAvp[] {});
 raw.setRequest(false); // this should be different ...
 raw.setReTransmitted(false); // just in case. answers never have T flag set
 GqAbortSessionAnswerImpl asa = new GqAbortSessionAnswerImpl(raw);
 asa.getGenericData().getAvps().removeAvp(DiameterAvpCodes.DESTINATION_HOST);
 asa.getGenericData().getAvps().removeAvp(DiameterAvpCodes.DESTINATION_REALM);
 asa.getGenericData().getAvps().removeAvp(DiameterAvpCodes.ORIGIN_HOST);
 asa.getGenericData().getAvps().removeAvp(DiameterAvpCodes.ORIGIN_REALM);
 asa.setSessionId(asr.getSessionId());
 addOrigin(asa);
 return asa;
}

相关文章