Examples of AVPList


Examples of org.cipango.diameter.AVPList

  @Test
  public void testEncodeSmallBuffer() throws Exception
  {
    DiameterAnswer answer = new DiameterAnswer();
    answer.setCommand(Sh.UDA);
    AVPList l = new AVPList();
    answer.setAVPList(l);
    answer.setResultCode(Common.DIAMETER_SUCCESS);
    answer.setEndToEndId(33);
    answer.setHopByHopId(51648);
    l.add(Common.DIAMETER_SUCCESS.getAVP());
    l.add(new AVP<String>(Common.ORIGIN_HOST, "cipango.org"));
    l.add(new AVP<InetAddress>(Common.HOST_IP_ADDRESS, InetAddress.getLocalHost()));
    l.add(new AVP<Integer>(Common.FIRMWARE_REVISION, 2));
    l.add(new AVP<byte[]>(Sh.USER_DATA, "<shData>dasaiTag<shData>".getBytes()));

    for (int i = 24; i < 256; i++)
    {
      Buffer buffer = new ByteArrayBuffer(i);
      buffer = Codecs.__message.encode(buffer, answer);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.