當前位置: 首頁>>代碼示例>>Java>>正文


Java ClassNameMappingStrategy類代碼示例

本文整理匯總了Java中org.asteriskjava.fastagi.ClassNameMappingStrategy的典型用法代碼示例。如果您正苦於以下問題:Java ClassNameMappingStrategy類的具體用法?Java ClassNameMappingStrategy怎麽用?Java ClassNameMappingStrategy使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ClassNameMappingStrategy類屬於org.asteriskjava.fastagi包,在下文中一共展示了ClassNameMappingStrategy類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onInit

import org.asteriskjava.fastagi.ClassNameMappingStrategy; //導入依賴的package包/類
/** {@inheritDoc} */
@Override
protected void onInit() {
    int port = Integer.getInteger("org.opennms.netmgt.asterisk.agi.listenPort", m_port);
    int maxPoolSize = Integer.getInteger("org.opennms.netmgt.asterisk.agi.maxPoolSize", m_maxPoolSize);
    
    DefaultAgiServer agiServer = new DefaultAgiServer(new ClassNameMappingStrategy(false));
    
    agiServer.setPort(port);
    agiServer.setMaximumPoolSize(maxPoolSize);
    
    m_agiServerThread = new AgiServerThread(agiServer);
    
    // This is the default, but be explicit
    m_agiServerThread.setDaemon(true);
}
 
開發者ID:qoswork,項目名稱:opennmszh,代碼行數:17,代碼來源:AsteriskGateway.java

示例2: AgiServer

import org.asteriskjava.fastagi.ClassNameMappingStrategy; //導入依賴的package包/類
private AgiServer() {
	DefaultAgiServer server = new DefaultAgiServer();
	ClassNameMappingStrategy strategy = new ClassNameMappingStrategy();
	server.setMappingStrategy(strategy);
	AgiServerThread thread = new AgiServerThread(server);
	thread.startup();
	BrokerFactory.getLoggingBroker().logDebug("AGI Server started");
}
 
開發者ID:davidrudder23,項目名稱:OpenNotification,代碼行數:9,代碼來源:AgiServer.java

示例3: main

import org.asteriskjava.fastagi.ClassNameMappingStrategy; //導入依賴的package包/類
public static void main (String[] args) throws Exception {
	DefaultAgiServer server = new DefaultAgiServer();
	//server.setPort(5060);
	ClassNameMappingStrategy strategy = new ClassNameMappingStrategy();
	server.setMappingStrategy(strategy);
	AgiServerThread thread = new AgiServerThread(server);
	thread.startup();
	System.out.println ("Server started");
	
	
	// Do the outbound
	ManagerConnection con = new ManagerConnectionFactory("10.10.10.1", "reliable", "reliable").createManagerConnection();
	con.login();
	OriginateAction origAction = new OriginateAction();
	origAction.setChannel("SIP/[email protected]");
	origAction.setContext("outgoing");
	origAction.setExten("999");
	origAction.setPriority(new Integer(1));
	ManagerResponse origResponse = con.sendAction(origAction);
	if (origResponse.getResponse().toLowerCase().indexOf("error") >= 0) {
		System.out.println ("Error: "+origResponse.getMessage());
	}
	System.out.println ("Originate Response = "+origResponse);
	con.logoff();
	
	while (true) {
		Thread.sleep(100000);
		System.out.println(".");
	}
}
 
開發者ID:davidrudder23,項目名稱:OpenNotification,代碼行數:31,代碼來源:SimpleAsteriskTest.java


注:本文中的org.asteriskjava.fastagi.ClassNameMappingStrategy類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。