public static snmpalarm [ ] get ( nitro_service service , String trapname [ ] ) throws Exception { if ( trapname != null && trapname . length > 0 ) { snmpalarm response [ ] = new snmpalarm [ trapname . length ] ; snmpalarm obj [ ] = new snmpalarm [ trapname . length ] ; for ( int i = 0 ; i < trapname . length ; i ++ ) { obj [ i ] = new snmpalarm ( ) ; obj [ i ] . set_trapname ( trapname [ i ] ) ; response [ i ] = ( snmpalarm ) obj [ i ] . get_resource ( service ) ; } return response ; } return null ; }
Use this API to fetch snmpalarm resources of given names .