Package org.cipango.diameter

Examples of org.cipango.diameter.AVP


{
  @SuppressWarnings({ "unchecked", "rawtypes" })
  @Test
  public void testAVPCodec() throws IOException
  {
    AVP avp = new AVP(Cx.PUBLIC_IDENTITY, "sip:alice@cipango.org");
    Buffer buffer = new ByteArrayBuffer(64);
    Codecs.__avp.encode(buffer, avp);
 
    AVP decoded = Codecs.__avp.decode(buffer);
   
    assertEquals(avp.getType().getCode(), decoded.getType().getCode());
    assertEquals(avp.getType().getVendorId(), decoded.getType().getVendorId());
   
  }
View Full Code Here


    Type type = Dictionary.getInstance().getType(vendorId, code);
   
    if (type == null)
      type = Factory.newType("Unknown", vendorId, code, Common.__octetString);
   
    AVP avp = new AVP(type);
    // TODO flags
    avp.setValue(type.getDataFormat().decode(data));
   
    return avp; 
  }
View Full Code Here

        add(sb.toString());       
        add(message.getAVPs());
      }
      else if (value instanceof AVP)
      {
        AVP avp = (AVP) value;
        add(avp.getType().toString(), avp.getValue());
      }
      else
      {       
        if (_prettyPrint)
          {
View Full Code Here

TOP

Related Classes of org.cipango.diameter.AVP

Copyright © 2018 www.massapicom. 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.