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


Java BindType类代码示例

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


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

示例1: doIt

import org.smslib.smpp.BindAttributes.BindType; //导入依赖的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.BindAttributes.BindType; //导入依赖的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.BindAttributes.BindType; //导入依赖的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

示例4: getBindAttributes

import org.smslib.smpp.BindAttributes.BindType; //导入依赖的package包/类
private BindAttributes getBindAttributes()
{
	String systemId = getProperty("systemid");
	String password = getProperty("password");
	String systemType = getProperty("systemtype");
	BindType bindType = BindType.getByShortName(getProperty("bindtype"));
	String ton = getProperty("bindton");
	TypeOfNumber typeOfNumber = (ton == null) ? TypeOfNumber.UNKNOWN : TypeOfNumber.valueOf(Byte.parseByte(ton));
	String npi = getProperty("bindnpi");
	NumberingPlanIndicator numberingPlanIndicator = (npi == null) ? NumberingPlanIndicator.UNKNOWN : NumberingPlanIndicator.valueOf(Byte.parseByte(npi));
	return new BindAttributes(systemId, password, systemType, bindType, new Address(typeOfNumber, numberingPlanIndicator));
}
 
开发者ID:tdelenikas,项目名称:smslib-v3,代码行数:13,代码来源:SMPPGateway.java

示例5: getBindAttributes

import org.smslib.smpp.BindAttributes.BindType; //导入依赖的package包/类
private BindAttributes getBindAttributes(){
	String systemId=getProperty("systemid");
	String password=getProperty("password");
	String systemType=getProperty("systemtype");
	BindType bindType=BindType.getByShortName(getProperty("bindtype"));
	
	String ton=getProperty("bindton");
	TypeOfNumber typeOfNumber=(ton==null)?TypeOfNumber.UNKNOWN:TypeOfNumber.valueOf(Byte.parseByte(ton));
	
	String npi=getProperty("bindnpi");
	NumberingPlanIndicator numberingPlanIndicator=(npi==null)?NumberingPlanIndicator.UNKNOWN:NumberingPlanIndicator.valueOf(Byte.parseByte(ton));
	
	return new BindAttributes(systemId, password, systemType, bindType, new Address(typeOfNumber, numberingPlanIndicator));
}
 
开发者ID:pioryan,项目名称:smslib,代码行数:15,代码来源:SMPPGateway.java


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