// Home | Go Back //
package agent.mib2;
import java.io.*;
import java.util.*;
import com.ireasoning.util.*;
import com.ireasoning.protocol.snmp.*;
import javax.management.*;
public class SnmpGroup extends SnmpBaseGroup implements SnmpGroupMBean
{
public SnmpGroup(OIDTreeNode root, String oid, Object [] args)
{
super(root, oid);
}
private AgentStats getAgentStats()
{
return Agent.getAgent().getAgentStats();
}
public synchronized SnmpCounter32 getSnmpInPkts()
{
return new SnmpCounter32(getAgentStats().getSnmpInPkts());
}
public synchronized void setSnmpInPkts(SnmpCounter32 newValue)
{
long l = ((SnmpCounter32) newValue).getValue();
getAgentStats().setSnmpInPkts(l);
}
public synchronized SnmpCounter32 getSnmpOutPkts()
{
return new SnmpCounter32(getAgentStats().getSnmpOutPkts());
}
public synchronized void setSnmpOutPkts(SnmpCounter32 newValue)
{
long l = ((SnmpCounter32)newValue).getValue();
getAgentStats().setSnmpOutPkts(l);
}
public synchronized SnmpCounter32 getSnmpInBadVersions()
{
return new SnmpCounter32(getAgentStats().getSnmpInBadVersions());
}
public synchronized void setSnmpInBadVersions(SnmpCounter32 newValue)
{
long l = ((SnmpCounter32)newValue).getValue();
getAgentStats().setSnmpInBadVersions(l);
}
public synchronized SnmpCounter32 getSnmpInBadCommunityNames()
{
return new SnmpCounter32(getAgentStats().getSnmpInBadCommunityNames());
}
public synchronized void setSnmpInBadCommunityNames(SnmpCounter32 newValue)
{
long l = ((SnmpCounter32)newValue).getValue();
getAgentStats().setSnmpInBadCommunityNames(l);
}
public synchronized SnmpCounter32 getSnmpInBadCommunityUses()
{
return new SnmpCounter32(getAgentStats().getSnmpInBadCommunityUses());
}
public synchronized void setSnmpInBadCommunityUses(SnmpCounter32 newValue)
{
long l = ((SnmpCounter32)newValue).getValue();
getAgentStats().setSnmpInBadCommunityUses(l);
}
public synchronized SnmpCounter32 getSnmpInASNParseErrs()
{
return new SnmpCounter32(getAgentStats().getSnmpInASNParseErrs ());
}
public synchronized void setSnmpInASNParseErrs(SnmpCounter32 newValue)
{
long l = ((SnmpCounter32)newValue).getValue();
getAgentStats().setSnmpInASNParseErrs(l);
}
public synchronized SnmpCounter32 getSnmpInTooBigs()
{
return new SnmpCounter32(getAgentStats().getSnmpInTooBigs ());
}
public synchronized void setSnmpInTooBigs(SnmpCounter32 newValue)
{
long l = ((SnmpCounter32)newValue).getValue();
getAgentStats().setSnmpInTooBigs(l);
}
public synchronized SnmpCounter32 getSnmpInNoSuchNames()
{
return new SnmpCounter32(getAgentStats().getSnmpInNoSuchNames ());
}
public synchronized void setSnmpInNoSuchNames(SnmpCounter32 newValue)
{
long l = ((SnmpCounter32)newValue).getValue();
getAgentStats().setSnmpInNoSuchNames(l);
}
public synchronized SnmpCounter32 getSnmpInBadValues()
{
return new SnmpCounter32(getAgentStats().getSnmpInBadValues ());
}
public synchronized void setSnmpInBadValues(SnmpCounter32 newValue)
{
long l = ((SnmpCounter32)newValue).getValue();
getAgentStats().setSnmpInBadValues(l);
}
public synchronized SnmpCounter32 getSnmpInReadOnlys()
{
return new SnmpCounter32(getAgentStats().getSnmpInReadOnlys ());
}
public synchronized void setSnmpInReadOnlys(SnmpCounter32 newValue)
{
long l = ((SnmpCounter32)newValue).getValue();
getAgentStats().setSnmpInReadOnlys(l);
}
public synchronized SnmpCounter32 getSnmpInGenErrs()
{
return new SnmpCounter32(getAgentStats().getSnmpInGenErrs ());
}
public synchronized void setSnmpInGenErrs(SnmpCounter32 newValue)
{
long l = ((SnmpCounter32)newValue).getValue();
getAgentStats().setSnmpInGenErrs(l);
}
public synchronized SnmpCounter32 getSnmpInTotalReqVars()
{
return new SnmpCounter32(getAgentStats().getSnmpInTotalReqVars ());
}
public synchronized void setSnmpInTotalReqVars(SnmpCounter32 newValue)
{
long l = ((SnmpCounter32)newValue).getValue();
getAgentStats().setSnmpInTotalReqVars(l);
}
public synchronized SnmpCounter32 getSnmpInTotalSetVars()
{
return new SnmpCounter32(getAgentStats().getSnmpInTotalSetVars ());
}
public synchronized void setSnmpInTotalSetVars(SnmpCounter32 newValue)
{
long l = ((SnmpCounter32)newValue).getValue();
getAgentStats().setSnmpInTotalSetVars(l);
}
public synchronized SnmpCounter32 getSnmpInGetRequests()
{
return new SnmpCounter32(getAgentStats().getSnmpInGetRequests ());
}
public synchronized void setSnmpInGetRequests(SnmpCounter32 newValue)
{
long l = ((SnmpCounter32)newValue).getValue();
getAgentStats().setSnmpInGetRequests(l);
}
public synchronized SnmpCounter32 getSnmpInGetNexts()
{
return new SnmpCounter32(getAgentStats().getSnmpInGetNexts ());
}
public synchronized void setSnmpInGetNexts(SnmpCounter32 newValue)
{
long l = ((SnmpCounter32)newValue).getValue();
getAgentStats().setSnmpInGetNexts(l);
}
public synchronized SnmpCounter32 getSnmpInSetRequests()
{
return new SnmpCounter32(getAgentStats().getSnmpInSetRequests ());
}
public synchronized void setSnmpInSetRequests(SnmpCounter32 newValue)
{
long l = ((SnmpCounter32)newValue).getValue();
getAgentStats().setSnmpInSetRequests(l);
}
public synchronized SnmpCounter32 getSnmpInGetResponses()
{
return new SnmpCounter32(getAgentStats().getSnmpInGetResponses ());
}
public synchronized void setSnmpInGetResponses(SnmpCounter32 newValue)
{
long l = ((SnmpCounter32)newValue).getValue();
getAgentStats().setSnmpInGetResponses(l);
}
public synchronized SnmpCounter32 getSnmpInTraps()
{
return new SnmpCounter32(getAgentStats().getSnmpInTraps ());
}
public synchronized void setSnmpInTraps(SnmpCounter32 newValue)
{
long l = ((SnmpCounter32)newValue).getValue();
getAgentStats().setSnmpInTraps(l);
}
public synchronized SnmpCounter32 getSnmpOutTooBigs()
{
return new SnmpCounter32(getAgentStats().getSnmpOutTooBigs ());
}
public synchronized void setSnmpOutTooBigs(SnmpCounter32 newValue)
{
long l = ((SnmpCounter32)newValue).getValue();
getAgentStats().setSnmpOutTooBigs(l);
}
public synchronized SnmpCounter32 getSnmpOutNoSuchNames()
{
return new SnmpCounter32(getAgentStats().getSnmpOutNoSuchNames ());
}
public synchronized void setSnmpOutNoSuchNames(SnmpCounter32 newValue)
{
long l = ((SnmpCounter32)newValue).getValue();
getAgentStats().setSnmpOutNoSuchNames(l);
}
public synchronized SnmpCounter32 getSnmpOutBadValues()
{
return new SnmpCounter32(getAgentStats().getSnmpOutBadValues ());
}
public synchronized void setSnmpOutBadValues(SnmpCounter32 newValue)
{
long l = ((SnmpCounter32)newValue).getValue();
getAgentStats().setSnmpOutBadValues(l);
}
public synchronized SnmpCounter32 getSnmpOutGenErrs()
{
return new SnmpCounter32(getAgentStats().getSnmpOutGenErrs ());
}
public synchronized void setSnmpOutGenErrs(SnmpCounter32 newValue)
{
long l = ((SnmpCounter32)newValue).getValue();
getAgentStats().setSnmpOutGenErrs(l);
}
public synchronized SnmpCounter32 getSnmpOutGetRequests()
{
return new SnmpCounter32(getAgentStats().getSnmpOutGetRequests ());
}
public synchronized void setSnmpOutGetRequests(SnmpCounter32 newValue)
{
long l = ((SnmpCounter32)newValue).getValue();
getAgentStats().setSnmpOutGetRequests(l);
}
public synchronized SnmpCounter32 getSnmpOutGetNexts()
{
return new SnmpCounter32(getAgentStats().getSnmpOutGetNexts ());
}
public synchronized void setSnmpOutGetNexts(SnmpCounter32 newValue)
{
long l = ((SnmpCounter32)newValue).getValue();
getAgentStats().setSnmpOutGetNexts(l);
}
public synchronized SnmpCounter32 getSnmpOutSetRequests()
{
return new SnmpCounter32(getAgentStats().getSnmpOutSetRequests ());
}
public synchronized void setSnmpOutSetRequests(SnmpCounter32 newValue)
{
long l = ((SnmpCounter32)newValue).getValue();
getAgentStats().setSnmpOutSetRequests(l);
}
public synchronized SnmpCounter32 getSnmpOutGetResponses()
{
return new SnmpCounter32(getAgentStats().getSnmpOutGetResponses ());
}
public synchronized void setSnmpOutGetResponses(SnmpCounter32 newValue)
{
long l = ((SnmpCounter32)newValue).getValue();
getAgentStats().setSnmpOutGetResponses(l);
}
public synchronized SnmpCounter32 getSnmpOutTraps()
{
return new SnmpCounter32(getAgentStats().getSnmpOutTraps ());
}
public synchronized void setSnmpOutTraps(SnmpCounter32 newValue)
{
long l = ((SnmpCounter32)newValue).getValue();
getAgentStats().setSnmpOutTraps(l);
}
public synchronized int getSnmpEnableAuthenTraps()
{
boolean b = getAgentStats().isSnmpEnableAuthenTraps ();
if(b) return 1;
else return 2;
}
public synchronized void setSnmpEnableAuthenTraps(int newValue)
{
if(newValue == 1)
{
getAgentStats().setSnmpEnableAuthenTraps(true);
}
else
{
getAgentStats().setSnmpEnableAuthenTraps(false);
}
}
}