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


Java AspImpl類代碼示例

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


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

示例1: initM3UA

import org.mobicents.protocols.ss7.m3ua.impl.AspImpl; //導入依賴的package包/類
private void initM3UA() throws Exception {
    logger.debug("Initializing M3UA Stack ....");
    this.clientM3UAMgmt = new M3UAManagementProxyImpl("SctpClientM3UA");
    
    this.clientM3UAMgmt.setPersistDir(persistDir);
    
    this.clientM3UAMgmt.setTransportManagement(this.sctpManagement);
    this.clientM3UAMgmt.start();
    this.clientM3UAMgmt.removeAllResourses();

    // m3ua as create rc <rc> <ras-name>
    RoutingContext rc = factory.createRoutingContext(new long[]{100l});
    TrafficModeType trafficModeType = factory.createTrafficModeType(TrafficModeType.Loadshare);
    this.clientM3UAMgmt.createAs("AS1", Functionality.AS, ExchangeType.SE, IPSPType.CLIENT, rc, trafficModeType, 1, null);

    // Step 2 : Create ASP
    this.clientM3UAMgmt.createAspFactory("ASP1", CLIENT_ASSOCIATION_NAME);

    // Step3 : Assign ASP to AS
    AspImpl asp = this.clientM3UAMgmt.assignAspToAs("AS1", "ASP1");

    // Step 4: Add Route. Remote point code is 2
    clientM3UAMgmt.addRoute(SERVER_SPC, -1, -1, "AS1");
    logger.debug("Initialized M3UA Stack ....");

}
 
開發者ID:P1sec,項目名稱:SigFW,代碼行數:27,代碼來源:SS7Client.java

示例2: initM3UA

import org.mobicents.protocols.ss7.m3ua.impl.AspImpl; //導入依賴的package包/類
private void initM3UA() throws Exception {
    logger.debug("Initializing M3UA Stack ....");
    this.serverM3UAMgmt = new M3UAManagementProxyImpl("SctpServerM3UA");
    
    this.serverM3UAMgmt.setPersistDir(persistDir);
    
    this.serverM3UAMgmt.setTransportManagement(this.sctpManagement);
    
    this.serverM3UAMgmt.start();
    this.serverM3UAMgmt.removeAllResourses();

    // Step 1 : Create App Server
    RoutingContext rc = factory.createRoutingContext(new long[]{100l});
    TrafficModeType trafficModeType = factory.createTrafficModeType(TrafficModeType.Loadshare);
    this.serverM3UAMgmt.createAs("RAS1", Functionality.SGW, ExchangeType.SE, IPSPType.CLIENT, rc, trafficModeType, 1, null);

    // Step 2 : Create ASP
    this.serverM3UAMgmt.createAspFactory("RASP1", SERVER_ASSOCIATION_NAME);

    // Step3 : Assign ASP to AS
    AspImpl asp = this.serverM3UAMgmt.assignAspToAs("RAS1", "RASP1");

    // Step 4: Add Route. Remote point code is 1
    this.serverM3UAMgmt.addRoute(CLIENT_SPC, -1, -1, "RAS1"); 
    this.serverM3UAMgmt.addRoute(SERVER_SPC, -1, -1, "RAS1");   
    logger.debug("Initialized M3UA Stack ....");
}
 
開發者ID:P1sec,項目名稱:SigFW,代碼行數:28,代碼來源:SS7Honeypot.java

示例3: initM3UA

import org.mobicents.protocols.ss7.m3ua.impl.AspImpl; //導入依賴的package包/類
private void initM3UA() throws Exception {
    logger.debug("Initializing M3UA Stack ....");
    this.clientM3UAMgmt = new M3UAManagementProxyImpl("SctpClientLiveInputM3UA");
    
    this.clientM3UAMgmt.setPersistDir(persistDir);
    
    this.clientM3UAMgmt.setTransportManagement(this.sctpManagement);
    this.clientM3UAMgmt.start();
    this.clientM3UAMgmt.removeAllResourses();

    // m3ua as create rc <rc> <ras-name>
    RoutingContext rc = factory.createRoutingContext(new long[]{100l});
    TrafficModeType trafficModeType = factory.createTrafficModeType(TrafficModeType.Loadshare);
    this.clientM3UAMgmt.createAs("AS1", Functionality.AS, ExchangeType.SE, IPSPType.CLIENT, rc, trafficModeType, 1, null);

    // Step 2 : Create ASP
    this.clientM3UAMgmt.createAspFactory("ASP1", CLIENT_ASSOCIATION_NAME);

    // Step3 : Assign ASP to AS
    AspImpl asp = this.clientM3UAMgmt.assignAspToAs("AS1", "ASP1");

    // Step 4: Add Route. Remote point code is 2
    clientM3UAMgmt.addRoute(SERVER_SPC, -1, -1, "AS1");
    
    logger.debug("Initialized M3UA Stack ....");

}
 
開發者ID:P1sec,項目名稱:SigFW,代碼行數:28,代碼來源:SS7ClientLiveInput.java

示例4: getState

import org.mobicents.protocols.ss7.m3ua.impl.AspImpl; //導入依賴的package包/類
@Override
public String getState() {
    StringBuilder sb = new StringBuilder();
    sb.append("SCTP: ");
    sb.append(this.isSctpConnectionUp ? "Connected" : "Disconnected");
    if (this.assoc2 != null)
        sb.append(this.isSctpConnectionUp2 ? "/Connected" : "/Disconnected");
    sb.append("  M3UA:");

    this.m3uaMgmt.getAppServers();
    List<As> lstAs = this.m3uaMgmt.getAppServers();
    for (As as : lstAs) {
        if (as.getName().equals("testas")) {
            AsImpl asImpl = (AsImpl) as;
            FSM lFsm = asImpl.getLocalFSM();
            FSM pFsm = asImpl.getPeerFSM();
            FSM lFsmP = null;
            FSM pFsmP = null;

            List<Asp> lstAsp = as.getAspList();
            for (Asp asp : lstAsp) {
                // we take only the first ASP (it should be a single)
                AspImpl aspImpl = (AspImpl) asp;
                lFsmP = aspImpl.getLocalFSM();
                pFsmP = aspImpl.getPeerFSM();
                break;
            }

            if (lFsm != null) {
                sb.append(" lFsm:");
                sb.append(lFsm.getState().toString());
            }
            if (pFsm != null) {
                sb.append(" pFsm:");
                sb.append(pFsm.getState().toString());
            }
            if (lFsmP != null) {
                sb.append(" lFsmP:");
                sb.append(lFsmP.getState().toString());
            }
            if (pFsmP != null) {
                sb.append(" pFsmP:");
                sb.append(pFsmP.getState().toString());
            }

            break;
        }
    }

    return sb.toString();
}
 
開發者ID:RestComm,項目名稱:phone-simulator,代碼行數:52,代碼來源:M3uaMan.java


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