Hi,

Your definitions seem ok, but what do you mean by "dynamic gateway"?

On Sep 14, 5:15 am, Sadegh gilani <[email protected]> wrote:
> is corrected my define for two gateway?
> how define dynamic gateway in program when using several port?
>
>                 inboundNotification = new InboundNotification();
>                 outboundNotification = new OutboundNotification();
>                 // Create the notification callback method for inbound voice 
> calls.
>                 callNotification = new CallNotification();
>                 //Create the notification callback method for gateway 
> statuses.
>                 statusNotification = new GatewayStatusNotification();
>                 System.out.println("Example: Read messages from a
> serial gsm modem.");
>                 System.out.println(Library.getLibraryDescription());
>                 System.out.println("Version: " + Library.getLibraryVersion());
>
>                 this.srv = new Service();
>                 try
>                 {
>                         gateway = new SerialModemGateway("Gate.COM1",
> "COM8", 9600, "Nokia", "");
>
>                         gateway.setProtocol(Protocols.PDU);
>                         gateway.setInbound(true);
>                         gateway.setOutbound(true);
>                         this.srv.setInboundNotification(inboundNotification);
>                         this.srv.setCallNotification(callNotification);
>                         
> this.srv.setGatewayStatusNotification(statusNotification);
>
>                         this.srv.addGateway(gateway);
>
>                         gateway1 = new SerialModemGateway("Gate.COM2",
> "COM6", 9600, "SonyErricsson", "K800");
>
>                         gateway1.setProtocol(Protocols.PDU);
>                         gateway1.setInbound(true);
>                         gateway1.setOutbound(true);
>                         this.srv.setInboundNotification(inboundNotification);
>                         this.srv.setCallNotification(callNotification);
>                         
> this.srv.setGatewayStatusNotification(statusNotification);
>
>                         this.srv.addGateway(gateway1);
>
>                         this.srv.startService();
>
>                 }
>                 catch (Exception e)
>                 {
>                         e.printStackTrace();
>                 }
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SMSLib for Java User Group" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/smslib?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to