当前位置: 首页>>代码示例>>Java>>正文


Java JSMPPGateway类代码示例

本文整理汇总了Java中org.smslib.smpp.jsmpp.JSMPPGateway的典型用法代码示例。如果您正苦于以下问题:Java JSMPPGateway类的具体用法?Java JSMPPGateway怎么用?Java JSMPPGateway使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


JSMPPGateway类属于org.smslib.smpp.jsmpp包,在下文中一共展示了JSMPPGateway类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: doIt

import org.smslib.smpp.jsmpp.JSMPPGateway; //导入依赖的package包/类
public void doIt() throws Exception
{
	System.out.println("Example: Send/Receive message through SMPP using JSMPP.");
	System.out.println(Library.getLibraryDescription());
	System.out.println("Version: " + Library.getLibraryVersion());
	JSMPPGateway gateway = new JSMPPGateway("smppcon", "localhost", 2715, new BindAttributes("smppclient1", "password", "cp", BindType.TRANSCEIVER));
	Service.getInstance().addGateway(gateway);
	Service.getInstance().setInboundMessageNotification(new InboundNotification());
	Service.getInstance().setGatewayStatusNotification(new GatewayStatusNotification());
	Service.getInstance().setOutboundMessageNotification(new OutboundNotification());
	Service.getInstance().startService();
	// Send a message.
	OutboundMessage msg = new OutboundMessage("+967712831950", "Hello from SMSLib and JSMPP");
	// Request Delivery Report
	msg.setStatusReport(true);
	Service.getInstance().sendMessage(msg);
	System.out.println(msg);
	System.out.println("Now Sleeping - Hit <enter> to terminate.");
	System.in.read();
	Service.getInstance().stopService();
}
 
开发者ID:tdelenikas,项目名称:smslib-v3,代码行数:22,代码来源:SendReceiveMessage.java

示例2: doIt

import org.smslib.smpp.jsmpp.JSMPPGateway; //导入依赖的package包/类
public void doIt() throws Exception
{
	System.out.println("Example: Receive messages through SMPP using JSMPP.");
	System.out.println(Library.getLibraryDescription());
	System.out.println("Version: " + Library.getLibraryVersion());
	JSMPPGateway gateway = new JSMPPGateway("smppcon", "localhost", 2715, new BindAttributes("smppclient1", "password", "cp", BindType.RECEIVER));
	Service.getInstance().setInboundMessageNotification(new InboundNotification());
	Service.getInstance().addGateway(gateway);
	Service.getInstance().setGatewayStatusNotification(new GatewayStatusNotification());
	Service.getInstance().startService();
	System.out.println("Now Sleeping - Hit <enter> to terminate.");
	System.in.read();
	Service.getInstance().stopService();
}
 
开发者ID:tdelenikas,项目名称:smslib-v3,代码行数:15,代码来源:ReceiveMessage.java

示例3: createSMPPGatewayConfig

import org.smslib.smpp.jsmpp.JSMPPGateway; //导入依赖的package包/类
public AGateway createSMPPGatewayConfig( SMPPGatewayConfig config )
{
    AGateway gateway = new JSMPPGateway( config.getName(), config.getAddress(), config.getPort(),
        new BindAttributes( config.getUsername(), config.getPassword(), "cp", BindType.TRANSCEIVER ) );
    gateway.setInbound( true );
    gateway.setOutbound( true );
    return gateway;
}
 
开发者ID:ehatle,项目名称:AgileAlligators,代码行数:9,代码来源:GateWayFactory.java


注:本文中的org.smslib.smpp.jsmpp.JSMPPGateway类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。