| | |
| | | private SortedSet<String> trapsDestinations; |
| | | private String trapsCommunity; |
| | | |
| | | private SortedSet<String> communitiesList; |
| | | private String communities; |
| | | |
| | | |
| | | /** |
| | |
| | | */ |
| | | public SNMPInetAddressAcl(SNMPConnectionHandlerCfg configuration) { |
| | | super(); |
| | | // Get the current configuration |
| | | this.currentConfig = configuration; |
| | | |
| | | // hostsList |
| | |
| | | } |
| | | } |
| | | |
| | | // Get the list of trap destinations |
| | | this.trapsDestinations = this.currentConfig.getTrapsDestination(); |
| | | this.communitiesList = this.currentConfig.getCommunity(); |
| | | // Get the community string to accept |
| | | this.communities = this.currentConfig.getCommunity(); |
| | | // Get the community string to set in the traps |
| | | this.trapsCommunity = this.currentConfig.getTrapsCommunity(); |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean checkCommunity(String community) { |
| | | return this.communitiesList.contains(community); |
| | | return this.communities.equals(community); |
| | | } |
| | | |
| | | /** |