// Create parameters to associate to the entity to communicate
// with.
// When creating the parameter object, you can specify the read
// and write community to be used when querying the agent.
final SnmpParameters params =
new SnmpParameters();
// Set to the allowed the community string
params.setRdCommunity("NasuTekDS@NasuTekDS");
// The newly created parameter must be associated to the agent.
//
agent.setParams(params);