本文整理匯總了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);
}
示例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");
}
示例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(".");
}
}