/protocols/jain-megaco/megaco-api/src/main/java/javax/megaco/association/CreateTxnReq.java

http://mobicents.googlecode.com/ · Java · 49 lines · 17 code · 9 blank · 23 comment · 0 complexity · 0e0092bf42e491b20a285829ffbf0517 MD5 · raw file

  1. package javax.megaco.association;
  2. import javax.megaco.AssociationEvent;
  3. public class CreateTxnReq extends AssociationEvent {
  4. // FIXME 0 is correct defautl value?
  5. protected int exchangeId = 0;
  6. /**
  7. * Constructs a Create Transaction Request Event object.
  8. *
  9. * @param source
  10. * - A reference to the object, the "source", that is logically
  11. * deemed to be the object upon which the Event in question
  12. * initially occurred.
  13. * @param assocHandle
  14. * - The association handle to uniquely identify the MG-MGC pair.
  15. * This is allocated by the stack when the Listener registers
  16. * with the provider with a unique MG-MGC identity.
  17. * @param exchangeId
  18. * - The exchange Identifier value.
  19. * @throws IllegalArgumentException
  20. */
  21. public CreateTxnReq(Object source, int assocHandle, int exchangeId)
  22. throws IllegalArgumentException {
  23. super(source, assocHandle);
  24. this.exchangeId=exchangeId;
  25. }
  26. @Override
  27. public int getAssocOperIdentifier() {
  28. return AssocEventType.M_CREATE_TXN_REQ;
  29. }
  30. /**
  31. * Gets the echange identifier value. This identifier is used for
  32. * corellating the create transaction request and response. The response for
  33. * this create transaction event must have the same exchange Id.
  34. *
  35. * @return Returns the exchange identifier value.
  36. */
  37. public int getExchangeId() {
  38. return exchangeId;
  39. }
  40. }