Package org.cipango.diameter.node

Examples of org.cipango.diameter.node.DiameterRequest


    return _buffer.toString();
  }
 
  public static void main(String[] args)
  {
    DiameterMessage message = new DiameterRequest(new Node(), Accounting.ACR, Accounting.ACCOUNTING_ORDINAL, "foo");
    message.getAVPs().add(Zh.ZH_APPLICATION_ID.getAVP());

    PrettyPrinter pp = new PrettyPrinter();
    message.accept(pp);
    System.out.println(pp);
  }
View Full Code Here


    String destinationHost = "192.168.2.10";
   
    while (!peer.isOpen())
      Thread.sleep(100);
   
    DiameterRequest request = new DiameterRequest(node, Sh.UDR, sh.getId(), "123456789");
   
    request.getAVPs().add(Common.DESTINATION_REALM, destinationRealm);
    if (destinationHost != null)
      request.getAVPs().add(Common.DESTINATION_HOST, destinationHost);
   
    request.getAVPs().add(sh.getAVP());
    request.getAVPs().add(Common.AUTH_SESSION_STATE, AuthSessionState.NO_STATE_MAINTAINED);
   
    AVP<AVPList> userIdentity = new AVP<AVPList>(Sh.USER_IDENTITY, new AVPList());
    userIdentity.getValue().add(Cx.PUBLIC_IDENTITY, "sip:thomas@cipango.org");
    request.getAVPs().add(userIdentity);
   
    request.getAVPs().add(Sh.DATA_REFERENCE, Sh.DataReference.IMSUserState);
   
    request.send();
  }
View Full Code Here

   
    DiameterCommand command = isRequest ? dictionary.getRequest(code) : dictionary.getAnswer(code);
    if (command == null)
      command = isRequest ? Factory.newRequest(code, "Unknown") : Factory.newAnswer(code, "Unknown");
   
    DiameterMessage message = isRequest ? new DiameterRequest() : new DiameterAnswer();
   
    message.setApplicationId(getInt(buffer));
    message.setHopByHopId(getInt(buffer));
    message.setEndToEndId(getInt(buffer));
    message.setCommand(command);
View Full Code Here

TOP

Related Classes of org.cipango.diameter.node.DiameterRequest

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.