|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.adventnet.snmp.snmp2.agent.Cache
com.adventnet.snmp.snmp2.agent.BaseSnmpStore
com.adventnet.snmp.snmp2.agent.BaseSnmpAgent
public class BaseSnmpAgent
This class handles all the SNMP requests by forwarding the requests to SnmpPduRequestListeners which is registered with the Agent
This class implements SnmpClient and adds itself as client to the SnmpSession.Hence if any pdu is received at the session,its clients authenticate is called.If the authenticate passes,then its SnmpClient callback method is called where the SnmpPDU is given for agents processing.
For sending back the response the send method in BaseSnmpAgent is called.
Both SnmpAgent and MicroSnmpAgent
extend this class.
SnmpAgent,
MicroSnmpAgent,
#SnmpSession, #SnmpAPI, #SnmpStore, #SnmpClient,
Serialized Form| Field Summary | |
|---|---|
BaseAclTable |
aclTable
The Authentication Control Table associated with this BaseSnmpAgent. |
protected ThreadScheduler |
AgentScheduler
|
protected SnmpAPI |
api
The API thread associated with the BaseSnmpAgent |
(package private) boolean |
asyncMode
|
(package private) AuthenticationListener |
authListener
|
(package private) boolean |
callbackThread
Used to facilitate CallBacks |
(package private) java.util.Vector |
communityVector
|
(package private) UpdateListener |
communityWriter
|
AgentSnmpDecoder |
decoder
|
static int |
ENABLE_SNMP_AUTHEN_TRAPS
Static field to enable the Authentication Failure Traps. |
(package private) int |
errstat
|
(package private) boolean |
isAuthTrapsDisabled
|
(package private) boolean |
isStartUpTrapDisabled
|
(package private) int |
outTraps
|
protected SnmpPduRequestListener |
pduRequestHdlr
listener for the pdu's we receive |
protected int |
port
|
(package private) SnmpPDU |
recdPdu
|
(package private) RegistrationListener |
registrationlistener
|
protected static java.util.Hashtable |
schedulerHash
|
(package private) SystemGroupInstrument |
sgl
|
protected Log |
snmpLog
|
protected java.lang.String |
snmpVersion
|
protected boolean |
started
|
long |
startTime
The starttime of the agent |
protected StatusListener |
statusListener
|
(package private) BaseSysORTableRequestHandler |
sysORTableListener
|
(package private) SystemGroupHandler |
systemGroupHandler
|
static int |
TRANSPORT_PROVIDER
Constant for using the transport provider framework |
BaseSnmpTrapService |
trapListener
The BaseSnmpTrapService associated with this BaseSnmpAgent. |
(package private) boolean |
trapSourceDefault
|
protected AgentUtil |
utilities
|
(package private) boolean |
v1v2AccessControl
|
protected int |
versionInInt
|
(package private) boolean |
viewBasedFlag
|
| Fields inherited from class com.adventnet.snmp.snmp2.agent.BaseSnmpStore |
|---|
debugLevel, localAddress, oldAddress, oldPort, protocol, session |
| Fields inherited from class com.adventnet.snmp.snmp2.agent.Cache |
|---|
cache, debug |
| Constructor Summary | |
|---|---|
BaseSnmpAgent()
Constructor which initialises the session parameters with default values of |
|
BaseSnmpAgent(int port)
One argument (port) Constructor which initialises the session parameters with default values of |
|
BaseSnmpAgent(java.lang.String ipAddress)
One Argument(ipAddress) Constructor which initialises the session parameters with default values of |
|
BaseSnmpAgent(java.lang.String ipAddress,
int port)
Two argument (ipAddress, port) Constructor which initialises the session parameters with default values of |
|
| Method Summary | |
|---|---|
void |
addAccessListener(AccessListener accessListener)
|
void |
addAuthenticationListener(AuthenticationListener authListener)
This method gets the reference of the SnmpGroup to the BaseSnmpAgent. |
protected boolean |
addClientAndOpenSession()
|
void |
addRegistrationListener(RegistrationListener listener)
This method registers the RegistrationListener with the BaseSnmpAgent. |
void |
addSnmpPduRequestListener(SnmpPduRequestListener p1)
adds a Listener to which the pdu is forwarded. |
void |
addSnmpSetGroupListener(SnmpSetRequestHandler snmpSetGroupListener)
The method to hook SnmpSetGroup listener for SNMP V2 compliance |
void |
addSysORTableListener(BaseSysORTableRequestHandler sysORTableHandler)
This method registers the BaseSysORTableRequestHandler with the BaseSnmpAgent. |
void |
addSystemGroupListener(SystemGroupInstrument sysgroupinstru)
This method registers the SystemGroupInstrument implemented by the user. |
void |
addTrapRequestListener(TrapRequestListener trapListener)
This method passes the reference of the BaseSnmpTrapService to the BaseSnmpAgent to send authentication traps under SnmpBasicNotifications Group. |
boolean |
authenticate(SnmpPDU pdu,
java.lang.String community)
This method is called before the callback and related processing methods are called has a simple checks based on the community of the pdu which has been received. |
protected boolean |
authenticateReceivedCommunity(SnmpPDU pdu,
java.lang.String community)
|
boolean |
callback(SnmpSession session,
SnmpPDU pdu,
int reqid)
The callback of SnmpClient interface for incoming PDUs which is implemented by this agent. |
(package private) boolean |
checkManagerAccess(java.lang.String community,
java.net.InetAddress pduAddress)
|
protected boolean |
checkVersion(SnmpPDU pdu)
|
ProtocolOptions |
createProtocolOptions(java.lang.String remoteHost,
int remotePort,
int localPort)
This method will be called when by the SnmpSession to get the ProtocolOptions for the transport provider. |
protected StatusEvent |
createStatusEvent(java.lang.String mes)
Deprecated. |
void |
debugPrint(java.lang.String s)
To print errors in Error Output stream for debug. |
protected void |
decodePdu(SnmpPDU pdu)
|
void |
disableAuthTraps(boolean disableAuthTraps)
Method to disable the Authentication Failure Traps Generation when this Agent receives a Request with an invalid community. |
void |
disableStartUpTrap(boolean disableStartUpTrap)
Method to disable the StartUp Trap Generation when this Agent Starts. |
void |
genPort()
ADDED TO SUPPORT LISTENING ON SPECIFIC ADDRS |
AccessListener |
getAccessListener()
|
boolean |
getAsyncMode()
Getter of the current process mode . |
java.util.Vector |
getCommunityVector()
Getter of the Community Vector |
int |
getDebugLevel()
Getter for LoggingLevel. |
(package private) java.util.Vector |
getInetAddresses(java.lang.String community,
java.net.InetAddress pduAddress)
|
java.lang.String |
getLocalAddress()
The localAddress on which the agent is running |
int |
getMaxThreads()
Getter of the max threads started for Asynchronous processing. |
(package private) java.lang.String[] |
getNoAccessCommunities()
gets the NoAccessCommunities for this agent. |
int |
getPort()
The port on which the agent is running |
java.lang.String[] |
getReadCommunities()
gets the ReadCommunities for this agent. |
java.lang.String |
getReadCommunity()
Getter for the ReadCommunity all the read Communities for this agent |
(package private) RegistrationListener |
getRegistrationListener()
|
java.lang.String |
getSerializeFileName()
Gets the name of the serialized file which the SnmpAgent uses to configure the V3 settings. |
SnmpGroup |
getSnmpGroup()
Getter for the SnmpGroup instance for this agent. |
SnmpVacm |
getSnmpVacm()
Gets the VACM information of the v3 snmp agent. |
java.lang.String |
getSnmpVersion()
The version on which the agent is running |
SystemGroupInstrument |
getSystemGroupListener()
Getter for the SystemGroupInstrument. |
long |
getUpTime()
gets the up time of the agent |
boolean |
getV1v2AccessControl()
Getter for the v1v2AccessControl boolean. |
java.util.Hashtable |
getV1v2AccessControlTable()
Getter for the v1v2AccessControl table. |
boolean |
getWindowsSubAgent()
Gets whether the agent is running as standalone agent or as a WindowsSubAgent. |
java.lang.String[] |
getWriteCommunities()
gets the WriteCommunities for this agent. |
java.lang.String |
getWriteCommunity()
Getter for writeCommunity |
(package private) java.lang.String[] |
handleGetCommunities(boolean flag)
|
(package private) java.lang.String[] |
handleGetCommunities(int access)
|
boolean |
handleInformRequest(SnmpSession session,
SnmpPDU pdu,
int reqid)
Handler of Inform-request PDU.API users may override this method if they have any particular implementation for inform-request messages.This method here will just print out the inform request message. |
(package private) void |
handleSetCommunity(java.lang.String community,
boolean flag,
java.lang.String[] coms)
|
void |
incrementSnmpOutTraps()
This method increments the snmpOutTraps counter whenever a trap is sent. |
boolean |
isCallbackThread()
getter for Callback Thread |
boolean |
isStarted()
Getter of the agent status. |
boolean |
isTrapSourceDefault()
Getter of the TrapSourceDefault flag. |
static void |
killSnmpAgent()
Method to kill this Agent. |
void |
removeAuthenticationListener()
Removes the reference of the SnmpGroup from the agent. |
void |
removeSnmpClient(SnmpClient client)
removes the SnmpClient. |
void |
removeSnmpPduRequestListener(SnmpPduRequestListener p1)
Removes the Listener registered for this uni-cast bean. |
void |
removeSysORTableListener()
Removes the BaseSysORTableRequestHandler from the agent. |
void |
restartSnmpAgent()
Restarts the receiver Thread for receiving requests |
boolean |
restartSnmpAgent(int agentPort)
Restarts the receiver Thread for receiving requests |
protected boolean |
scheduleAndProcessRequestEvent(java.lang.Object agent,
SnmpPDU pdu)
|
void |
send(SnmpPDU newPdu)
Sends the PDU out from the agent. |
void |
sendAuthenticationFailureTrap(java.util.Vector varbindVector,
boolean isBadCommunity)
This method is used to send AuthenticationFailureTraps from the SnmpAgent. |
void |
sendGenericTrap(int trapType,
java.util.Vector varbindVector)
Method to send generic traps. |
boolean |
setAgentScheduler(ThreadScheduler agent)
setter for ThreadScheduler , used for sceduling the threads. |
boolean |
setAsyncMode(boolean mode)
Allows agent to process the requests asynchronously. |
void |
setCallbackThread(boolean callbackThread)
setter for Callback Thread. |
void |
setCommunityVector(java.util.Vector communityVector)
Setter for the Communtity Vector |
void |
setDebugLevel(int debugLevel)
Setter for debugLevel. |
void |
setDefaultTrap(boolean isDefault)
This method switches the trapSource (DEFAULT/TFTABLE) ie, specifies whether the manager to which the trap to be sent must be taken from TFTABLE / DEFAULT. |
protected void |
setEnableAuthenTraps()
Method added to enable the Authentication Failure traps in the SnmpGroup. |
void |
setLocalAddress(java.lang.String localAddress)
The localAddress on which the agent is going to listen for requests on. |
boolean |
setMaxThreads(int noOfThreads)
Setter for the number of threads to be started for asynchronous processing . |
void |
setPort(int port)
The port on which the agent is going to run. |
void |
setPort(int port,
boolean restart)
The port on which the agent is going to run. |
void |
setProtocol(int protocol)
To set the protocol to be used by the session. |
void |
setReadCommunities(java.lang.String[] communities)
sets the ReadCommunities for this agent |
void |
setReadCommunity(java.lang.String community)
sets the ReadCommunity for this agent |
void |
setSerializeFileName(java.lang.String filename)
Sets the name of the serialized file which the SnmpAgent uses to configure the V3 settings. |
void |
setSnmpVersion(java.lang.String snmpVersion)
The version in which the agent is going to run. |
void |
setSnmpVersion(java.lang.String snmpVersion,
boolean restart)
The version in which the agent is going to run. |
void |
setStarted(boolean flag)
Setter of the agent status. |
void |
setV1v2AccessControl(boolean v1v2AccessControl)
Setter for the v1v2 View Based AccessControl boolean. |
void |
setV1v2AccessControlTable(java.util.Hashtable v1v2AccessControlTable)
Setter for the v1v2AccessControl table. |
void |
setWarmStart(boolean warmStart)
Hook method to send warmStart trap. |
void |
setWriteCommunities(java.lang.String[] communities)
set the WriteCommunities for this agent |
void |
setWriteCommunity(java.lang.String community)
set the WriteCommunity all the read Communities for this agent |
void |
stopSnmpAgent()
Stops the receiver Thread and closes the socket used by this agent. |
| Methods inherited from class com.adventnet.snmp.snmp2.agent.BaseSnmpStore |
|---|
closeAll, finalize, getSnmpAPI, getSnmpSession, getSnmpSession, initSession, initSnmpStore, isAlive, isDebug, setDebug |
| Methods inherited from class com.adventnet.snmp.snmp2.agent.Cache |
|---|
getFromCache, getMibOperations, putInCache, setMibOperations |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected transient SnmpAPI api
public AgentSnmpDecoder decoder
public static final int ENABLE_SNMP_AUTHEN_TRAPS
boolean isStartUpTrapDisabled
boolean isAuthTrapsDisabled
boolean asyncMode
protected ThreadScheduler AgentScheduler
protected static java.util.Hashtable schedulerHash
public long startTime
public BaseAclTable aclTable
protected Log snmpLog
int errstat
transient SnmpPDU recdPdu
protected int versionInInt
protected java.lang.String snmpVersion
boolean callbackThread
protected AgentUtil utilities
protected SnmpPduRequestListener pduRequestHdlr
protected boolean started
public static final int TRANSPORT_PROVIDER
protected int port
java.util.Vector communityVector
UpdateListener communityWriter
protected StatusListener statusListener
AuthenticationListener authListener
public BaseSnmpTrapService trapListener
boolean trapSourceDefault
SystemGroupHandler systemGroupHandler
RegistrationListener registrationlistener
SystemGroupInstrument sgl
BaseSysORTableRequestHandler sysORTableListener
int outTraps
boolean viewBasedFlag
boolean v1v2AccessControl
| Constructor Detail |
|---|
public BaseSnmpAgent()
Read/Write Community = "public"
It starts agent at a random port.
BaseSnmpAgent(String ipAddress, int port),
BaseSnmpAgent(String ipAddress),
BaseSnmpAgent(int port),
BaseSnmpStore()public BaseSnmpAgent(java.lang.String ipAddress)
Read/Write Community = "public"
It starts agent at a random port and a given ipAddress.
BaseSnmpAgent(),
BaseSnmpAgent(int port),
BaseSnmpAgent(String ipAddress, int port),
BaseSnmpStore(String ipAddress)public BaseSnmpAgent(int port)
Read/Write Community = "public"
It starts the agent at the specified port and address.
BaseSnmpAgent(),
BaseSnmpAgent(String ipAddress),
BaseSnmpAgent(String ipAddress, int port),
BaseSnmpStore(int port)
public BaseSnmpAgent(java.lang.String ipAddress,
int port)
Read/Write Community = "public"
It starts the agent at the specified port and address.
BaseSnmpAgent(),
BaseSnmpAgent(int port),
BaseSnmpAgent(String ipAddress),
BaseSnmpStore(String ipAddress, int port)| Method Detail |
|---|
public boolean setAsyncMode(boolean mode)
mode - process mode(true for asynchronous).
getAsyncMode()public boolean setMaxThreads(int noOfThreads)
int - The number of threads(0 to 20 ).
getMaxThreads()public int getMaxThreads()
setMaxThreads(int a)public boolean getAsyncMode()
setAsyncMode(boolean mode)public boolean setAgentScheduler(ThreadScheduler agent)
agent - The ThreadSchedulerpublic SnmpGroup getSnmpGroup()
This object gives the SnmpGroup counter values in RFC1213-MIB instrumented by this agent.
getSnmpGroup in interface PropertyRegistrationListenerSnmpGrouppublic long getUpTime()
getUpTime in interface PropertyRegistrationListenerpublic void setCallbackThread(boolean callbackThread)
When the callbackThread is set to false, the callback method is called in the context of the SnmpSession receiver thread. When callbackThread is set to true, the callback method is invoked in the context of a separate callback thread. API users can set the value of callbackThread based on whether they want callback's to be invoked from a seperate thread or from the SnmpSession receiver thread itself.
setCallbackThread in interface PropertyRegistrationListenercallbackThread - the value to set enable or false the Callback Thread.isCallbackThread(),
SnmpCallbackpublic boolean isCallbackThread()
isCallbackThread in interface PropertyRegistrationListener()public void setDebugLevel(int debugLevel)
Used to set the Logging level for agent with different levels defined in Logging.
debugLevel - the value of various Logging level's are.
getDebugLevel(),
com.adventnet.utilities.loggingpublic int getDebugLevel()
setDebugLevel(int debugLevel)public void debugPrint(java.lang.String s)
debugPrint in interface SnmpClients - the debug messageRegistrationListener getRegistrationListener()
public void send(SnmpPDU newPdu)
throws SnmpException
newPdu - the response PDU.
SnmpException - on send errors or if
the session is not alivepublic void removeSnmpClient(SnmpClient client)
class CollectorApp implements SnmpClient {
BaseSnmpAgent agent ;
// Rest of initialisation code ommitted for brevity
public boolean callback(SnmpSession session,SnmpPDU pdu, int reqid){
collectorProcessing ();
agent.callback(session,pdu,reqid);
}
}
public boolean handleInformRequest(SnmpSession session,
SnmpPDU pdu,
int reqid)
session - The session on which the agent is communicatingpdu - The received Inform Request SNMP PDUreqid - The request ID
public boolean callback(SnmpSession session,
SnmpPDU pdu,
int reqid)
When a pdu reached at the session for which this SnmpAgent is registered as SnmpClient, then the client(here BaseSnmpAgent) callback is called.
callback in interface SnmpClientsession - the session on which agent is communicating.pdu - the Snmp PDU.reqid - the value of reqid.
protected boolean scheduleAndProcessRequestEvent(java.lang.Object agent,
SnmpPDU pdu)
boolean checkManagerAccess(java.lang.String community,
java.net.InetAddress pduAddress)
java.util.Vector getInetAddresses(java.lang.String community,
java.net.InetAddress pduAddress)
protected void decodePdu(SnmpPDU pdu)
public boolean authenticate(SnmpPDU pdu,
java.lang.String community)
authenticate in interface SnmpClientpdu - the Snmp PDU.community - the value of the community.
SnmpClient
protected boolean authenticateReceivedCommunity(SnmpPDU pdu,
java.lang.String community)
protected boolean addClientAndOpenSession()
throws AgentRuntimeException
AgentRuntimeExceptionpublic boolean isStarted()
restartSnmpAgent(),
stopSnmpAgent(),
setStarted(boolean flag)public void setStarted(boolean flag)
flag - the value to set the agent status.restartSnmpAgent(),
stopSnmpAgent(),
isStarted()public void setProtocol(int protocol)
protocol - the protocol to be used for transport. To use the user specifed
transport layer this param value should be SnmpAgent.TRANSPORT_PROVIDER
public ProtocolOptions createProtocolOptions(java.lang.String remoteHost,
int remotePort,
int localPort)
createProtocolOptions in class BaseSnmpStoreremoteHost - the remoteHost name. For agent session this value will be null.
For BaseSnmpTrapService session, this has the manager's host name.remotePort - the remotePort value. For agent session this value will be 0.
For BaseSnmpTrapService session, this has the manager's port number.localPort - the port number of the session by which the agent will be started.
public boolean restartSnmpAgent(int agentPort)
throws AgentRuntimeException
agentPort - the port number on which the BaseSnmpAgent will run.
AgentRuntimeException - if the specified port is already in
use.BaseSnmpStore.isAlive(),
restartSnmpAgent()
public void restartSnmpAgent()
throws AgentRuntimeException
AgentRuntimeException - if the specified port is already in
use.public void stopSnmpAgent()
This thread doesn't kill all the threads and sessions.
BaseSnmpStorepublic void genPort()
public void setPort(int port)
throws AgentRuntimeException
port - the udp port number to whcih the SnmpSession is start.
AgentRuntimeException - if the specified port is already in
use.getPort()
public void setPort(int port,
boolean restart)
throws AgentRuntimeException
port - the udp port number to whcih the SnmpSession is start.restart - specifies whether the agent needs to be restarted
after setting the port.
AgentRuntimeException - if the specified port is already in
use.getPort(),
setPort(int port)public int getPort()
getPort in interface PropertyRegistrationListenersetPort(int port),
setPort(int port, boolean restart)
public void setLocalAddress(java.lang.String localAddress)
throws AgentRuntimeException
localAddress - the udp localAddress number to which the SnmpSession is started.
AgentRuntimeException - if the specified port is already in
use.getLocalAddress()public java.lang.String getLocalAddress()
getLocalAddress in interface PropertyRegistrationListenersetLocalAddress(String localAddress)public void setSnmpVersion(java.lang.String snmpVersion)
The values could be either v1,v2 or v2c restart the Agent to get this change into effect.
snmpVersion - the version number.getSnmpVersion(),
setSnmpVersion(String snmpVersion, boolean restart)
public void setSnmpVersion(java.lang.String snmpVersion,
boolean restart)
The values could be either v1,v2,v2c or v3. restart the Agent to get this change into effect.
snmpVersion - the version number.restart - specifies whether the agent needs to be restarted
after setting the version.getSnmpVersion(),
setSnmpVersion(String snmpVersion)protected StatusEvent createStatusEvent(java.lang.String mes)
public java.lang.String getSnmpVersion()
setSnmpVersion(String snmpVersion,boolean restart),
setSnmpVersion(String snmpVersion)protected boolean checkVersion(SnmpPDU pdu)
public java.util.Vector getCommunityVector()
setCommunityVector(Vector communityVector)public void setCommunityVector(java.util.Vector communityVector)
communityVector - The Community Vector of AclEntryInterface objects.getCommunityVector()public void setReadCommunity(java.lang.String community)
default value is "public"
community - The value for ReadCommunitygetReadCommunity()
void handleSetCommunity(java.lang.String community,
boolean flag,
java.lang.String[] coms)
throws AgentException
AgentExceptionpublic java.lang.String getReadCommunity()
setReadCommunity(String community)public void setReadCommunities(java.lang.String[] communities)
default value is an array of single read community "public"
community - the values for ReadCommunitiesgetReadCommunities()public java.lang.String[] getReadCommunities()
setWriteCommunities(String[] communities)java.lang.String[] handleGetCommunities(boolean flag)
java.lang.String[] handleGetCommunities(int access)
public void setWriteCommunity(java.lang.String community)
default value is "public"
writeCommunity - the value for WriteCommunitygetWriteCommunity()public java.lang.String getWriteCommunity()
setWriteCommunity(String community)public void setWriteCommunities(java.lang.String[] communities)
default value is an array of single write community "public"
community - the values for WriteCommunitiesgetWriteCommunities()public java.lang.String[] getWriteCommunities()
setWriteCommunities(String[] communities)java.lang.String[] getNoAccessCommunities()
public void addSnmpPduRequestListener(SnmpPduRequestListener p1)
throws RegistrationListenerException
RegistrationListenerException - if already there is a SnmpPduRequestListener
is registered.public void removeSnmpPduRequestListener(SnmpPduRequestListener p1)
p1 - The Snmp PDU listenerpublic void addAuthenticationListener(AuthenticationListener authListener)
authListener - instance of SnmpGroup.removeAuthenticationListener()public void removeAuthenticationListener()
addAuthenticationListener(AuthenticationListener authListener)public void setDefaultTrap(boolean isDefault)
value - The Default option flag, if true the Default option is
taken.isTrapSourceDefault()public boolean isTrapSourceDefault()
public void addTrapRequestListener(TrapRequestListener trapListener)
trapListener - The TrapRequestListenerpublic void addRegistrationListener(RegistrationListener listener)
listener - The Registration Listenerpublic void addSystemGroupListener(SystemGroupInstrument sysgroupinstru)
sysgroupinstru - The System Group InstrumentgetSystemGroupListener()public SystemGroupInstrument getSystemGroupListener()
addSystemGroupListener(SystemGroupInstrument sysgroupinstru)public void addSysORTableListener(BaseSysORTableRequestHandler sysORTableHandler)
BasesysORTableHandler - The SysORTable RequestHandlerremoveSysORTableListener()public void removeSysORTableListener()
addSysORTableListener(BaseSysORTableRequestHandler sysORTableHandler)
public void incrementSnmpOutTraps()
throws AgentSnmpException
AgentSnmpException - when the increment fails.
public void sendAuthenticationFailureTrap(java.util.Vector varbindVector,
boolean isBadCommunity)
varbindVector - Vector or trapVarbinds.isBadCommunity - true - if the agent has been configured for that community.
false - if there is no such Community in the agent.
public void sendGenericTrap(int trapType,
java.util.Vector varbindVector)
trapType - The generic TrapType.varbindVector - The Varbind of the Trap.sendAuthenticationFailureTrap(Vector varbindVector, boolean isBadCommunity)public void setWarmStart(boolean warmStart)
warmStart - The warmStart trap flag.public void addSnmpSetGroupListener(SnmpSetRequestHandler snmpSetGroupListener)
snmpSetGroupListener - The SnmpSetGroup Listenerpublic static void killSnmpAgent()
protected void setEnableAuthenTraps()
public void disableStartUpTrap(boolean disableStartUpTrap)
disableStartUpTrap - set this flag to true to disable the StartUp Trap generation.public void disableAuthTraps(boolean disableAuthTraps)
disableAuthTraps - set this flag to true to disable the StartUp Trap generation.public void addAccessListener(AccessListener accessListener)
public AccessListener getAccessListener()
public boolean getV1v2AccessControl()
setV1v2AccessControl(boolean v1v2AccessControl)public void setV1v2AccessControl(boolean v1v2AccessControl)
super.setV1v2AccessControl(true);
Hashtable table = new Hashtable();
table.put("public", new String[]{".1.3.6.1.2.1.1", ".1.3.6.1.4.1.2162.4"});
super.setV1v2AccessControlTable(table);
v1v2AccessControl - boolean spcifying the V1/V2 View Based Access ControlgetV1v2AccessControl()public java.util.Hashtable getV1v2AccessControlTable()
setV1v2AccessControlTable(Hashtable v1v2AccessControlTable)public void setV1v2AccessControlTable(java.util.Hashtable v1v2AccessControlTable)
v1v2AccessControlTable - Hashtable specifying the V1/V2 Access Control valuesgetV1v2AccessControlTable()public boolean getWindowsSubAgent()
PropertyRegistrationListener
getWindowsSubAgent in interface PropertyRegistrationListenerpublic java.lang.String getSerializeFileName()
PropertyRegistrationListener
getSerializeFileName in interface PropertyRegistrationListener
public void setSerializeFileName(java.lang.String filename)
throws SnmpException
PropertyRegistrationListener
setSerializeFileName in interface PropertyRegistrationListenerfilename - The file Name specification.
SnmpException - This Wraps all the Types of exception thrown
while processing this Request.public SnmpVacm getSnmpVacm()
PropertyRegistrationListener
getSnmpVacm in interface PropertyRegistrationListener
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||