PageRenderTime 48ms CodeModel.GetById 15ms app.highlight 28ms RepoModel.GetById 1ms app.codeStats 0ms

/protocols/ss7/map/map-impl/src/main/java/org/mobicents/protocols/ss7/map/service/lsm/MAPDialogLsmImpl.java

http://mobicents.googlecode.com/
Java | 428 lines | 241 code | 69 blank | 118 comment | 26 complexity | 97278a8a4be4af432d2143d417c5d7b7 MD5 | raw file
  1/*
  2 * JBoss, Home of Professional Open Source
  3 * Copyright 2011, Red Hat, Inc. and individual contributors
  4 * by the @authors tag. See the copyright.txt in the distribution for a
  5 * full listing of individual contributors.
  6 *
  7 * This is free software; you can redistribute it and/or modify it
  8 * under the terms of the GNU Lesser General Public License as
  9 * published by the Free Software Foundation; either version 2.1 of
 10 * the License, or (at your option) any later version.
 11 *
 12 * This software is distributed in the hope that it will be useful,
 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 15 * Lesser General Public License for more details.
 16 *
 17 * You should have received a copy of the GNU Lesser General Public
 18 * License along with this software; if not, write to the Free
 19 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 20 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 21 */
 22
 23package org.mobicents.protocols.ss7.map.service.lsm;
 24
 25import org.mobicents.protocols.asn.AsnOutputStream;
 26import org.mobicents.protocols.asn.Tag;
 27import org.mobicents.protocols.ss7.map.MAPDialogImpl;
 28import org.mobicents.protocols.ss7.map.MAPProviderImpl;
 29import org.mobicents.protocols.ss7.map.api.MAPApplicationContext;
 30import org.mobicents.protocols.ss7.map.api.MAPException;
 31import org.mobicents.protocols.ss7.map.api.MAPOperationCode;
 32import org.mobicents.protocols.ss7.map.api.MAPServiceBase;
 33import org.mobicents.protocols.ss7.map.api.primitives.AddressString;
 34import org.mobicents.protocols.ss7.map.api.primitives.CellGlobalIdOrServiceAreaIdOrLAI;
 35import org.mobicents.protocols.ss7.map.api.primitives.IMEI;
 36import org.mobicents.protocols.ss7.map.api.primitives.IMSI;
 37import org.mobicents.protocols.ss7.map.api.primitives.ISDNAddressString;
 38import org.mobicents.protocols.ss7.map.api.primitives.LMSI;
 39import org.mobicents.protocols.ss7.map.api.primitives.MAPExtensionContainer;
 40import org.mobicents.protocols.ss7.map.api.primitives.SubscriberIdentity;
 41import org.mobicents.protocols.ss7.map.api.service.lsm.AccuracyFulfilmentIndicator;
 42import org.mobicents.protocols.ss7.map.api.service.lsm.AreaEventInfo;
 43import org.mobicents.protocols.ss7.map.api.service.lsm.DeferredmtlrData;
 44import org.mobicents.protocols.ss7.map.api.service.lsm.LCSClientID;
 45import org.mobicents.protocols.ss7.map.api.service.lsm.LCSCodeword;
 46import org.mobicents.protocols.ss7.map.api.service.lsm.LCSEvent;
 47import org.mobicents.protocols.ss7.map.api.service.lsm.LCSLocationInfo;
 48import org.mobicents.protocols.ss7.map.api.service.lsm.LCSPrivacyCheck;
 49import org.mobicents.protocols.ss7.map.api.service.lsm.LCSQoS;
 50import org.mobicents.protocols.ss7.map.api.service.lsm.LocationType;
 51import org.mobicents.protocols.ss7.map.api.service.lsm.MAPDialogLsm;
 52import org.mobicents.protocols.ss7.map.api.service.lsm.SLRArgExtensionContainer;
 53import org.mobicents.protocols.ss7.map.api.service.lsm.SupportedGADShapes;
 54import org.mobicents.protocols.ss7.tcap.api.TCAPException;
 55import org.mobicents.protocols.ss7.tcap.api.tc.dialog.Dialog;
 56import org.mobicents.protocols.ss7.tcap.asn.comp.Invoke;
 57import org.mobicents.protocols.ss7.tcap.asn.comp.OperationCode;
 58import org.mobicents.protocols.ss7.tcap.asn.comp.Parameter;
 59import org.mobicents.protocols.ss7.tcap.asn.comp.ReturnResultLast;
 60
 61/**
 62 * @author amit bhayani
 63 * 
 64 */
 65public class MAPDialogLsmImpl extends MAPDialogImpl implements MAPDialogLsm {
 66
 67	/**
 68	 * @param appCntx
 69	 * @param tcapDialog
 70	 * @param mapProviderImpl
 71	 * @param mapService
 72	 * @param origReference
 73	 * @param destReference
 74	 */
 75	protected MAPDialogLsmImpl(MAPApplicationContext appCntx, Dialog tcapDialog, MAPProviderImpl mapProviderImpl, MAPServiceBase mapService,
 76			AddressString origReference, AddressString destReference) {
 77		super(appCntx, tcapDialog, mapProviderImpl, mapService, origReference, destReference);
 78	}
 79
 80	/*
 81	 * (non-Javadoc)
 82	 * 
 83	 * @see org.mobicents.protocols.ss7.map.api.service.lsm.MAPDialogLsm#
 84	 * addSubscriberLocationReportRequestIndication
 85	 * (org.mobicents.protocols.ss7.map.api.service.lsm.LCSEvent,
 86	 * org.mobicents.protocols.ss7.map.api.service.lsm.LCSClientID,
 87	 * org.mobicents.protocols.ss7.map.api.service.lsm.LCSLocationInfo,
 88	 * org.mobicents.protocols.ss7.map.api.dialog.IMSI,
 89	 * org.mobicents.protocols.ss7.map.api.dialog.AddressString,
 90	 * org.mobicents.protocols.ss7.map.api.dialog.AddressString,
 91	 * org.mobicents.protocols.ss7.map.api.dialog.AddressString,
 92	 * java.lang.String, java.lang.String, java.lang.String, java.lang.String,
 93	 * int, java.lang.String,
 94	 * org.mobicents.protocols.ss7.map.api.service.lsm.DeferredmtlrData,
 95	 * java.lang.String, org.mobicents.protocols.ss7.map.api.service.lsm.
 96	 * CellGlobalIdOrServiceAreaIdOrLAI, java.lang.String, int, boolean,
 97	 * org.mobicents
 98	 * .protocols.ss7.map.api.service.lsm.AccuracyFulfilmentIndicator)
 99	 */
100	@Override
101	public Long addSubscriberLocationReportRequest(LCSEvent lcsEvent, LCSClientID lcsClientID, LCSLocationInfo lcsLocationInfo, ISDNAddressString msisdn,
102			IMSI imsi, IMEI imei, ISDNAddressString naEsrd, ISDNAddressString naEsrk, byte[] locationEstimate, Integer ageOfLocationEstimate,
103			SLRArgExtensionContainer slrArgExtensionContainer, byte[] addLocationEstimate, DeferredmtlrData deferredmtlrData, Byte lcsReferenceNumber,
104			byte[] geranPositioningData, byte[] utranPositioningData, CellGlobalIdOrServiceAreaIdOrLAI cellIdOrSai, byte[] hgmlcAddress,
105			Integer lcsServiceTypeID, Boolean saiPresent, Boolean pseudonymIndicator, AccuracyFulfilmentIndicator accuracyFulfilmentIndicator)
106			throws MAPException {
107		return this.addSubscriberLocationReportRequest(_Timer_Default, lcsEvent, lcsClientID, lcsLocationInfo, msisdn, imsi, imei, naEsrd, naEsrk,
108				locationEstimate, ageOfLocationEstimate, slrArgExtensionContainer, addLocationEstimate, deferredmtlrData, lcsReferenceNumber,
109				geranPositioningData, utranPositioningData, cellIdOrSai, hgmlcAddress, lcsServiceTypeID, saiPresent, pseudonymIndicator,
110				accuracyFulfilmentIndicator);
111	}
112
113	@Override
114	public Long addSubscriberLocationReportRequest(int customInvokeTimeout, LCSEvent lcsEvent, LCSClientID lcsClientID, LCSLocationInfo lcsLocationInfo,
115			ISDNAddressString msisdn, IMSI imsi, IMEI imei, ISDNAddressString naEsrd, ISDNAddressString naEsrk, byte[] locationEstimate,
116			Integer ageOfLocationEstimate, SLRArgExtensionContainer slrArgExtensionContainer, byte[] addLocationEstimate, DeferredmtlrData deferredmtlrData,
117			Byte lcsReferenceNumber, byte[] geranPositioningData, byte[] utranPositioningData, CellGlobalIdOrServiceAreaIdOrLAI cellIdOrSai,
118			byte[] hgmlcAddress, Integer lcsServiceTypeID, Boolean saiPresent, Boolean pseudonymIndicator,
119			AccuracyFulfilmentIndicator accuracyFulfilmentIndicator) throws MAPException {
120
121		if (lcsEvent == null || lcsClientID == null || lcsLocationInfo == null) {
122			throw new MAPException("Mandatroy parameters lCSEvent, lCSClientID or lCSLocationInfo cannot be null");
123		}
124
125		try {
126			Invoke invoke = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createTCInvokeRequest();
127			if (customInvokeTimeout == _Timer_Default)
128				invoke.setTimeout(_Timer_m);
129			else
130				invoke.setTimeout(customInvokeTimeout);
131
132			// Operation Code
133			OperationCode oc = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode();
134			oc.setLocalOperationCode((long) MAPOperationCode.provideSubscriberLocation);
135
136			SubscriberLocationReportRequestIndicationImpl req = new SubscriberLocationReportRequestIndicationImpl(lcsEvent, lcsClientID, lcsLocationInfo,
137					msisdn, imsi, imei, naEsrd, naEsrk, locationEstimate, ageOfLocationEstimate, slrArgExtensionContainer, addLocationEstimate,
138					deferredmtlrData, lcsReferenceNumber, geranPositioningData, utranPositioningData, cellIdOrSai, hgmlcAddress, lcsServiceTypeID, saiPresent,
139					pseudonymIndicator, accuracyFulfilmentIndicator);
140
141			AsnOutputStream asnOs = new AsnOutputStream();
142			req.encodeAll(asnOs);
143
144			Parameter p = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createParameter();
145			p.setTagClass(Tag.CLASS_UNIVERSAL);
146			p.setTag(Tag.SEQUENCE);
147			p.setPrimitive(false);
148			p.setData(asnOs.toByteArray());
149
150			invoke.setParameter(p);
151
152			Long invokeId = this.tcapDialog.getNewInvokeId();
153			invoke.setInvokeId(invokeId);
154
155			this.sendInvokeComponent(invoke);
156
157			return invokeId;
158		} catch (TCAPException e) {
159			throw new MAPException(e.getMessage(), e);
160		}
161	}
162
163	/*
164	 * (non-Javadoc)
165	 * 
166	 * @see org.mobicents.protocols.ss7.map.api.service.lsm.MAPDialogLsm#
167	 * addSubscriberLocationReportResponseIndication(long,
168	 * org.mobicents.protocols.ss7.map.api.dialog.MAPExtensionContainer,
169	 * org.mobicents.protocols.ss7.map.api.dialog.AddressString,
170	 * org.mobicents.protocols.ss7.map.api.dialog.AddressString)
171	 */
172	@Override
173	public void addSubscriberLocationReportResponse(long invokeId, ISDNAddressString naEsrd, ISDNAddressString naEsrk, MAPExtensionContainer extensionContainer)
174			throws MAPException {
175
176		ReturnResultLast resultLast = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createTCResultLastRequest();
177		resultLast.setInvokeId(invokeId);
178
179		// Operation Code
180		OperationCode oc = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode();
181		oc.setLocalOperationCode((long) MAPOperationCode.provideSubscriberLocation);
182		resultLast.setOperationCode(oc);
183
184		SubscriberLocationReportResponseIndicationImpl resInd = new SubscriberLocationReportResponseIndicationImpl(naEsrd, naEsrk, extensionContainer);
185
186		AsnOutputStream asnOs = new AsnOutputStream();
187		resInd.encodeAll(asnOs);
188
189		Parameter p = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createParameter();
190		p.setTagClass(Tag.CLASS_UNIVERSAL);
191		p.setTag(Tag.SEQUENCE);
192		p.setPrimitive(false);
193		p.setData(asnOs.toByteArray());
194
195		resultLast.setParameter(p);
196
197		this.sendReturnResultLastComponent(resultLast);
198	}
199
200	/*
201	 * (non-Javadoc)
202	 * 
203	 * @see org.mobicents.protocols.ss7.map.api.service.lsm.MAPDialogLsm#
204	 * addSendRoutingInforForLCSRequestIndication
205	 * (org.mobicents.protocols.ss7.map.api.primitives.ISDNAddressString,
206	 * org.mobicents.protocols.ss7.map.api.service.lsm.SubscriberIdentity,
207	 * org.mobicents.protocols.ss7.map.api.primitives.MAPExtensionContainer)
208	 */
209	@Override
210	public Long addSendRoutingInfoForLCSRequest(ISDNAddressString mlcNumber, SubscriberIdentity targetMS, MAPExtensionContainer extensionContainer)
211			throws MAPException {
212		return this.addSendRoutingInfoForLCSRequest(_Timer_Default, mlcNumber, targetMS, extensionContainer);
213	}
214
215	@Override
216	public Long addSendRoutingInfoForLCSRequest(int customInvokeTimeout, ISDNAddressString mlcNumber, SubscriberIdentity targetMS,
217			MAPExtensionContainer extensionContainer) throws MAPException {
218
219		if (mlcNumber == null || targetMS == null) {
220			throw new MAPException("Mandatroy parameters mlcNumber or targetMS cannot be null");
221		}
222
223		try {
224			Invoke invoke = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createTCInvokeRequest();
225			if (customInvokeTimeout == _Timer_Default)
226				invoke.setTimeout(_Timer_m);
227			else
228				invoke.setTimeout(customInvokeTimeout);
229
230			// Operation Code
231			OperationCode oc = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode();
232			oc.setLocalOperationCode((long) MAPOperationCode.sendRoutingInfoForLCS);
233
234			SendRoutingInfoForLCSRequestIndicationImpl req = new SendRoutingInfoForLCSRequestIndicationImpl(mlcNumber, targetMS, extensionContainer);
235
236			AsnOutputStream asnOs = new AsnOutputStream();
237			req.encodeAll(asnOs);
238
239			Parameter p = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createParameter();
240			p.setTagClass(Tag.CLASS_UNIVERSAL);
241			p.setTag(Tag.SEQUENCE);
242			p.setPrimitive(false);
243			p.setData(asnOs.toByteArray());
244
245			invoke.setParameter(p);
246
247			Long invokeId = this.tcapDialog.getNewInvokeId();
248			invoke.setInvokeId(invokeId);
249
250			this.sendInvokeComponent(invoke);
251
252			return invokeId;
253		} catch (TCAPException e) {
254			throw new MAPException(e.getMessage(), e);
255		}
256	}
257
258	/*
259	 * (non-Javadoc)
260	 * 
261	 * @see org.mobicents.protocols.ss7.map.api.service.lsm.MAPDialogLsm#
262	 * addSendRoutingInforForLCSResponseIndication
263	 * (org.mobicents.protocols.ss7.map.api.service.lsm.SubscriberIdentity,
264	 * org.mobicents.protocols.ss7.map.api.service.lsm.LCSLocationInfo,
265	 * org.mobicents.protocols.ss7.map.api.primitives.MAPExtensionContainer,
266	 * byte[], byte[], byte[], byte[])
267	 */
268	@Override
269	public void addSendRoutingInfoForLCSResponse(long invokeId, SubscriberIdentity targetMS, LCSLocationInfo lcsLocationInfo,
270			MAPExtensionContainer extensionContainer, byte[] vgmlcAddress, byte[] hGmlcAddress, byte[] pprAddress, byte[] additionalVGmlcAddress)
271			throws MAPException {
272
273		if (targetMS == null || lcsLocationInfo == null) {
274			throw new MAPException("Mandatroy parameters targetMS or lcsLocationInfo cannot be null");
275		}
276
277		ReturnResultLast resultLast = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createTCResultLastRequest();
278		resultLast.setInvokeId(invokeId);
279
280		// Operation Code
281		OperationCode oc = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode();
282		oc.setLocalOperationCode((long) MAPOperationCode.sendRoutingInfoForLCS);
283		resultLast.setOperationCode(oc);
284
285		SendRoutingInfoForLCSResponseIndicationImpl resInd = new SendRoutingInfoForLCSResponseIndicationImpl(targetMS, lcsLocationInfo, extensionContainer,
286				vgmlcAddress, hGmlcAddress, pprAddress, additionalVGmlcAddress);
287
288		AsnOutputStream asnOs = new AsnOutputStream();
289		resInd.encodeAll(asnOs);
290
291		Parameter p = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createParameter();
292		p.setTagClass(Tag.CLASS_UNIVERSAL);
293		p.setTag(Tag.SEQUENCE);
294		p.setPrimitive(false);
295		p.setData(asnOs.toByteArray());
296
297		resultLast.setParameter(p);
298
299		this.sendReturnResultLastComponent(resultLast);
300
301	}
302
303	/*
304	 * (non-Javadoc)
305	 * 
306	 * @see org.mobicents.protocols.ss7.map.api.service.lsm.MAPDialogLsm#
307	 * addProvideSubscriberLocationRequest
308	 * (org.mobicents.protocols.ss7.map.api.service.lsm.LocationType,
309	 * org.mobicents.protocols.ss7.map.api.primitives.ISDNAddressString,
310	 * org.mobicents.protocols.ss7.map.api.service.lsm.LCSClientID,
311	 * java.lang.Boolean, org.mobicents.protocols.ss7.map.api.primitives.IMSI,
312	 * org.mobicents.protocols.ss7.map.api.primitives.ISDNAddressString,
313	 * org.mobicents.protocols.ss7.map.api.primitives.LMSI,
314	 * org.mobicents.protocols.ss7.map.api.primitives.IMEI, java.lang.Integer,
315	 * org.mobicents.protocols.ss7.map.api.service.lsm.LCSQoS,
316	 * org.mobicents.protocols.ss7.map.api.primitives.MAPExtensionContainer,
317	 * java.util.BitSet, java.lang.Byte, java.lang.Integer,
318	 * org.mobicents.protocols.ss7.map.api.service.lsm.LCSCodeword,
319	 * org.mobicents.protocols.ss7.map.api.service.lsm.LCSPrivacyCheck,
320	 * org.mobicents.protocols.ss7.map.api.service.lsm.AreaEventInfo, byte[])
321	 */
322	@Override
323	public Long addProvideSubscriberLocationRequest(LocationType locationType, ISDNAddressString mlcNumber, LCSClientID lcsClientID, Boolean privacyOverride,
324			IMSI imsi, ISDNAddressString msisdn, LMSI lmsi, IMEI imei, Integer lcsPriority, LCSQoS lcsQoS, MAPExtensionContainer extensionContainer,
325			SupportedGADShapes supportedGADShapes, Byte lcsReferenceNumber, Integer lcsServiceTypeID, LCSCodeword lcsCodeword, LCSPrivacyCheck lcsPrivacyCheck,
326			AreaEventInfo areaEventInfo, byte[] hgmlcAddress) throws MAPException {
327		return this.addProvideSubscriberLocationRequest(_Timer_Default, locationType, mlcNumber, lcsClientID, privacyOverride, imsi, msisdn, lmsi, imei,
328				lcsPriority, lcsQoS, extensionContainer, supportedGADShapes, lcsReferenceNumber, lcsServiceTypeID, lcsCodeword, lcsPrivacyCheck, areaEventInfo,
329				hgmlcAddress);
330	}
331
332	@Override
333	public Long addProvideSubscriberLocationRequest(int customInvokeTimeout, LocationType locationType, ISDNAddressString mlcNumber, LCSClientID lcsClientID,
334			Boolean privacyOverride, IMSI imsi, ISDNAddressString msisdn, LMSI lmsi, IMEI imei, Integer lcsPriority, LCSQoS lcsQoS,
335			MAPExtensionContainer extensionContainer, SupportedGADShapes supportedGADShapes, Byte lcsReferenceNumber, Integer lcsServiceTypeID,
336			LCSCodeword lcsCodeword, LCSPrivacyCheck lcsPrivacyCheck, AreaEventInfo areaEventInfo, byte[] hgmlcAddress) throws MAPException {
337
338		if (locationType == null || mlcNumber == null) {
339			throw new MAPException("Mandatroy parameters locationType or mlcNumber cannot be null");
340		}
341
342		try {
343			Invoke invoke = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createTCInvokeRequest();
344			if (customInvokeTimeout == _Timer_Default)
345				invoke.setTimeout(_Timer_ml);
346			else
347				invoke.setTimeout(customInvokeTimeout);
348
349			// Operation Code
350			OperationCode oc = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode();
351			oc.setLocalOperationCode((long) MAPOperationCode.provideSubscriberLocation);
352
353			ProvideSubscriberLocationRequestIndicationImpl req = new ProvideSubscriberLocationRequestIndicationImpl(locationType, mlcNumber, lcsClientID,
354					privacyOverride, imsi, msisdn, lmsi, imei, lcsPriority, lcsQoS, extensionContainer, supportedGADShapes, lcsReferenceNumber,
355					lcsServiceTypeID, lcsCodeword, lcsPrivacyCheck, areaEventInfo, hgmlcAddress);
356
357			AsnOutputStream asnOs = new AsnOutputStream();
358			req.encodeAll(asnOs);
359
360			Parameter p = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createParameter();
361			p.setTagClass(Tag.CLASS_UNIVERSAL);
362			p.setTag(Tag.SEQUENCE);
363			p.setPrimitive(false);
364			p.setData(asnOs.toByteArray());
365
366			invoke.setParameter(p);
367
368			Long invokeId = this.tcapDialog.getNewInvokeId();
369			invoke.setInvokeId(invokeId);
370
371			this.sendInvokeComponent(invoke);
372
373			return invokeId;
374		} catch (TCAPException e) {
375			throw new MAPException(e.getMessage(), e);
376		}
377	}
378
379	/*
380	 * (non-Javadoc)
381	 * 
382	 * @see org.mobicents.protocols.ss7.map.api.service.lsm.MAPDialogLsm#
383	 * addProvideSubscriberLocationResponse(long, byte[], byte[], byte[],
384	 * java.lang.Integer, byte[],
385	 * org.mobicents.protocols.ss7.map.api.primitives.MAPExtensionContainer,
386	 * java.lang.Boolean, org.mobicents.protocols.ss7.map.api.service.lsm.
387	 * CellGlobalIdOrServiceAreaIdOrLAI, java.lang.Boolean,
388	 * org.mobicents.protocols
389	 * .ss7.map.api.service.lsm.AccuracyFulfilmentIndicator)
390	 */
391	@Override
392	public void addProvideSubscriberLocationResponse(long invokeId, byte[] locationEstimate, byte[] geranPositioningData, byte[] utranPositioningData,
393			Integer ageOfLocationEstimate, byte[] additionalLocationEstimate, MAPExtensionContainer extensionContainer, Boolean deferredMTLRResponseIndicator,
394			CellGlobalIdOrServiceAreaIdOrLAI cellGlobalIdOrServiceAreaIdOrLAI, Boolean saiPresent, AccuracyFulfilmentIndicator accuracyFulfilmentIndicator)
395			throws MAPException {
396
397		if (locationEstimate == null) {
398			throw new MAPException("Mandatroy parameters locationEstimate cannot be null");
399		}
400
401		ReturnResultLast resultLast = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createTCResultLastRequest();
402		resultLast.setInvokeId(invokeId);
403
404		// Operation Code
405		OperationCode oc = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode();
406		oc.setLocalOperationCode((long) MAPOperationCode.provideSubscriberLocation);
407		resultLast.setOperationCode(oc);
408
409		ProvideSubscriberLocationResponseIndicationImpl resInd = new ProvideSubscriberLocationResponseIndicationImpl(locationEstimate, geranPositioningData,
410				utranPositioningData, ageOfLocationEstimate, additionalLocationEstimate, extensionContainer, deferredMTLRResponseIndicator,
411				cellGlobalIdOrServiceAreaIdOrLAI, saiPresent, accuracyFulfilmentIndicator);
412
413		AsnOutputStream asnOs = new AsnOutputStream();
414		resInd.encodeAll(asnOs);
415
416		Parameter p = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createParameter();
417		p.setTagClass(Tag.CLASS_UNIVERSAL);
418		p.setTag(Tag.SEQUENCE);
419		p.setPrimitive(false);
420		p.setData(asnOs.toByteArray());
421
422		resultLast.setParameter(p);
423
424		this.sendReturnResultLastComponent(resultLast);
425	}
426
427
428}