|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.adventnet.snmp.snmp2.agent.Cache
|
+--com.adventnet.snmp.snmp2.agent.BaseSnmpStore
|
+--com.adventnet.snmp.snmp2.agent.BaseSnmpAgent
|
+--com.adventnet.snmp.snmp2.agent.SnmpAgent
|
+--com.adventnet.snmp.beans.AccessControlSnmpAgent
AccessControlSnmpAgent uses Access Control List to control access This is a target component for SnmpPduRequestEvents and a listener for TrapRequestEvents
Parses a Access Control File and authenticates requests from managers on the basis of this
Uses the trap information in the access control files for triggerring traps to managers specified in the same file by using the SnmpTrapService component
Note all instances of SnmpAgent share the same session and hence only a single agent could be running in a JVM.
com.adventnet.snmp.snmp2.SnmpAgent,
com.adventnet.snmp.snmp2.SnmpTrapService, Serialized Form| Field Summary | |
(package private) java.lang.String |
aclFile
|
(package private) boolean |
aclFlag
|
(package private) ACLParser |
parser
|
(package private) java.util.Vector |
readCommunities
The community policies Vector of read AccessPolicy |
(package private) SnmpTrapService |
trapService
|
(package private) java.util.Vector |
trapVector
The Trap policies Vector of TrapPolicy |
(package private) java.util.Vector |
writeCommunities
The community policies Vector of read-write AccessPolicy |
| Fields inherited from class com.adventnet.snmp.snmp2.agent.SnmpAgent |
aclTable,
actionHandlerListener,
debug,
entry,
homeDirectory,
isRemoteConfigurable,
isV3Adaptor,
mibSupportForAdaptor,
remoteV3Client,
table,
v3AdaptorStorage,
v3Initialiser,
v3UserConfig,
viewBasedFlag,
windowsSubAgent |
| Fields inherited from class com.adventnet.snmp.snmp2.agent.BaseSnmpAgent |
aclTable,
AgentScheduler,
api,
asyncMode,
authListener,
callbackThread,
communityVector,
communityWriter,
decoder,
ENABLE_SNMP_AUTHEN_TRAPS,
errstat,
isAuthTrapsDisabled,
isStartUpTrapDisabled,
outTraps,
pduRequestHdlr,
port,
recdPdu,
registrationlistener,
schedulerHash,
sgl,
snmpLog,
snmpVersion,
started,
startTime,
statusListener,
sysORTableListener,
systemGroupHandler,
TRANSPORT_PROVIDER,
trapListener,
trapSourceDefault,
utilities,
v1v2AccessControl,
versionInInt,
viewBasedFlag |
| Fields inherited from class com.adventnet.snmp.snmp2.agent.BaseSnmpStore |
debugLevel,
localAddress,
oldAddress,
oldPort,
protocol,
session,
snmpLog |
| Fields inherited from class com.adventnet.snmp.snmp2.agent.Cache |
cache,
debug |
| Constructor Summary | |
AccessControlSnmpAgent()
The default no arg constructor |
|
AccessControlSnmpAgent(java.lang.String aclFile)
This constructor loads the specified acl file |
|
| Method Summary | |
void |
addTrapRequest(TrapRequestEvent te)
This is the listener method for TrapRequestEvents Source beans would call this method when they need to issue Traps |
boolean |
authenticate(SnmpPDU pdu,
java.lang.String community)
The authenticate implementation of SnmpClient interface If there are no AcessPolicies loaded calls the Supers authenticate |
protected boolean |
authenticate(SnmpPDU pdu,
java.util.Vector comm)
This method authenticates using Vector of AccessPolicy implementations |
java.lang.String |
getAclFile()
Getter for the acl File |
java.lang.String |
getEnterpriseOID()
Getter for enterpriseOID |
int |
getTrapIndex()
Getter for trapIndex |
SnmpTrapService |
getTrapService()
Getter for SnmpTrapService associated with this agent |
int |
getVersion()
Getter for the version of the Trap to be sent |
void |
sendTrap(TrapPolicy policy,
java.util.Vector varbinds,
long timeticks)
This uses the Trap Policy in the param to send a Trap |
boolean |
sendTrap(java.util.Vector varbinds,
long timeticks)
Use this method to send traps using details from ACL files |
void |
setAclFile(java.lang.String file)
set the acl file to the files existing |
void |
setEnterpriseOID(java.lang.String oid)
Setter for trapIndex |
void |
setTrapIndex(int trapIndex)
Setter for trapIndex |
void |
setVersion(int version)
Setter for the version of the Trap to be sent |
(package private) void |
updateParms(ACLParser parser)
|
| Methods inherited from class com.adventnet.snmp.snmp2.agent.BaseSnmpStore |
closeAll,
finalize,
getSnmpAPI,
getSnmpSession,
getSnmpSession,
initSession,
initSnmpStore,
isAlive,
isDebug |
| Methods inherited from class com.adventnet.snmp.snmp2.agent.Cache |
getFromCache,
getMibOperations,
putInCache,
setMibOperations |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
boolean aclFlag
SnmpTrapService trapService
java.lang.String aclFile
ACLParser parser
java.util.Vector readCommunities
java.util.Vector writeCommunities
java.util.Vector trapVector
| Constructor Detail |
public AccessControlSnmpAgent()
public AccessControlSnmpAgent(java.lang.String aclFile)
throws java.io.FileNotFoundException,
ParseException
| Method Detail |
public SnmpTrapService getTrapService()
public void setAclFile(java.lang.String file)
void updateParms(ACLParser parser)
public void setTrapIndex(int trapIndex)
public int getTrapIndex()
public void setEnterpriseOID(java.lang.String oid)
public java.lang.String getEnterpriseOID()
public void setVersion(int version)
public int getVersion()
public java.lang.String getAclFile()
public void addTrapRequest(TrapRequestEvent te)
te - The trap event.
public boolean sendTrap(java.util.Vector varbinds,
long timeticks)
varbinds - to be senttimeticks - value, setTrapIndex
public void sendTrap(TrapPolicy policy,
java.util.Vector varbinds,
long timeticks)
the - TrapPolicy which is used for verification and host detailsVector - of varbinds which need to be senttimeticks - or sysUpTime in millisecondsTrapPolicy
public boolean authenticate(SnmpPDU pdu,
java.lang.String community)
pdu - the Snmp PDU.community - the value of the community.SnmpClient
protected boolean authenticate(SnmpPDU pdu,
java.util.Vector comm)
the - Pdu ReceivedVector - of AccessPolicy to validate against
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||