PageRenderTime 54ms CodeModel.GetById 4ms app.highlight 44ms RepoModel.GetById 1ms app.codeStats 0ms

/protocols/ss7/map/load/src/main/java/org/mobicents/protocols/ss7/map/load/Server.java

http://mobicents.googlecode.com/
Java | 515 lines | 242 code | 62 blank | 211 comment | 8 complexity | b8a9bb578c8958d6fb1f86b34fd11758 MD5 | raw file
  1/*
  2 * JBoss, Home of Professional Open Source
  3 * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual
  4 * contributors as indicated by the @authors tag. All rights reserved.
  5 * See the copyright.txt in the distribution for a full listing
  6 * of individual contributors.
  7 * 
  8 * This copyrighted material is made available to anyone wishing to use,
  9 * modify, copy, or redistribute it subject to the terms and conditions
 10 * of the GNU General Public License, v. 2.0.
 11 * 
 12 * This program 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 * General Public License for more details.
 16 * 
 17 * You should have received a copy of the GNU General Public License,
 18 * v. 2.0 along with this distribution; if not, write to the Free 
 19 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 20 * MA 02110-1301, USA.
 21 */
 22package org.mobicents.protocols.ss7.map.load;
 23
 24import org.apache.log4j.Logger;
 25import org.mobicents.protocols.sctp.ManagementImpl;
 26import org.mobicents.protocols.ss7.m3ua.ExchangeType;
 27import org.mobicents.protocols.ss7.m3ua.Functionality;
 28import org.mobicents.protocols.ss7.m3ua.IPSPType;
 29import org.mobicents.protocols.ss7.m3ua.impl.As;
 30import org.mobicents.protocols.ss7.m3ua.impl.Asp;
 31import org.mobicents.protocols.ss7.m3ua.impl.AspFactory;
 32import org.mobicents.protocols.ss7.m3ua.impl.M3UAManagement;
 33import org.mobicents.protocols.ss7.m3ua.parameter.RoutingContext;
 34import org.mobicents.protocols.ss7.m3ua.parameter.TrafficModeType;
 35import org.mobicents.protocols.ss7.map.MAPStackImpl;
 36import org.mobicents.protocols.ss7.map.api.MAPDialog;
 37import org.mobicents.protocols.ss7.map.api.MAPException;
 38import org.mobicents.protocols.ss7.map.api.MAPProvider;
 39import org.mobicents.protocols.ss7.map.api.dialog.MAPAbortProviderReason;
 40import org.mobicents.protocols.ss7.map.api.dialog.MAPAbortSource;
 41import org.mobicents.protocols.ss7.map.api.dialog.MAPNoticeProblemDiagnostic;
 42import org.mobicents.protocols.ss7.map.api.dialog.MAPProviderError;
 43import org.mobicents.protocols.ss7.map.api.dialog.MAPRefuseReason;
 44import org.mobicents.protocols.ss7.map.api.dialog.MAPUserAbortChoice;
 45import org.mobicents.protocols.ss7.map.api.errors.MAPErrorMessage;
 46import org.mobicents.protocols.ss7.map.api.primitives.AddressNature;
 47import org.mobicents.protocols.ss7.map.api.primitives.AddressString;
 48import org.mobicents.protocols.ss7.map.api.primitives.IMSI;
 49import org.mobicents.protocols.ss7.map.api.primitives.ISDNAddressString;
 50import org.mobicents.protocols.ss7.map.api.primitives.MAPExtensionContainer;
 51import org.mobicents.protocols.ss7.map.api.primitives.NumberingPlan;
 52import org.mobicents.protocols.ss7.map.api.primitives.USSDString;
 53import org.mobicents.protocols.ss7.map.api.service.supplementary.MAPDialogSupplementary;
 54import org.mobicents.protocols.ss7.map.api.service.supplementary.ProcessUnstructuredSSRequestIndication;
 55import org.mobicents.protocols.ss7.map.api.service.supplementary.ProcessUnstructuredSSResponseIndication;
 56import org.mobicents.protocols.ss7.map.api.service.supplementary.UnstructuredSSNotifyRequestIndication;
 57import org.mobicents.protocols.ss7.map.api.service.supplementary.UnstructuredSSNotifyResponseIndication;
 58import org.mobicents.protocols.ss7.map.api.service.supplementary.UnstructuredSSRequestIndication;
 59import org.mobicents.protocols.ss7.map.api.service.supplementary.UnstructuredSSResponseIndication;
 60import org.mobicents.protocols.ss7.sccp.impl.RemoteSignalingPointCode;
 61import org.mobicents.protocols.ss7.sccp.impl.RemoteSubSystem;
 62import org.mobicents.protocols.ss7.sccp.impl.SccpResource;
 63import org.mobicents.protocols.ss7.sccp.impl.SccpStackImpl;
 64import org.mobicents.protocols.ss7.tcap.asn.ApplicationContextName;
 65import org.mobicents.protocols.ss7.tcap.asn.comp.Problem;
 66
 67/**
 68 * @author amit bhayani
 69 * 
 70 */
 71public class Server extends TestHarness {
 72
 73	private static Logger logger = Logger.getLogger(Server.class);
 74
 75	// MAP
 76	private MAPStackImpl mapStack;
 77	private MAPProvider mapProvider;
 78
 79	// SCCP
 80	private SccpStackImpl sccpStack;
 81	private SccpResource sccpResource;
 82
 83	// M3UA
 84	private M3UAManagement serverM3UAMgmt;
 85
 86	// SCTP
 87	private ManagementImpl sctpManagement;
 88
 89	protected void initializeStack() throws Exception {
 90
 91		this.initSCTP();
 92
 93		// Initialize M3UA first
 94		this.initM3UA();
 95
 96		// Initialize SCCP
 97		this.initSCCP();
 98
 99		// Initialize MAP
100		this.initMAP();
101
102		// 7. Start ASP
103		serverM3UAMgmt.startAsp("RASP1");
104	}
105
106	private void initSCTP() throws Exception {
107		this.sctpManagement = new ManagementImpl("Server");
108		this.sctpManagement.setSingleThread(true);
109		this.sctpManagement.setConnectDelay(10000);
110		this.sctpManagement.start();
111
112		// 1. Create SCTP Server
113		sctpManagement.addServer(SERVER_NAME, SERVER_IP, SERVER_PORT);
114
115		// 2. Create SCTP Server Association
116		sctpManagement.addServerAssociation(CLIENT_IP, CLIENT_PORT, SERVER_NAME, SERVER_ASSOCIATION_NAME);
117
118		// 3. Start Server
119		sctpManagement.startServer(SERVER_NAME);
120
121	}
122
123	private void initM3UA() throws Exception {
124		this.serverM3UAMgmt = new M3UAManagement("Server");
125		this.serverM3UAMgmt.setTransportManagement(this.sctpManagement);
126		this.serverM3UAMgmt.start();
127
128		// Step 1 : Create App Server
129
130		RoutingContext rc = factory.createRoutingContext(new long[] { 100l });
131		TrafficModeType trafficModeType = factory.createTrafficModeType(TrafficModeType.Loadshare);
132		As as = this.serverM3UAMgmt.createAs("RAS1", Functionality.SGW, ExchangeType.SE, IPSPType.CLIENT, rc, trafficModeType, null);
133
134		// Step 2 : Create ASP
135		AspFactory aspFactor = this.serverM3UAMgmt.createAspFactory("RASP1", SERVER_ASSOCIATION_NAME);
136
137		// Step3 : Assign ASP to AS
138		Asp asp = this.serverM3UAMgmt.assignAspToAs("RAS1", "RASP1");
139
140		// Step 4: Add Route. Remote point code is 2
141		this.serverM3UAMgmt.addRoute(CLIENT_SPC, -1, -1, "RAS1");
142	}
143
144	private void initSCCP() {
145		this.sccpStack = new SccpStackImpl("MapLoadServerSccpStack");
146		this.sccpStack.setLocalSpc(SERVET_SPC);
147		this.sccpStack.setNi(NETWORK_INDICATOR);
148		this.sccpStack.setMtp3UserPart(this.serverM3UAMgmt);
149
150		this.sccpStack.start();
151
152		// Clean orevious resources if present
153		// this.sccpResource = new SccpResource();
154		// this.sccpResource.start();
155		//
156		// this.sccpStack.setSccpResource(this.sccpResource);
157
158		RemoteSignalingPointCode rspc = new RemoteSignalingPointCode(CLIENT_SPC, 0, 0);
159		RemoteSubSystem rss = new RemoteSubSystem(CLIENT_SPC, SSN, 0);
160		this.sccpStack.getSccpResource().addRemoteSpc(0, rspc);
161		this.sccpStack.getSccpResource().addRemoteSsn(0, rss);
162
163	}
164
165	private void initMAP() {
166		this.mapStack = new MAPStackImpl(this.sccpStack.getSccpProvider(), SSN);
167		this.mapProvider = this.mapStack.getMAPProvider();
168
169		this.mapProvider.addMAPDialogListener(this);
170		this.mapProvider.getMAPServiceSupplementary().addMAPServiceListener(this);
171
172		this.mapProvider.getMAPServiceSupplementary().acivate();
173
174		this.mapStack.start();
175	}
176
177	/*
178	 * (non-Javadoc)
179	 * 
180	 * @see
181	 * org.mobicents.protocols.ss7.map.api.MAPDialogListener#onDialogDelimiter
182	 * (org.mobicents.protocols.ss7.map.api.MAPDialog)
183	 */
184	@Override
185	public void onDialogDelimiter(MAPDialog mapDialog) {
186		if (logger.isDebugEnabled()) {
187			logger.debug(String.format("onDialogDelimiter for DialogId=%d", mapDialog.getDialogId()));
188		}
189	}
190
191	/*
192	 * (non-Javadoc)
193	 * 
194	 * @see
195	 * org.mobicents.protocols.ss7.map.api.MAPDialogListener#onDialogRequest
196	 * (org.mobicents.protocols.ss7.map.api.MAPDialog,
197	 * org.mobicents.protocols.ss7.map.api.primitives.AddressString,
198	 * org.mobicents.protocols.ss7.map.api.primitives.AddressString,
199	 * org.mobicents.protocols.ss7.map.api.primitives.MAPExtensionContainer)
200	 */
201	@Override
202	public void onDialogRequest(MAPDialog mapDialog, AddressString destReference, AddressString origReference, MAPExtensionContainer extensionContainer) {
203		if (logger.isDebugEnabled()) {
204			logger.debug(String.format("onDialogRequest for DialogId=%d DestinationReference=%s OriginReference=%s MAPExtensionContainer=%s",
205					mapDialog.getDialogId(), destReference, origReference, extensionContainer));
206		}
207	}
208
209	@Override
210	public void onDialogRequestEricsson(MAPDialog mapDialog, AddressString destReference, AddressString origReference, IMSI imsi, AddressString vlr) {
211		if (logger.isDebugEnabled()) {
212			logger.debug(String.format("onDialogRequest for DialogId=%d DestinationReference=%s OriginReference=%s ", mapDialog.getDialogId(), destReference,
213					origReference));
214		}
215	}
216
217	/*
218	 * (non-Javadoc)
219	 * 
220	 * @see
221	 * org.mobicents.protocols.ss7.map.api.MAPDialogListener#onDialogAccept(
222	 * org.mobicents.protocols.ss7.map.api.MAPDialog,
223	 * org.mobicents.protocols.ss7.map.api.primitives.MAPExtensionContainer)
224	 */
225	@Override
226	public void onDialogAccept(MAPDialog mapDialog, MAPExtensionContainer extensionContainer) {
227		if (logger.isDebugEnabled()) {
228			logger.debug(String.format("onDialogAccept for DialogId=%d MAPExtensionContainer=%s", mapDialog.getDialogId(), extensionContainer));
229		}
230	}
231
232	/*
233	 * (non-Javadoc)
234	 * 
235	 * @see
236	 * org.mobicents.protocols.ss7.map.api.MAPDialogListener#onDialogReject(
237	 * org.mobicents.protocols.ss7.map.api.MAPDialog,
238	 * org.mobicents.protocols.ss7.map.api.dialog.MAPRefuseReason,
239	 * org.mobicents.protocols.ss7.map.api.dialog.MAPProviderError,
240	 * org.mobicents.protocols.ss7.tcap.asn.ApplicationContextName,
241	 * org.mobicents.protocols.ss7.map.api.primitives.MAPExtensionContainer)
242	 */
243	@Override
244	public void onDialogReject(MAPDialog mapDialog, MAPRefuseReason refuseReason, MAPProviderError providerError,
245			ApplicationContextName alternativeApplicationContext, MAPExtensionContainer extensionContainer) {
246		logger.error(String.format("onDialogReject for DialogId=%d MAPRefuseReason=%s MAPProviderError=%s ApplicationContextName=%s MAPExtensionContainer=%s",
247				mapDialog.getDialogId(), refuseReason, providerError, alternativeApplicationContext, extensionContainer));
248	}
249
250	/*
251	 * (non-Javadoc)
252	 * 
253	 * @see
254	 * org.mobicents.protocols.ss7.map.api.MAPDialogListener#onDialogUserAbort
255	 * (org.mobicents.protocols.ss7.map.api.MAPDialog,
256	 * org.mobicents.protocols.ss7.map.api.dialog.MAPUserAbortChoice,
257	 * org.mobicents.protocols.ss7.map.api.primitives.MAPExtensionContainer)
258	 */
259	@Override
260	public void onDialogUserAbort(MAPDialog mapDialog, MAPUserAbortChoice userReason, MAPExtensionContainer extensionContainer) {
261		logger.error(String.format("onDialogUserAbort for DialogId=%d MAPUserAbortChoice=%s MAPExtensionContainer=%s", mapDialog.getDialogId(), userReason,
262				extensionContainer));
263	}
264
265	/*
266	 * (non-Javadoc)
267	 * 
268	 * @see
269	 * org.mobicents.protocols.ss7.map.api.MAPDialogListener#onDialogProviderAbort
270	 * (org.mobicents.protocols.ss7.map.api.MAPDialog,
271	 * org.mobicents.protocols.ss7.map.api.dialog.MAPAbortProviderReason,
272	 * org.mobicents.protocols.ss7.map.api.dialog.MAPAbortSource,
273	 * org.mobicents.protocols.ss7.map.api.primitives.MAPExtensionContainer)
274	 */
275	@Override
276	public void onDialogProviderAbort(MAPDialog mapDialog, MAPAbortProviderReason abortProviderReason, MAPAbortSource abortSource,
277			MAPExtensionContainer extensionContainer) {
278		logger.error(String.format("onDialogProviderAbort for DialogId=%d MAPAbortProviderReason=%s MAPAbortSource=%s MAPExtensionContainer=%s",
279				mapDialog.getDialogId(), abortProviderReason, abortSource, extensionContainer));
280	}
281
282	/*
283	 * (non-Javadoc)
284	 * 
285	 * @see
286	 * org.mobicents.protocols.ss7.map.api.MAPDialogListener#onDialogClose(org
287	 * .mobicents.protocols.ss7.map.api.MAPDialog)
288	 */
289	@Override
290	public void onDialogClose(MAPDialog mapDialog) {
291		if (logger.isDebugEnabled()) {
292			logger.debug(String.format("DialogClose for Dialog=%d", mapDialog.getDialogId()));
293		}
294	}
295
296	/*
297	 * (non-Javadoc)
298	 * 
299	 * @see
300	 * org.mobicents.protocols.ss7.map.api.MAPDialogListener#onDialogNotice(
301	 * org.mobicents.protocols.ss7.map.api.MAPDialog,
302	 * org.mobicents.protocols.ss7.map.api.dialog.MAPNoticeProblemDiagnostic)
303	 */
304	@Override
305	public void onDialogNotice(MAPDialog mapDialog, MAPNoticeProblemDiagnostic noticeProblemDiagnostic) {
306		logger.error(String.format("onDialogNotice for DialogId=%d MAPNoticeProblemDiagnostic=%s ", mapDialog.getDialogId(), noticeProblemDiagnostic));
307	}
308
309	/*
310	 * (non-Javadoc)
311	 * 
312	 * @see
313	 * org.mobicents.protocols.ss7.map.api.MAPDialogListener#onDialogResease
314	 * (org.mobicents.protocols.ss7.map.api.MAPDialog)
315	 */
316	@Override
317	public void onDialogResease(MAPDialog mapDialog) {
318		if (logger.isDebugEnabled()) {
319			logger.debug(String.format("onDialogResease for DialogId=%d", mapDialog.getDialogId()));
320		}
321	}
322
323	/*
324	 * (non-Javadoc)
325	 * 
326	 * @see
327	 * org.mobicents.protocols.ss7.map.api.MAPDialogListener#onDialogTimeout
328	 * (org.mobicents.protocols.ss7.map.api.MAPDialog)
329	 */
330	@Override
331	public void onDialogTimeout(MAPDialog mapDialog) {
332		logger.error(String.format("onDialogTimeout for DialogId=%d", mapDialog.getDialogId()));
333	}
334
335	/*
336	 * (non-Javadoc)
337	 * 
338	 * @see org.mobicents.protocols.ss7.map.api.service.supplementary.
339	 * MAPServiceSupplementaryListener
340	 * #onProcessUnstructuredSSRequestIndication(org
341	 * .mobicents.protocols.ss7.map.
342	 * api.service.supplementary.ProcessUnstructuredSSRequestIndication)
343	 */
344	@Override
345	public void onProcessUnstructuredSSRequestIndication(ProcessUnstructuredSSRequestIndication procUnstrReqInd) {
346		if (logger.isDebugEnabled()) {
347			logger.debug(String.format("onProcessUnstructuredSSRequestIndication for DialogId=%d", procUnstrReqInd.getMAPDialog().getDialogId()));
348		}
349		try {
350			long invokeId = procUnstrReqInd.getInvokeId();
351
352			USSDString ussdStrObj = this.mapProvider.getMAPParameterFactory().createUSSDString(
353					"USSD String : Hello World <CR> 1. Balance <CR> 2. Texts Remaining");
354			byte ussdDataCodingScheme = (byte) 0x0F;
355			MAPDialogSupplementary dialog = procUnstrReqInd.getMAPDialog();
356
357			dialog.setUserObject(invokeId);
358
359			ISDNAddressString msisdn = this.mapProvider.getMAPParameterFactory().createISDNAddressString(AddressNature.international_number,
360					NumberingPlan.ISDN, "31628838002");
361
362			dialog.addUnstructuredSSRequest(ussdDataCodingScheme, ussdStrObj, null, msisdn);
363			dialog.send();
364		} catch (MAPException e) {
365			logger.error("Error while sending UnstructuredSSRequest ", e);
366		}
367	}
368
369	/*
370	 * (non-Javadoc)
371	 * 
372	 * @see org.mobicents.protocols.ss7.map.api.service.supplementary.
373	 * MAPServiceSupplementaryListener
374	 * #onProcessUnstructuredSSResponseIndication(
375	 * org.mobicents.protocols.ss7.map
376	 * .api.service.supplementary.ProcessUnstructuredSSResponseIndication)
377	 */
378	@Override
379	public void onProcessUnstructuredSSResponseIndication(ProcessUnstructuredSSResponseIndication procUnstrResInd) {
380		// Server shouldn't be getting ProcessUnstructuredSSResponseIndication
381		logger.error(String.format("onProcessUnstructuredSSResponseIndication for Dialog=%d and invokeId=%d", procUnstrResInd.getMAPDialog().getDialogId(),
382				procUnstrResInd.getInvokeId()));
383	}
384
385	/*
386	 * (non-Javadoc)
387	 * 
388	 * @see org.mobicents.protocols.ss7.map.api.service.supplementary.
389	 * MAPServiceSupplementaryListener
390	 * #onUnstructuredSSRequestIndication(org.mobicents
391	 * .protocols.ss7.map.api.service
392	 * .supplementary.UnstructuredSSRequestIndication)
393	 */
394	@Override
395	public void onUnstructuredSSRequestIndication(UnstructuredSSRequestIndication unstrReqInd) {
396		// Server shouldn't be getting UnstructuredSSRequestIndication
397		logger.error(String.format("onUnstructuredSSRequestIndication for Dialog=%d and invokeId=%d", unstrReqInd.getMAPDialog().getDialogId(),
398				unstrReqInd.getInvokeId()));
399	}
400
401	/*
402	 * (non-Javadoc)
403	 * 
404	 * @see org.mobicents.protocols.ss7.map.api.service.supplementary.
405	 * MAPServiceSupplementaryListener
406	 * #onUnstructuredSSResponseIndication(org.mobicents
407	 * .protocols.ss7.map.api.service
408	 * .supplementary.UnstructuredSSResponseIndication)
409	 */
410	@Override
411	public void onUnstructuredSSResponseIndication(UnstructuredSSResponseIndication unstrResInd) {
412		if (logger.isDebugEnabled()) {
413			logger.debug(String.format("onUnstructuredSSResponseIndication for DialogId=%d", unstrResInd.getMAPDialog().getDialogId()));
414		}
415		try {
416			USSDString ussdStrObj = this.mapProvider.getMAPParameterFactory().createUSSDString("Your balance is 500");
417			byte ussdDataCodingScheme = (byte) 0x0F;
418			MAPDialogSupplementary dialog = unstrResInd.getMAPDialog();
419
420			AddressString msisdn = this.mapProvider.getMAPParameterFactory().createAddressString(AddressNature.international_number, NumberingPlan.ISDN,
421					"31628838002");
422
423			dialog.addProcessUnstructuredSSResponse(((Long) dialog.getUserObject()).longValue(), ussdDataCodingScheme, ussdStrObj);
424			dialog.close(false);
425		} catch (MAPException e) {
426			logger.error("Error while sending UnstructuredSSRequest ", e);
427		}
428	}
429
430	/*
431	 * (non-Javadoc)
432	 * 
433	 * @see org.mobicents.protocols.ss7.map.api.service.supplementary.
434	 * MAPServiceSupplementaryListener
435	 * #onUnstructuredSSNotifyRequestIndication(org
436	 * .mobicents.protocols.ss7.map.api
437	 * .service.supplementary.UnstructuredSSNotifyRequestIndication)
438	 */
439	@Override
440	public void onUnstructuredSSNotifyRequestIndication(UnstructuredSSNotifyRequestIndication unstrNotifyInd) {
441		// This error condition. Client should never receive the
442		// UnstructuredSSNotifyRequestIndication
443		logger.error(String.format("onUnstructuredSSNotifyRequestIndication for Dialog=%d and invokeId=%d", unstrNotifyInd.getMAPDialog().getDialogId(),
444				unstrNotifyInd.getInvokeId()));
445	}
446
447	public void onUnstructuredSSNotifyResponseIndication(UnstructuredSSNotifyResponseIndication unstrNotifyInd) {
448		// This error condition. Client should never receive the
449		// UnstructuredSSNotifyRequestIndication
450		logger.error(String.format("onUnstructuredSSNotifyResponseIndication for Dialog=%d and invokeId=%d", unstrNotifyInd.getMAPDialog().getDialogId(),
451				unstrNotifyInd.getInvokeId()));
452	}
453
454	/*
455	 * (non-Javadoc)
456	 * 
457	 * @see
458	 * org.mobicents.protocols.ss7.map.api.MAPServiceListener#onErrorComponent
459	 * (org.mobicents.protocols.ss7.map.api.MAPDialog, java.lang.Long,
460	 * org.mobicents.protocols.ss7.map.api.errors.MAPErrorMessage)
461	 */
462	@Override
463	public void onErrorComponent(MAPDialog mapDialog, Long invokeId, MAPErrorMessage mapErrorMessage) {
464		logger.error(String.format("onErrorComponent for Dialog=%d and invokeId=%d MAPErrorMessage=%s", mapDialog.getDialogId(), invokeId, mapErrorMessage));
465	}
466
467	/*
468	 * (non-Javadoc)
469	 * 
470	 * @see org.mobicents.protocols.ss7.map.api.MAPServiceListener#
471	 * onProviderErrorComponent(org.mobicents.protocols.ss7.map.api.MAPDialog,
472	 * java.lang.Long,
473	 * org.mobicents.protocols.ss7.map.api.dialog.MAPProviderError)
474	 */
475	@Override
476	public void onProviderErrorComponent(MAPDialog mapDialog, Long invokeId, MAPProviderError providerError) {
477		logger.error(String.format("onProviderErrorComponent for Dialog=%d and invokeId=%d MAPProviderError=%s", mapDialog.getDialogId(), invokeId,
478				providerError));
479	}
480
481	/*
482	 * (non-Javadoc)
483	 * 
484	 * @see
485	 * org.mobicents.protocols.ss7.map.api.MAPServiceListener#onRejectComponent
486	 * (org.mobicents.protocols.ss7.map.api.MAPDialog, java.lang.Long,
487	 * org.mobicents.protocols.ss7.tcap.asn.comp.Problem)
488	 */
489	@Override
490	public void onRejectComponent(MAPDialog mapDialog, Long invokeId, Problem problem) {
491		logger.error(String.format("onRejectComponent for Dialog=%d and invokeId=%d Problem=%s", mapDialog.getDialogId(), invokeId, problem));
492	}
493
494	/*
495	 * (non-Javadoc)
496	 * 
497	 * @see
498	 * org.mobicents.protocols.ss7.map.api.MAPServiceListener#onInvokeTimeout
499	 * (org.mobicents.protocols.ss7.map.api.MAPDialog, java.lang.Long)
500	 */
501	@Override
502	public void onInvokeTimeout(MAPDialog mapDialog, Long invokeId) {
503		logger.error(String.format("onInvokeTimeout for Dialog=%d and invokeId=%d", mapDialog.getDialogId(), invokeId));
504	}
505
506	public static void main(String args[]) {
507		final Server server = new Server();
508		try {
509			server.initializeStack();
510		} catch (Exception e) {
511			e.printStackTrace();
512		}
513	}
514
515}