<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    afunms

    My Software,My Dream—Forge a more perfect NMS product.

    PSAX Trap 翻譯(2)

     接著,用mibbleacmib中所有事件導(dǎo)入數(shù)據(jù)庫:
    /**
         * 導(dǎo)入事件
         
    */

        
    public void importEvent(){
            MibBrowser mb 
    = new
     MibBrowser();
            Mib mib 
    = mb.getMib("e:/ACMIB.mib"
    );
            List mvss 
    =
     (List)mib.getAllSymbols();
            Connection conn 
    =
     ConnectionManager.getConnection();
            
    int id = 1
    ;            
            
    try
    {
                Statement stat 
    =
     conn.createStatement();            
                
    for(int i=0,n=mvss.size();i<n;i++)

                    
    if(mvss.get(i) instanceof
     MibValueSymbol
                        
    && ((MibValueSymbol)mvss.get(i)).getType() instanceof SnmpNotificationType)    
    {
                        MibValueSymbol mvs 
    =
     (MibValueSymbol)mvss.get(i);
                        SnmpNotificationType snt 
    =
     (SnmpNotificationType)mvs.getType();
                        String descr 
    = null
    ;
                        String originDescr 
    = null
    ;
                        
    if(snt.getDescription().indexOf(":"> 0
    )
                            descr 
    = snt.getDescription().substring(snt.getDescription().indexOf(":"+ 2
    );    
                        
    else

                            descr 
    = snt.getDescription();
                        
    if(descr.indexOf("Return value"> 0
    )
                            descr 
    = descr.substring(0,descr.indexOf("Return value"
    ));    
                        
    if(descr.indexOf("Data send with the trap"> 0
    )
                            descr 
    = descr.substring(0,descr.indexOf("Data send with the trap"
    ));
                        descr 
    = descr.replaceAll("\n"" "
    );
                        descr 
    = descr.replaceAll("'""''"
    );
                        originDescr 
    = snt.getDescription().replaceAll("'""''"
    );
                        stat.addBatch(
    "insert into acmib_event(id,symbol,description,origin_description)values(" + id + ",'" + mvs.getName() + "','" + descr + "','" + originDescr + "')"
    );    
                        id
    ++
    ;      
                        
    if( id % 100 == 0
    )
                            stat.executeBatch();
                    }

                }

                stat.executeBatch();
            }
    catch(Exception e){
                e.printStackTrace();
            }

        }

    結(jié)果如下:
     

    posted on 2009-10-22 10:52 afunms 閱讀(102) 評論(0)  編輯  收藏


    只有注冊用戶登錄后才能發(fā)表評論。


    網(wǎng)站導(dǎo)航:
     

    My Links

    News

    留言簿(18)

    隨筆檔案

    相冊

    搜索

    最新評論

    閱讀排行榜

    主站蜘蛛池模板: 亚洲伊人色一综合网| 亚洲日韩在线中文字幕综合| 中文字幕免费在线看线人| jiz zz在亚洲| 久久精品国产亚洲7777| 99re6免费视频| 国产亚洲视频在线观看| 亚洲va在线va天堂va四虎| 国产无人区码卡二卡三卡免费 | 亚洲精品国产电影午夜| 真实乱视频国产免费观看| 在线免费观看h片| 亚洲AV日韩AV永久无码色欲| 亚洲国产精品无码专区| 国产成人综合久久精品免费| 四虎国产精品永久免费网址| 老司机午夜性生免费福利| 4480yy私人影院亚洲| 亚洲午夜AV无码专区在线播放 | 亚洲成人一区二区| 国产一卡二卡四卡免费| 国产一级在线免费观看| 亚洲乱妇老熟女爽到高潮的片| 亚洲AV无码一区二区乱孑伦AS | 亚洲人成电影亚洲人成9999网| 女性自慰aⅴ片高清免费| 暖暖在线视频免费视频| 特级aa**毛片免费观看| 亚洲色偷偷色噜噜狠狠99网| 一区二区三区亚洲| 国产av无码专区亚洲av果冻传媒| 免费无码黄网站在线观看| 国产精品永久免费10000| 日本免费久久久久久久网站| 免费夜色污私人影院网站| 亚洲欧美日韩中文字幕一区二区三区| 久久精品国产亚洲AV麻豆网站| 久久99亚洲综合精品首页 | 国产成人免费爽爽爽视频| 免费无码成人AV在线播放不卡| 韩国免费A级毛片久久|