PageRenderTime 28ms CodeModel.GetById 23ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

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