Source Code Cross Referenced for IfMib.java in  » Net » snmp4j » org » snmp4j » agent » test » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Net » snmp4j » org.snmp4j.agent.test 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


0001:        /*_############################################################################
0002:          _## 
0003:          _##  SNMP4J-Agent - IfMib.java  
0004:          _## 
0005:          _##  Copyright (C) 2005-2007  Frank Fock (SNMP4J.org)
0006:          _##  
0007:          _##  Licensed under the Apache License, Version 2.0 (the "License");
0008:          _##  you may not use this file except in compliance with the License.
0009:          _##  You may obtain a copy of the License at
0010:          _##  
0011:          _##      http://www.apache.org/licenses/LICENSE-2.0
0012:          _##  
0013:          _##  Unless required by applicable law or agreed to in writing, software
0014:          _##  distributed under the License is distributed on an "AS IS" BASIS,
0015:          _##  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0016:          _##  See the License for the specific language governing permissions and
0017:          _##  limitations under the License.
0018:          _##  
0019:          _##########################################################################*/
0020:
0021:        package org.snmp4j.agent.test;
0022:
0023:        //--AgentGen BEGIN=_BEGIN
0024:        //--AgentGen END
0025:
0026:        import org.snmp4j.smi.*;
0027:        import org.snmp4j.mp.SnmpConstants;
0028:        import org.snmp4j.agent.*;
0029:        import org.snmp4j.agent.mo.*;
0030:        import org.snmp4j.agent.mo.ext.SimMOFactory;
0031:        import org.snmp4j.agent.mo.snmp.*;
0032:        import org.snmp4j.agent.mo.snmp.smi.*;
0033:        import org.snmp4j.agent.request.*;
0034:        import org.snmp4j.log.LogFactory;
0035:        import org.snmp4j.log.LogAdapter;
0036:
0037:        //--AgentGen BEGIN=_IMPORT
0038:        //--AgentGen END
0039:
0040:        public class IfMib
0041:        //--AgentGen BEGIN=_EXTENDS
0042:                //--AgentGen END
0043:                implements  MOGroup
0044:        //--AgentGen BEGIN=_IMPLEMENTS
0045:        //--AgentGen END
0046:        {
0047:
0048:            private static final LogAdapter LOGGER = LogFactory
0049:                    .getLogger(IfMib.class);
0050:
0051:            //--AgentGen BEGIN=_STATIC
0052:            //--AgentGen END
0053:
0054:            // Factory
0055:            private static MOFactory moFactory = SimMOFactory.getInstance();
0056:
0057:            // Constants
0058:            public static final OID oidIfNumber = new OID(new int[] { 1, 3, 6,
0059:                    1, 2, 1, 2, 1, 0 });
0060:            public static final OID oidIfTableLastChange = new OID(new int[] {
0061:                    1, 3, 6, 1, 2, 1, 31, 1, 5, 0 });
0062:            public static final OID oidIfStackLastChange = new OID(new int[] {
0063:                    1, 3, 6, 1, 2, 1, 31, 1, 6, 0 });
0064:            public static final OID oidLinkDown = new OID(new int[] { 1, 3, 6,
0065:                    1, 6, 3, 1, 1, 5, 3 });
0066:            public static final OID oidTrapVarIfIndex = new OID(new int[] { 1,
0067:                    3, 6, 1, 2, 1, 2, 2, 1, 1 });
0068:            public static final OID oidTrapVarIfAdminStatus = new OID(
0069:                    new int[] { 1, 3, 6, 1, 2, 1, 2, 2, 1, 7 });
0070:            public static final OID oidTrapVarIfOperStatus = new OID(new int[] {
0071:                    1, 3, 6, 1, 2, 1, 2, 2, 1, 8 });
0072:
0073:            public static final OID oidLinkUp = new OID(new int[] { 1, 3, 6, 1,
0074:                    6, 3, 1, 1, 5, 4 });
0075:
0076:            // Enumerations
0077:
0078:            public static final class IfAdminStatusEnum {
0079:                /* -- ready to pass packets */
0080:                public static final int up = 1;
0081:                public static final int down = 2;
0082:                /* -- in some test mode */
0083:                public static final int testing = 3;
0084:            }
0085:
0086:            public static final class IfLinkUpDownTrapEnableEnum {
0087:                public static final int enabled = 1;
0088:                public static final int disabled = 2;
0089:            }
0090:
0091:            public static final class IfPromiscuousModeEnum {
0092:                public static final int _true = 1;
0093:                public static final int _false = 2;
0094:            }
0095:
0096:            public static final class IfStackStatusEnum {
0097:                public static final int active = 1;
0098:                /* -- the following value is a state:
0099:                -- this value may be read, but not written */
0100:                public static final int notInService = 2;
0101:                /* -- the following three values are
0102:                -- actions: these values may be written,
0103:                --   but are never read */
0104:                public static final int notReady = 3;
0105:                public static final int createAndGo = 4;
0106:                public static final int createAndWait = 5;
0107:                public static final int destroy = 6;
0108:            }
0109:
0110:            public static final class IfTestStatusEnum {
0111:                public static final int notInUse = 1;
0112:                public static final int inUse = 2;
0113:            }
0114:
0115:            public static final class IfRcvAddressStatusEnum {
0116:                public static final int active = 1;
0117:                /* -- the following value is a state:
0118:                -- this value may be read, but not written */
0119:                public static final int notInService = 2;
0120:                /* -- the following three values are
0121:                -- actions: these values may be written,
0122:                --   but are never read */
0123:                public static final int notReady = 3;
0124:                public static final int createAndGo = 4;
0125:                public static final int createAndWait = 5;
0126:                public static final int destroy = 6;
0127:            }
0128:
0129:            public static final class IfRcvAddressTypeEnum {
0130:                public static final int other = 1;
0131:                public static final int _volatile = 2;
0132:                public static final int nonVolatile = 3;
0133:            }
0134:
0135:            // TextualConventions
0136:
0137:            // Scalars
0138:            private MOScalar ifNumber;
0139:            private MOScalar ifTableLastChange;
0140:            private MOScalar ifStackLastChange;
0141:
0142:            // Tables
0143:            public static final OID oidIfEntry = new OID(new int[] { 1, 3, 6,
0144:                    1, 2, 1, 2, 2, 1 });
0145:
0146:            // Column sub-identifer defintions for ifEntry:
0147:            public static final int colIfIndex = 1;
0148:            public static final int colIfDescr = 2;
0149:            public static final int colIfType = 3;
0150:            public static final int colIfMtu = 4;
0151:            public static final int colIfSpeed = 5;
0152:            public static final int colIfPhysAddress = 6;
0153:            public static final int colIfAdminStatus = 7;
0154:            public static final int colIfOperStatus = 8;
0155:            public static final int colIfLastChange = 9;
0156:            public static final int colIfInOctets = 10;
0157:            public static final int colIfInUcastPkts = 11;
0158:            public static final int colIfInNUcastPkts = 12;
0159:            public static final int colIfInDiscards = 13;
0160:            public static final int colIfInErrors = 14;
0161:            public static final int colIfInUnknownProtos = 15;
0162:            public static final int colIfOutOctets = 16;
0163:            public static final int colIfOutUcastPkts = 17;
0164:            public static final int colIfOutNUcastPkts = 18;
0165:            public static final int colIfOutDiscards = 19;
0166:            public static final int colIfOutErrors = 20;
0167:            public static final int colIfOutQLen = 21;
0168:            public static final int colIfSpecific = 22;
0169:
0170:            // Column index defintions for ifEntry:
0171:            public static final int idxIfIndex = 0;
0172:            public static final int idxIfDescr = 1;
0173:            public static final int idxIfType = 2;
0174:            public static final int idxIfMtu = 3;
0175:            public static final int idxIfSpeed = 4;
0176:            public static final int idxIfPhysAddress = 5;
0177:            public static final int idxIfAdminStatus = 6;
0178:            public static final int idxIfOperStatus = 7;
0179:            public static final int idxIfLastChange = 8;
0180:            public static final int idxIfInOctets = 9;
0181:            public static final int idxIfInUcastPkts = 10;
0182:            public static final int idxIfInNUcastPkts = 11;
0183:            public static final int idxIfInDiscards = 12;
0184:            public static final int idxIfInErrors = 13;
0185:            public static final int idxIfInUnknownProtos = 14;
0186:            public static final int idxIfOutOctets = 15;
0187:            public static final int idxIfOutUcastPkts = 16;
0188:            public static final int idxIfOutNUcastPkts = 17;
0189:            public static final int idxIfOutDiscards = 18;
0190:            public static final int idxIfOutErrors = 19;
0191:            public static final int idxIfOutQLen = 20;
0192:            public static final int idxIfSpecific = 21;
0193:
0194:            private static final MOTableSubIndex[] ifEntryIndexes = new MOTableSubIndex[] { moFactory
0195:                    .createSubIndex(SMIConstants.SYNTAX_INTEGER, 1, 1) };
0196:
0197:            private static final MOTableIndex ifEntryIndex = moFactory
0198:                    .createIndex(ifEntryIndexes, false);
0199:
0200:            private MOTable ifEntry;
0201:            private MOMutableTableModel ifEntryModel;
0202:            public static final OID oidIfXEntry = new OID(new int[] { 1, 3, 6,
0203:                    1, 2, 1, 31, 1, 1, 1 });
0204:
0205:            // Column sub-identifer defintions for ifXEntry:
0206:            public static final int colIfName = 1;
0207:            public static final int colIfInMulticastPkts = 2;
0208:            public static final int colIfInBroadcastPkts = 3;
0209:            public static final int colIfOutMulticastPkts = 4;
0210:            public static final int colIfOutBroadcastPkts = 5;
0211:            public static final int colIfHCInOctets = 6;
0212:            public static final int colIfHCInUcastPkts = 7;
0213:            public static final int colIfHCInMulticastPkts = 8;
0214:            public static final int colIfHCInBroadcastPkts = 9;
0215:            public static final int colIfHCOutOctets = 10;
0216:            public static final int colIfHCOutUcastPkts = 11;
0217:            public static final int colIfHCOutMulticastPkts = 12;
0218:            public static final int colIfHCOutBroadcastPkts = 13;
0219:            public static final int colIfLinkUpDownTrapEnable = 14;
0220:            public static final int colIfHighSpeed = 15;
0221:            public static final int colIfPromiscuousMode = 16;
0222:            public static final int colIfConnectorPresent = 17;
0223:            public static final int colIfAlias = 18;
0224:            public static final int colIfCounterDiscontinuityTime = 19;
0225:
0226:            // Column index defintions for ifXEntry:
0227:            public static final int idxIfName = 0;
0228:            public static final int idxIfInMulticastPkts = 1;
0229:            public static final int idxIfInBroadcastPkts = 2;
0230:            public static final int idxIfOutMulticastPkts = 3;
0231:            public static final int idxIfOutBroadcastPkts = 4;
0232:            public static final int idxIfHCInOctets = 5;
0233:            public static final int idxIfHCInUcastPkts = 6;
0234:            public static final int idxIfHCInMulticastPkts = 7;
0235:            public static final int idxIfHCInBroadcastPkts = 8;
0236:            public static final int idxIfHCOutOctets = 9;
0237:            public static final int idxIfHCOutUcastPkts = 10;
0238:            public static final int idxIfHCOutMulticastPkts = 11;
0239:            public static final int idxIfHCOutBroadcastPkts = 12;
0240:            public static final int idxIfLinkUpDownTrapEnable = 13;
0241:            public static final int idxIfHighSpeed = 14;
0242:            public static final int idxIfPromiscuousMode = 15;
0243:            public static final int idxIfConnectorPresent = 16;
0244:            public static final int idxIfAlias = 17;
0245:            public static final int idxIfCounterDiscontinuityTime = 18;
0246:
0247:            private static final MOTableSubIndex[] ifXEntryIndexes = new MOTableSubIndex[] { moFactory
0248:                    .createSubIndex(SMIConstants.SYNTAX_INTEGER, 1, 1) };
0249:
0250:            private static final MOTableIndex ifXEntryIndex = moFactory
0251:                    .createIndex(ifXEntryIndexes, false);
0252:
0253:            private MOTable ifXEntry;
0254:            private MOMutableTableModel ifXEntryModel;
0255:            public static final OID oidIfStackEntry = new OID(new int[] { 1, 3,
0256:                    6, 1, 2, 1, 31, 1, 2, 1 });
0257:
0258:            // Column sub-identifer defintions for ifStackEntry:
0259:            public static final int colIfStackStatus = 3;
0260:
0261:            // Column index defintions for ifStackEntry:
0262:            public static final int idxIfStackStatus = 0;
0263:
0264:            private static final MOTableSubIndex[] ifStackEntryIndexes = new MOTableSubIndex[] {
0265:                    moFactory.createSubIndex(SMIConstants.SYNTAX_INTEGER, 1, 1),
0266:                    moFactory.createSubIndex(SMIConstants.SYNTAX_INTEGER, 1, 1) };
0267:
0268:            private static final MOTableIndex ifStackEntryIndex = moFactory
0269:                    .createIndex(ifStackEntryIndexes, false);
0270:
0271:            private MOTable ifStackEntry;
0272:            private MOMutableTableModel ifStackEntryModel;
0273:            public static final OID oidIfTestEntry = new OID(new int[] { 1, 3,
0274:                    6, 1, 2, 1, 31, 1, 3, 1 });
0275:
0276:            // Column sub-identifer defintions for ifTestEntry:
0277:            public static final int colIfTestId = 1;
0278:            public static final int colIfTestStatus = 2;
0279:            public static final int colIfTestType = 3;
0280:            public static final int colIfTestResult = 4;
0281:            public static final int colIfTestCode = 5;
0282:            public static final int colIfTestOwner = 6;
0283:
0284:            // Column index defintions for ifTestEntry:
0285:            public static final int idxIfTestId = 0;
0286:            public static final int idxIfTestStatus = 1;
0287:            public static final int idxIfTestType = 2;
0288:            public static final int idxIfTestResult = 3;
0289:            public static final int idxIfTestCode = 4;
0290:            public static final int idxIfTestOwner = 5;
0291:
0292:            private static final MOTableSubIndex[] ifTestEntryIndexes = new MOTableSubIndex[] { moFactory
0293:                    .createSubIndex(SMIConstants.SYNTAX_INTEGER, 1, 1) };
0294:
0295:            private static final MOTableIndex ifTestEntryIndex = moFactory
0296:                    .createIndex(ifTestEntryIndexes, false);
0297:
0298:            private MOTable ifTestEntry;
0299:            private MOMutableTableModel ifTestEntryModel;
0300:            public static final OID oidIfRcvAddressEntry = new OID(new int[] {
0301:                    1, 3, 6, 1, 2, 1, 31, 1, 4, 1 });
0302:
0303:            // Column sub-identifer defintions for ifRcvAddressEntry:
0304:            public static final int colIfRcvAddressStatus = 2;
0305:            public static final int colIfRcvAddressType = 3;
0306:
0307:            // Column index defintions for ifRcvAddressEntry:
0308:            public static final int idxIfRcvAddressStatus = 0;
0309:            public static final int idxIfRcvAddressType = 1;
0310:
0311:            private static final MOTableSubIndex[] ifRcvAddressEntryIndexes = new MOTableSubIndex[] {
0312:                    moFactory.createSubIndex(SMIConstants.SYNTAX_INTEGER, 1, 1),
0313:                    moFactory.createSubIndex(SMIConstants.SYNTAX_OCTET_STRING,
0314:                            0, 128) };
0315:
0316:            private static final MOTableIndex ifRcvAddressEntryIndex = moFactory
0317:                    .createIndex(ifRcvAddressEntryIndexes, false);
0318:
0319:            private MOTable ifRcvAddressEntry;
0320:            private MOMutableTableModel ifRcvAddressEntryModel;
0321:
0322:            //--AgentGen BEGIN=_MEMBERS
0323:            //--AgentGen END
0324:
0325:            public IfMib() {
0326:                ifNumber = moFactory.createScalar(oidIfNumber, moFactory
0327:                        .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY),
0328:                        new Integer32());
0329:                ifTableLastChange = moFactory
0330:                        .createScalar(
0331:                                oidIfTableLastChange,
0332:                                moFactory
0333:                                        .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY),
0334:                                new TimeTicks());
0335:                ifStackLastChange = moFactory
0336:                        .createScalar(
0337:                                oidIfStackLastChange,
0338:                                moFactory
0339:                                        .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY),
0340:                                new TimeTicks());
0341:                createIfEntry();
0342:                createIfXEntry();
0343:                createIfStackEntry();
0344:                createIfTestEntry();
0345:                createIfRcvAddressEntry();
0346:                //--AgentGen BEGIN=_DEFAULTCONSTRUCTOR
0347:                //--AgentGen END
0348:            }
0349:
0350:            //--AgentGen BEGIN=_CONSTRUCTORS
0351:            //--AgentGen END
0352:
0353:            public MOTable getIfEntry() {
0354:                return ifEntry;
0355:            }
0356:
0357:            private void createIfEntry() {
0358:                MOColumn[] ifEntryColumns = new MOColumn[22];
0359:                ifEntryColumns[idxIfIndex] = moFactory
0360:                        .createColumn(
0361:                                colIfIndex,
0362:                                SMIConstants.SYNTAX_INTEGER32,
0363:                                moFactory
0364:                                        .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
0365:                ifEntryColumns[idxIfDescr] = moFactory
0366:                        .createColumn(
0367:                                colIfDescr,
0368:                                SMIConstants.SYNTAX_OCTET_STRING,
0369:                                moFactory
0370:                                        .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
0371:                ifEntryColumns[idxIfType] = moFactory
0372:                        .createColumn(
0373:                                colIfType,
0374:                                SMIConstants.SYNTAX_INTEGER,
0375:                                moFactory
0376:                                        .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
0377:                ifEntryColumns[idxIfMtu] = moFactory
0378:                        .createColumn(
0379:                                colIfMtu,
0380:                                SMIConstants.SYNTAX_INTEGER32,
0381:                                moFactory
0382:                                        .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
0383:                ifEntryColumns[idxIfSpeed] = moFactory
0384:                        .createColumn(
0385:                                colIfSpeed,
0386:                                SMIConstants.SYNTAX_GAUGE32,
0387:                                moFactory
0388:                                        .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
0389:                ifEntryColumns[idxIfPhysAddress] = moFactory
0390:                        .createColumn(
0391:                                colIfPhysAddress,
0392:                                SMIConstants.SYNTAX_OCTET_STRING,
0393:                                moFactory
0394:                                        .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
0395:                ifEntryColumns[idxIfAdminStatus] = new Enumerated(
0396:                        colIfAdminStatus,
0397:                        moFactory
0398:                                .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_WRITE),
0399:                        null);
0400:                ValueConstraint ifAdminStatusVC = new EnumerationConstraint(
0401:                        new int[] { IfAdminStatusEnum.up,
0402:                                IfAdminStatusEnum.down,
0403:                                IfAdminStatusEnum.testing });
0404:                ((MOMutableColumn) ifEntryColumns[idxIfAdminStatus])
0405:                        .addMOValueValidationListener(new ValueConstraintValidator(
0406:                                ifAdminStatusVC));
0407:                ifEntryColumns[idxIfOperStatus] = moFactory
0408:                        .createColumn(
0409:                                colIfOperStatus,
0410:                                SMIConstants.SYNTAX_INTEGER,
0411:                                moFactory
0412:                                        .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
0413:                ifEntryColumns[idxIfLastChange] = moFactory
0414:                        .createColumn(
0415:                                colIfLastChange,
0416:                                SMIConstants.SYNTAX_TIMETICKS,
0417:                                moFactory
0418:                                        .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
0419:                ifEntryColumns[idxIfInOctets] = moFactory
0420:                        .createColumn(
0421:                                colIfInOctets,
0422:                                SMIConstants.SYNTAX_COUNTER32,
0423:                                moFactory
0424:                                        .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
0425:                ifEntryColumns[idxIfInUcastPkts] = moFactory
0426:                        .createColumn(
0427:                                colIfInUcastPkts,
0428:                                SMIConstants.SYNTAX_COUNTER32,
0429:                                moFactory
0430:                                        .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
0431:                ifEntryColumns[idxIfInNUcastPkts] = moFactory
0432:                        .createColumn(
0433:                                colIfInNUcastPkts,
0434:                                SMIConstants.SYNTAX_COUNTER32,
0435:                                moFactory
0436:                                        .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
0437:                ifEntryColumns[idxIfInDiscards] = moFactory
0438:                        .createColumn(
0439:                                colIfInDiscards,
0440:                                SMIConstants.SYNTAX_COUNTER32,
0441:                                moFactory
0442:                                        .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
0443:                ifEntryColumns[idxIfInErrors] = moFactory
0444:                        .createColumn(
0445:                                colIfInErrors,
0446:                                SMIConstants.SYNTAX_COUNTER32,
0447:                                moFactory
0448:                                        .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
0449:                ifEntryColumns[idxIfInUnknownProtos] = moFactory
0450:                        .createColumn(
0451:                                colIfInUnknownProtos,
0452:                                SMIConstants.SYNTAX_COUNTER32,
0453:                                moFactory
0454:                                        .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
0455:                ifEntryColumns[idxIfOutOctets] = moFactory
0456:                        .createColumn(
0457:                                colIfOutOctets,
0458:                                SMIConstants.SYNTAX_COUNTER32,
0459:                                moFactory
0460:                                        .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
0461:                ifEntryColumns[idxIfOutUcastPkts] = moFactory
0462:                        .createColumn(
0463:                                colIfOutUcastPkts,
0464:                                SMIConstants.SYNTAX_COUNTER32,
0465:                                moFactory
0466:                                        .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
0467:                ifEntryColumns[idxIfOutNUcastPkts] = moFactory
0468:                        .createColumn(
0469:                                colIfOutNUcastPkts,
0470:                                SMIConstants.SYNTAX_COUNTER32,
0471:                                moFactory
0472:                                        .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
0473:                ifEntryColumns[idxIfOutDiscards] = moFactory
0474:                        .createColumn(
0475:                                colIfOutDiscards,
0476:                                SMIConstants.SYNTAX_COUNTER32,
0477:                                moFactory
0478:                                        .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
0479:                ifEntryColumns[idxIfOutErrors] = moFactory
0480:                        .createColumn(
0481:                                colIfOutErrors,
0482:                                SMIConstants.SYNTAX_COUNTER32,
0483:                                moFactory
0484:                                        .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
0485:                ifEntryColumns[idxIfOutQLen] = moFactory
0486:                        .createColumn(
0487:                                colIfOutQLen,
0488:                                SMIConstants.SYNTAX_GAUGE32,
0489:                                moFactory
0490:                                        .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
0491:                ifEntryColumns[idxIfSpecific] = moFactory
0492:                        .createColumn(
0493:                                colIfSpecific,
0494:                                SMIConstants.SYNTAX_OBJECT_IDENTIFIER,
0495:                                moFactory
0496:                                        .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
0497:
0498:                ifEntryModel = new DefaultMOMutableTableModel();
0499:                ifEntryModel.setRowFactory(new IfEntryRowFactory());
0500:                ifEntry = moFactory.createTable(oidIfEntry, ifEntryIndex,
0501:                        ifEntryColumns, ifEntryModel);
0502:            }
0503:
0504:            public MOTable getIfXEntry() {
0505:                return ifXEntry;
0506:            }
0507:
0508:            private void createIfXEntry() {
0509:                MOColumn[] ifXEntryColumns = new MOColumn[19];
0510:                ifXEntryColumns[idxIfName] = moFactory
0511:                        .createColumn(
0512:                                colIfName,
0513:                                SMIConstants.SYNTAX_OCTET_STRING,
0514:                                moFactory
0515:                                        .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
0516:                ifXEntryColumns[idxIfInMulticastPkts] = moFactory
0517:                        .createColumn(
0518:                                colIfInMulticastPkts,
0519:                                SMIConstants.SYNTAX_COUNTER32,
0520:                                moFactory
0521:                                        .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
0522:                ifXEntryColumns[idxIfInBroadcastPkts] = moFactory
0523:                        .createColumn(
0524:                                colIfInBroadcastPkts,
0525:                                SMIConstants.SYNTAX_COUNTER32,
0526:                                moFactory
0527:                                        .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
0528:                ifXEntryColumns[idxIfOutMulticastPkts] = moFactory
0529:                        .createColumn(
0530:                                colIfOutMulticastPkts,
0531:                                SMIConstants.SYNTAX_COUNTER32,
0532:                                moFactory
0533:                                        .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
0534:                ifXEntryColumns[idxIfOutBroadcastPkts] = moFactory
0535:                        .createColumn(
0536:                                colIfOutBroadcastPkts,
0537:                                SMIConstants.SYNTAX_COUNTER32,
0538:                                moFactory
0539:                                        .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
0540:                ifXEntryColumns[idxIfHCInOctets] = moFactory
0541:                        .createColumn(
0542:                                colIfHCInOctets,
0543:                                SMIConstants.SYNTAX_COUNTER64,
0544:                                moFactory
0545:                                        .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
0546:                ifXEntryColumns[idxIfHCInUcastPkts] = moFactory
0547:                        .createColumn(
0548:                                colIfHCInUcastPkts,
0549:                                SMIConstants.SYNTAX_COUNTER64,
0550:                                moFactory
0551:                                        .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
0552:                ifXEntryColumns[idxIfHCInMulticastPkts] = moFactory
0553:                        .createColumn(
0554:                                colIfHCInMulticastPkts,
0555:                                SMIConstants.SYNTAX_COUNTER64,
0556:                                moFactory
0557:                                        .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
0558:                ifXEntryColumns[idxIfHCInBroadcastPkts] = moFactory
0559:                        .createColumn(
0560:                                colIfHCInBroadcastPkts,
0561:                                SMIConstants.SYNTAX_COUNTER64,
0562:                                moFactory
0563:                                        .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
0564:                ifXEntryColumns[idxIfHCOutOctets] = moFactory
0565:                        .createColumn(
0566:                                colIfHCOutOctets,
0567:                                SMIConstants.SYNTAX_COUNTER64,
0568:                                moFactory
0569:                                        .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
0570:                ifXEntryColumns[idxIfHCOutUcastPkts] = moFactory
0571:                        .createColumn(
0572:                                colIfHCOutUcastPkts,
0573:                                SMIConstants.SYNTAX_COUNTER64,
0574:                                moFactory
0575:                                        .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
0576:                ifXEntryColumns[idxIfHCOutMulticastPkts] = moFactory
0577:                        .createColumn(
0578:                                colIfHCOutMulticastPkts,
0579:                                SMIConstants.SYNTAX_COUNTER64,
0580:                                moFactory
0581:                                        .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
0582:                ifXEntryColumns[idxIfHCOutBroadcastPkts] = moFactory
0583:                        .createColumn(
0584:                                colIfHCOutBroadcastPkts,
0585:                                SMIConstants.SYNTAX_COUNTER64,
0586:                                moFactory
0587:                                        .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
0588:                ifXEntryColumns[idxIfLinkUpDownTrapEnable] = new Enumerated(
0589:                        colIfLinkUpDownTrapEnable,
0590:                        moFactory
0591:                                .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_WRITE),
0592:                        null);
0593:                ValueConstraint ifLinkUpDownTrapEnableVC = new EnumerationConstraint(
0594:                        new int[] { IfLinkUpDownTrapEnableEnum.enabled,
0595:                                IfLinkUpDownTrapEnableEnum.disabled });
0596:                ((MOMutableColumn) ifXEntryColumns[idxIfLinkUpDownTrapEnable])
0597:                        .addMOValueValidationListener(new ValueConstraintValidator(
0598:                                ifLinkUpDownTrapEnableVC));
0599:                ifXEntryColumns[idxIfHighSpeed] = moFactory
0600:                        .createColumn(
0601:                                colIfHighSpeed,
0602:                                SMIConstants.SYNTAX_GAUGE32,
0603:                                moFactory
0604:                                        .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
0605:                ifXEntryColumns[idxIfPromiscuousMode] = new MOMutableColumn(
0606:                        colIfPromiscuousMode,
0607:                        SMIConstants.SYNTAX_INTEGER,
0608:                        moFactory
0609:                                .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_WRITE),
0610:                        null);
0611:                ValueConstraint ifPromiscuousModeVC = new EnumerationConstraint(
0612:                        new int[] { IfPromiscuousModeEnum._true,
0613:                                IfPromiscuousModeEnum._false });
0614:                ((MOMutableColumn) ifXEntryColumns[idxIfPromiscuousMode])
0615:                        .addMOValueValidationListener(new ValueConstraintValidator(
0616:                                ifPromiscuousModeVC));
0617:                ifXEntryColumns[idxIfConnectorPresent] = moFactory
0618:                        .createColumn(
0619:                                colIfConnectorPresent,
0620:                                SMIConstants.SYNTAX_INTEGER,
0621:                                moFactory
0622:                                        .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
0623:                ifXEntryColumns[idxIfAlias] = new DisplayString(
0624:                        colIfAlias,
0625:                        moFactory
0626:                                .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_WRITE),
0627:                        null);
0628:                ValueConstraint ifAliasVC = new ConstraintsImpl();
0629:                ((ConstraintsImpl) ifAliasVC).add(new Constraint(0, 64));
0630:                ((MOMutableColumn) ifXEntryColumns[idxIfAlias])
0631:                        .addMOValueValidationListener(new ValueConstraintValidator(
0632:                                ifAliasVC));
0633:                ifXEntryColumns[idxIfCounterDiscontinuityTime] = moFactory
0634:                        .createColumn(
0635:                                colIfCounterDiscontinuityTime,
0636:                                SMIConstants.SYNTAX_TIMETICKS,
0637:                                moFactory
0638:                                        .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
0639:
0640:                ifXEntryModel = new DefaultMOMutableTableModel();
0641:                ifXEntryModel.setRowFactory(new IfXEntryRowFactory());
0642:                ifXEntry = moFactory.createTable(oidIfXEntry, ifXEntryIndex,
0643:                        ifXEntryColumns, ifXEntryModel);
0644:            }
0645:
0646:            public MOTable getIfStackEntry() {
0647:                return ifStackEntry;
0648:            }
0649:
0650:            private void createIfStackEntry() {
0651:                MOColumn[] ifStackEntryColumns = new MOColumn[1];
0652:                ifStackEntryColumns[idxIfStackStatus] = new RowStatus(
0653:                        colIfStackStatus);
0654:                ValueConstraint ifStackStatusVC = new EnumerationConstraint(
0655:                        new int[] { IfStackStatusEnum.active,
0656:                                IfStackStatusEnum.notInService,
0657:                                IfStackStatusEnum.notReady,
0658:                                IfStackStatusEnum.createAndGo,
0659:                                IfStackStatusEnum.createAndWait,
0660:                                IfStackStatusEnum.destroy });
0661:                ((MOMutableColumn) ifStackEntryColumns[idxIfStackStatus])
0662:                        .addMOValueValidationListener(new ValueConstraintValidator(
0663:                                ifStackStatusVC));
0664:
0665:                ifStackEntryModel = new DefaultMOMutableTableModel();
0666:                ifStackEntryModel.setRowFactory(new IfStackEntryRowFactory());
0667:                ifStackEntry = moFactory.createTable(oidIfStackEntry,
0668:                        ifStackEntryIndex, ifStackEntryColumns,
0669:                        ifStackEntryModel);
0670:            }
0671:
0672:            public MOTable getIfTestEntry() {
0673:                return ifTestEntry;
0674:            }
0675:
0676:            private void createIfTestEntry() {
0677:                MOColumn[] ifTestEntryColumns = new MOColumn[6];
0678:                ifTestEntryColumns[idxIfTestId] = new MOMutableColumn(
0679:                        colIfTestId,
0680:                        SMIConstants.SYNTAX_INTEGER,
0681:                        moFactory
0682:                                .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_WRITE),
0683:                        null);
0684:                ValueConstraint ifTestIdVC = new ConstraintsImpl();
0685:                ((ConstraintsImpl) ifTestIdVC)
0686:                        .add(new Constraint(0, 2147483647));
0687:                ((MOMutableColumn) ifTestEntryColumns[idxIfTestId])
0688:                        .addMOValueValidationListener(new ValueConstraintValidator(
0689:                                ifTestIdVC));
0690:                ifTestEntryColumns[idxIfTestStatus] = new Enumerated(
0691:                        colIfTestStatus,
0692:                        moFactory
0693:                                .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_WRITE),
0694:                        null);
0695:                ValueConstraint ifTestStatusVC = new EnumerationConstraint(
0696:                        new int[] { IfTestStatusEnum.notInUse,
0697:                                IfTestStatusEnum.inUse });
0698:                ((MOMutableColumn) ifTestEntryColumns[idxIfTestStatus])
0699:                        .addMOValueValidationListener(new ValueConstraintValidator(
0700:                                ifTestStatusVC));
0701:                ifTestEntryColumns[idxIfTestType] = new MOMutableColumn(
0702:                        colIfTestType,
0703:                        SMIConstants.SYNTAX_OBJECT_IDENTIFIER,
0704:                        moFactory
0705:                                .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_WRITE),
0706:                        null);
0707:                ifTestEntryColumns[idxIfTestResult] = moFactory
0708:                        .createColumn(
0709:                                colIfTestResult,
0710:                                SMIConstants.SYNTAX_INTEGER,
0711:                                moFactory
0712:                                        .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
0713:                ifTestEntryColumns[idxIfTestCode] = moFactory
0714:                        .createColumn(
0715:                                colIfTestCode,
0716:                                SMIConstants.SYNTAX_OBJECT_IDENTIFIER,
0717:                                moFactory
0718:                                        .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
0719:                ifTestEntryColumns[idxIfTestOwner] = new MOMutableColumn(
0720:                        colIfTestOwner,
0721:                        SMIConstants.SYNTAX_OCTET_STRING,
0722:                        moFactory
0723:                                .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_WRITE),
0724:                        null);
0725:                ValueConstraint ifTestOwnerVC = new ConstraintsImpl();
0726:                ((ConstraintsImpl) ifTestOwnerVC).add(new Constraint(0, 255));
0727:                ((MOMutableColumn) ifTestEntryColumns[idxIfTestOwner])
0728:                        .addMOValueValidationListener(new ValueConstraintValidator(
0729:                                ifTestOwnerVC));
0730:
0731:                ifTestEntryModel = new DefaultMOMutableTableModel();
0732:                ifTestEntryModel.setRowFactory(new IfTestEntryRowFactory());
0733:                ifTestEntry = moFactory.createTable(oidIfTestEntry,
0734:                        ifTestEntryIndex, ifTestEntryColumns, ifTestEntryModel);
0735:            }
0736:
0737:            public MOTable getIfRcvAddressEntry() {
0738:                return ifRcvAddressEntry;
0739:            }
0740:
0741:            private void createIfRcvAddressEntry() {
0742:                MOColumn[] ifRcvAddressEntryColumns = new MOColumn[2];
0743:                ifRcvAddressEntryColumns[idxIfRcvAddressStatus] = new RowStatus(
0744:                        colIfRcvAddressStatus);
0745:                ValueConstraint ifRcvAddressStatusVC = new EnumerationConstraint(
0746:                        new int[] { IfRcvAddressStatusEnum.active,
0747:                                IfRcvAddressStatusEnum.notInService,
0748:                                IfRcvAddressStatusEnum.notReady,
0749:                                IfRcvAddressStatusEnum.createAndGo,
0750:                                IfRcvAddressStatusEnum.createAndWait,
0751:                                IfRcvAddressStatusEnum.destroy });
0752:                ((MOMutableColumn) ifRcvAddressEntryColumns[idxIfRcvAddressStatus])
0753:                        .addMOValueValidationListener(new ValueConstraintValidator(
0754:                                ifRcvAddressStatusVC));
0755:                ifRcvAddressEntryColumns[idxIfRcvAddressType] = new Enumerated(
0756:                        colIfRcvAddressType,
0757:                        moFactory
0758:                                .createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_CREATE),
0759:                        new Integer32(2));
0760:                ValueConstraint ifRcvAddressTypeVC = new EnumerationConstraint(
0761:                        new int[] { IfRcvAddressTypeEnum.other,
0762:                                IfRcvAddressTypeEnum._volatile,
0763:                                IfRcvAddressTypeEnum.nonVolatile });
0764:                ((MOMutableColumn) ifRcvAddressEntryColumns[idxIfRcvAddressType])
0765:                        .addMOValueValidationListener(new ValueConstraintValidator(
0766:                                ifRcvAddressTypeVC));
0767:
0768:                ifRcvAddressEntryModel = new DefaultMOMutableTableModel();
0769:                ifRcvAddressEntryModel
0770:                        .setRowFactory(new IfRcvAddressEntryRowFactory());
0771:                ifRcvAddressEntry = moFactory.createTable(oidIfRcvAddressEntry,
0772:                        ifRcvAddressEntryIndex, ifRcvAddressEntryColumns,
0773:                        ifRcvAddressEntryModel);
0774:            }
0775:
0776:            public void registerMOs(MOServer server, OctetString context)
0777:                    throws DuplicateRegistrationException {
0778:                // Scalar Objects
0779:                server.register(this .ifNumber, context);
0780:                server.register(this .ifTableLastChange, context);
0781:                server.register(this .ifStackLastChange, context);
0782:                server.register(this .ifEntry, context);
0783:                server.register(this .ifXEntry, context);
0784:                server.register(this .ifStackEntry, context);
0785:                server.register(this .ifTestEntry, context);
0786:                server.register(this .ifRcvAddressEntry, context);
0787:                //--AgentGen BEGIN=_registerMOs
0788:                //--AgentGen END
0789:            }
0790:
0791:            public void unregisterMOs(MOServer server, OctetString context) {
0792:                // Scalar Objects
0793:                server.unregister(this .ifNumber, context);
0794:                server.unregister(this .ifTableLastChange, context);
0795:                server.unregister(this .ifStackLastChange, context);
0796:                server.unregister(this .ifEntry, context);
0797:                server.unregister(this .ifXEntry, context);
0798:                server.unregister(this .ifStackEntry, context);
0799:                server.unregister(this .ifTestEntry, context);
0800:                server.unregister(this .ifRcvAddressEntry, context);
0801:                //--AgentGen BEGIN=_unregisterMOs
0802:                //--AgentGen END
0803:            }
0804:
0805:            // Notifications
0806:            public void linkDown(NotificationOriginator notificationOriginator,
0807:                    OctetString context, VariableBinding[] vbs) {
0808:                if (vbs.length < 3) {
0809:                    throw new IllegalArgumentException(
0810:                            "Too few notification objects: " + vbs.length
0811:                                    + "<3");
0812:                }
0813:                if (!(vbs[0].getOid().startsWith(oidTrapVarIfIndex))) {
0814:                    throw new IllegalArgumentException(
0815:                            "Variable 0 has wrong OID: " + vbs[0].getOid()
0816:                                    + " does not start with "
0817:                                    + oidTrapVarIfIndex);
0818:                }
0819:                if (!ifEntryIndex.isValidIndex(ifEntry.getIndexPart(vbs[0]
0820:                        .getOid()))) {
0821:                    throw new IllegalArgumentException(
0822:                            "Illegal index for variable 0 specified: "
0823:                                    + ifEntry.getIndexPart(vbs[0].getOid()));
0824:                }
0825:                if (!(vbs[1].getOid().startsWith(oidTrapVarIfAdminStatus))) {
0826:                    throw new IllegalArgumentException(
0827:                            "Variable 1 has wrong OID: " + vbs[1].getOid()
0828:                                    + " does not start with "
0829:                                    + oidTrapVarIfAdminStatus);
0830:                }
0831:                if (!ifEntryIndex.isValidIndex(ifEntry.getIndexPart(vbs[1]
0832:                        .getOid()))) {
0833:                    throw new IllegalArgumentException(
0834:                            "Illegal index for variable 1 specified: "
0835:                                    + ifEntry.getIndexPart(vbs[1].getOid()));
0836:                }
0837:                if (!(vbs[2].getOid().startsWith(oidTrapVarIfOperStatus))) {
0838:                    throw new IllegalArgumentException(
0839:                            "Variable 2 has wrong OID: " + vbs[2].getOid()
0840:                                    + " does not start with "
0841:                                    + oidTrapVarIfOperStatus);
0842:                }
0843:                if (!ifEntryIndex.isValidIndex(ifEntry.getIndexPart(vbs[2]
0844:                        .getOid()))) {
0845:                    throw new IllegalArgumentException(
0846:                            "Illegal index for variable 2 specified: "
0847:                                    + ifEntry.getIndexPart(vbs[2].getOid()));
0848:                }
0849:                notificationOriginator.notify(context, oidLinkDown, vbs);
0850:            }
0851:
0852:            public void linkUp(NotificationOriginator notificationOriginator,
0853:                    OctetString context, VariableBinding[] vbs) {
0854:                if (vbs.length < 3) {
0855:                    throw new IllegalArgumentException(
0856:                            "Too few notification objects: " + vbs.length
0857:                                    + "<3");
0858:                }
0859:                if (!(vbs[0].getOid().startsWith(oidTrapVarIfIndex))) {
0860:                    throw new IllegalArgumentException(
0861:                            "Variable 0 has wrong OID: " + vbs[0].getOid()
0862:                                    + " does not start with "
0863:                                    + oidTrapVarIfIndex);
0864:                }
0865:                if (!ifEntryIndex.isValidIndex(ifEntry.getIndexPart(vbs[0]
0866:                        .getOid()))) {
0867:                    throw new IllegalArgumentException(
0868:                            "Illegal index for variable 0 specified: "
0869:                                    + ifEntry.getIndexPart(vbs[0].getOid()));
0870:                }
0871:                if (!(vbs[1].getOid().startsWith(oidTrapVarIfAdminStatus))) {
0872:                    throw new IllegalArgumentException(
0873:                            "Variable 1 has wrong OID: " + vbs[1].getOid()
0874:                                    + " does not start with "
0875:                                    + oidTrapVarIfAdminStatus);
0876:                }
0877:                if (!ifEntryIndex.isValidIndex(ifEntry.getIndexPart(vbs[1]
0878:                        .getOid()))) {
0879:                    throw new IllegalArgumentException(
0880:                            "Illegal index for variable 1 specified: "
0881:                                    + ifEntry.getIndexPart(vbs[1].getOid()));
0882:                }
0883:                if (!(vbs[2].getOid().startsWith(oidTrapVarIfOperStatus))) {
0884:                    throw new IllegalArgumentException(
0885:                            "Variable 2 has wrong OID: " + vbs[2].getOid()
0886:                                    + " does not start with "
0887:                                    + oidTrapVarIfOperStatus);
0888:                }
0889:                if (!ifEntryIndex.isValidIndex(ifEntry.getIndexPart(vbs[2]
0890:                        .getOid()))) {
0891:                    throw new IllegalArgumentException(
0892:                            "Illegal index for variable 2 specified: "
0893:                                    + ifEntry.getIndexPart(vbs[2].getOid()));
0894:                }
0895:                notificationOriginator.notify(context, oidLinkUp, vbs);
0896:            }
0897:
0898:            // Scalars
0899:
0900:            // Value Validators
0901:
0902:            // Rows and Factories
0903:            class IfEntryRowFactory extends DefaultMOMutableRow2PCFactory {
0904:                public synchronized MOTableRow createRow(OID index,
0905:                        Variable[] values) throws UnsupportedOperationException {
0906:                    IfEntryRow row = new IfEntryRow(index, values);
0907:                    //--AgentGen BEGIN=ifEntry::createRow
0908:                    //--AgentGen END
0909:                    return row;
0910:                }
0911:
0912:                public synchronized void freeRow(MOTableRow row) {
0913:                    //--AgentGen BEGIN=ifEntry::freeRow
0914:                    //--AgentGen END
0915:                }
0916:            }
0917:
0918:            class IfEntryRow extends DefaultMOMutableRow2PC {
0919:                public IfEntryRow(OID index, Variable[] values) {
0920:                    super (index, values);
0921:                }
0922:
0923:                public Integer32 getIfIndex() {
0924:                    return (Integer32) getValue(idxIfIndex);
0925:                }
0926:
0927:                public void setIfIndex(Integer32 newValue) {
0928:                    setValue(idxIfIndex, newValue);
0929:                }
0930:
0931:                public OctetString getIfDescr() {
0932:                    return (OctetString) getValue(idxIfDescr);
0933:                }
0934:
0935:                public void setIfDescr(OctetString newValue) {
0936:                    setValue(idxIfDescr, newValue);
0937:                }
0938:
0939:                public Integer32 getIfType() {
0940:                    return (Integer32) getValue(idxIfType);
0941:                }
0942:
0943:                public void setIfType(Integer32 newValue) {
0944:                    setValue(idxIfType, newValue);
0945:                }
0946:
0947:                public Integer32 getIfMtu() {
0948:                    return (Integer32) getValue(idxIfMtu);
0949:                }
0950:
0951:                public void setIfMtu(Integer32 newValue) {
0952:                    setValue(idxIfMtu, newValue);
0953:                }
0954:
0955:                public Gauge32 getIfSpeed() {
0956:                    return (Gauge32) getValue(idxIfSpeed);
0957:                }
0958:
0959:                public void setIfSpeed(Gauge32 newValue) {
0960:                    setValue(idxIfSpeed, newValue);
0961:                }
0962:
0963:                public OctetString getIfPhysAddress() {
0964:                    return (OctetString) getValue(idxIfPhysAddress);
0965:                }
0966:
0967:                public void setIfPhysAddress(OctetString newValue) {
0968:                    setValue(idxIfPhysAddress, newValue);
0969:                }
0970:
0971:                public Integer32 getIfAdminStatus() {
0972:                    return (Integer32) getValue(idxIfAdminStatus);
0973:                }
0974:
0975:                public void setIfAdminStatus(Integer32 newValue) {
0976:                    setValue(idxIfAdminStatus, newValue);
0977:                }
0978:
0979:                public Integer32 getIfOperStatus() {
0980:                    return (Integer32) getValue(idxIfOperStatus);
0981:                }
0982:
0983:                public void setIfOperStatus(Integer32 newValue) {
0984:                    setValue(idxIfOperStatus, newValue);
0985:                }
0986:
0987:                public TimeTicks getIfLastChange() {
0988:                    return (TimeTicks) getValue(idxIfLastChange);
0989:                }
0990:
0991:                public void setIfLastChange(TimeTicks newValue) {
0992:                    setValue(idxIfLastChange, newValue);
0993:                }
0994:
0995:                public Counter32 getIfInOctets() {
0996:                    return (Counter32) getValue(idxIfInOctets);
0997:                }
0998:
0999:                public void setIfInOctets(Counter32 newValue) {
1000:                    setValue(idxIfInOctets, newValue);
1001:                }
1002:
1003:                public Counter32 getIfInUcastPkts() {
1004:                    return (Counter32) getValue(idxIfInUcastPkts);
1005:                }
1006:
1007:                public void setIfInUcastPkts(Counter32 newValue) {
1008:                    setValue(idxIfInUcastPkts, newValue);
1009:                }
1010:
1011:                public Counter32 getIfInNUcastPkts() {
1012:                    return (Counter32) getValue(idxIfInNUcastPkts);
1013:                }
1014:
1015:                public void setIfInNUcastPkts(Counter32 newValue) {
1016:                    setValue(idxIfInNUcastPkts, newValue);
1017:                }
1018:
1019:                public Counter32 getIfInDiscards() {
1020:                    return (Counter32) getValue(idxIfInDiscards);
1021:                }
1022:
1023:                public void setIfInDiscards(Counter32 newValue) {
1024:                    setValue(idxIfInDiscards, newValue);
1025:                }
1026:
1027:                public Counter32 getIfInErrors() {
1028:                    return (Counter32) getValue(idxIfInErrors);
1029:                }
1030:
1031:                public void setIfInErrors(Counter32 newValue) {
1032:                    setValue(idxIfInErrors, newValue);
1033:                }
1034:
1035:                public Counter32 getIfInUnknownProtos() {
1036:                    return (Counter32) getValue(idxIfInUnknownProtos);
1037:                }
1038:
1039:                public void setIfInUnknownProtos(Counter32 newValue) {
1040:                    setValue(idxIfInUnknownProtos, newValue);
1041:                }
1042:
1043:                public Counter32 getIfOutOctets() {
1044:                    return (Counter32) getValue(idxIfOutOctets);
1045:                }
1046:
1047:                public void setIfOutOctets(Counter32 newValue) {
1048:                    setValue(idxIfOutOctets, newValue);
1049:                }
1050:
1051:                public Counter32 getIfOutUcastPkts() {
1052:                    return (Counter32) getValue(idxIfOutUcastPkts);
1053:                }
1054:
1055:                public void setIfOutUcastPkts(Counter32 newValue) {
1056:                    setValue(idxIfOutUcastPkts, newValue);
1057:                }
1058:
1059:                public Counter32 getIfOutNUcastPkts() {
1060:                    return (Counter32) getValue(idxIfOutNUcastPkts);
1061:                }
1062:
1063:                public void setIfOutNUcastPkts(Counter32 newValue) {
1064:                    setValue(idxIfOutNUcastPkts, newValue);
1065:                }
1066:
1067:                public Counter32 getIfOutDiscards() {
1068:                    return (Counter32) getValue(idxIfOutDiscards);
1069:                }
1070:
1071:                public void setIfOutDiscards(Counter32 newValue) {
1072:                    setValue(idxIfOutDiscards, newValue);
1073:                }
1074:
1075:                public Counter32 getIfOutErrors() {
1076:                    return (Counter32) getValue(idxIfOutErrors);
1077:                }
1078:
1079:                public void setIfOutErrors(Counter32 newValue) {
1080:                    setValue(idxIfOutErrors, newValue);
1081:                }
1082:
1083:                public Gauge32 getIfOutQLen() {
1084:                    return (Gauge32) getValue(idxIfOutQLen);
1085:                }
1086:
1087:                public void setIfOutQLen(Gauge32 newValue) {
1088:                    setValue(idxIfOutQLen, newValue);
1089:                }
1090:
1091:                public OID getIfSpecific() {
1092:                    return (OID) getValue(idxIfSpecific);
1093:                }
1094:
1095:                public void setIfSpecific(OID newValue) {
1096:                    setValue(idxIfSpecific, newValue);
1097:                }
1098:
1099:                //--AgentGen BEGIN=ifEntry::RowFactory
1100:                //--AgentGen END
1101:            }
1102:
1103:            class IfXEntryRowFactory extends DefaultMOMutableRow2PCFactory {
1104:                public synchronized MOTableRow createRow(OID index,
1105:                        Variable[] values) throws UnsupportedOperationException {
1106:                    IfXEntryRow row = new IfXEntryRow(index, values);
1107:                    //--AgentGen BEGIN=ifXEntry::createRow
1108:                    //--AgentGen END
1109:                    return row;
1110:                }
1111:
1112:                public synchronized void freeRow(MOTableRow row) {
1113:                    //--AgentGen BEGIN=ifXEntry::freeRow
1114:                    //--AgentGen END
1115:                }
1116:            }
1117:
1118:            class IfXEntryRow extends DefaultMOMutableRow2PC {
1119:                public IfXEntryRow(OID index, Variable[] values) {
1120:                    super (index, values);
1121:                }
1122:
1123:                public OctetString getIfName() {
1124:                    return (OctetString) getValue(idxIfName);
1125:                }
1126:
1127:                public void setIfName(OctetString newValue) {
1128:                    setValue(idxIfName, newValue);
1129:                }
1130:
1131:                public Counter32 getIfInMulticastPkts() {
1132:                    return (Counter32) getValue(idxIfInMulticastPkts);
1133:                }
1134:
1135:                public void setIfInMulticastPkts(Counter32 newValue) {
1136:                    setValue(idxIfInMulticastPkts, newValue);
1137:                }
1138:
1139:                public Counter32 getIfInBroadcastPkts() {
1140:                    return (Counter32) getValue(idxIfInBroadcastPkts);
1141:                }
1142:
1143:                public void setIfInBroadcastPkts(Counter32 newValue) {
1144:                    setValue(idxIfInBroadcastPkts, newValue);
1145:                }
1146:
1147:                public Counter32 getIfOutMulticastPkts() {
1148:                    return (Counter32) getValue(idxIfOutMulticastPkts);
1149:                }
1150:
1151:                public void setIfOutMulticastPkts(Counter32 newValue) {
1152:                    setValue(idxIfOutMulticastPkts, newValue);
1153:                }
1154:
1155:                public Counter32 getIfOutBroadcastPkts() {
1156:                    return (Counter32) getValue(idxIfOutBroadcastPkts);
1157:                }
1158:
1159:                public void setIfOutBroadcastPkts(Counter32 newValue) {
1160:                    setValue(idxIfOutBroadcastPkts, newValue);
1161:                }
1162:
1163:                public Counter64 getIfHCInOctets() {
1164:                    return (Counter64) getValue(idxIfHCInOctets);
1165:                }
1166:
1167:                public void setIfHCInOctets(Counter64 newValue) {
1168:                    setValue(idxIfHCInOctets, newValue);
1169:                }
1170:
1171:                public Counter64 getIfHCInUcastPkts() {
1172:                    return (Counter64) getValue(idxIfHCInUcastPkts);
1173:                }
1174:
1175:                public void setIfHCInUcastPkts(Counter64 newValue) {
1176:                    setValue(idxIfHCInUcastPkts, newValue);
1177:                }
1178:
1179:                public Counter64 getIfHCInMulticastPkts() {
1180:                    return (Counter64) getValue(idxIfHCInMulticastPkts);
1181:                }
1182:
1183:                public void setIfHCInMulticastPkts(Counter64 newValue) {
1184:                    setValue(idxIfHCInMulticastPkts, newValue);
1185:                }
1186:
1187:                public Counter64 getIfHCInBroadcastPkts() {
1188:                    return (Counter64) getValue(idxIfHCInBroadcastPkts);
1189:                }
1190:
1191:                public void setIfHCInBroadcastPkts(Counter64 newValue) {
1192:                    setValue(idxIfHCInBroadcastPkts, newValue);
1193:                }
1194:
1195:                public Counter64 getIfHCOutOctets() {
1196:                    return (Counter64) getValue(idxIfHCOutOctets);
1197:                }
1198:
1199:                public void setIfHCOutOctets(Counter64 newValue) {
1200:                    setValue(idxIfHCOutOctets, newValue);
1201:                }
1202:
1203:                public Counter64 getIfHCOutUcastPkts() {
1204:                    return (Counter64) getValue(idxIfHCOutUcastPkts);
1205:                }
1206:
1207:                public void setIfHCOutUcastPkts(Counter64 newValue) {
1208:                    setValue(idxIfHCOutUcastPkts, newValue);
1209:                }
1210:
1211:                public Counter64 getIfHCOutMulticastPkts() {
1212:                    return (Counter64) getValue(idxIfHCOutMulticastPkts);
1213:                }
1214:
1215:                public void setIfHCOutMulticastPkts(Counter64 newValue) {
1216:                    setValue(idxIfHCOutMulticastPkts, newValue);
1217:                }
1218:
1219:                public Counter64 getIfHCOutBroadcastPkts() {
1220:                    return (Counter64) getValue(idxIfHCOutBroadcastPkts);
1221:                }
1222:
1223:                public void setIfHCOutBroadcastPkts(Counter64 newValue) {
1224:                    setValue(idxIfHCOutBroadcastPkts, newValue);
1225:                }
1226:
1227:                public Integer32 getIfLinkUpDownTrapEnable() {
1228:                    return (Integer32) getValue(idxIfLinkUpDownTrapEnable);
1229:                }
1230:
1231:                public void setIfLinkUpDownTrapEnable(Integer32 newValue) {
1232:                    setValue(idxIfLinkUpDownTrapEnable, newValue);
1233:                }
1234:
1235:                public Gauge32 getIfHighSpeed() {
1236:                    return (Gauge32) getValue(idxIfHighSpeed);
1237:                }
1238:
1239:                public void setIfHighSpeed(Gauge32 newValue) {
1240:                    setValue(idxIfHighSpeed, newValue);
1241:                }
1242:
1243:                public Integer32 getIfPromiscuousMode() {
1244:                    return (Integer32) getValue(idxIfPromiscuousMode);
1245:                }
1246:
1247:                public void setIfPromiscuousMode(Integer32 newValue) {
1248:                    setValue(idxIfPromiscuousMode, newValue);
1249:                }
1250:
1251:                public Integer32 getIfConnectorPresent() {
1252:                    return (Integer32) getValue(idxIfConnectorPresent);
1253:                }
1254:
1255:                public void setIfConnectorPresent(Integer32 newValue) {
1256:                    setValue(idxIfConnectorPresent, newValue);
1257:                }
1258:
1259:                public OctetString getIfAlias() {
1260:                    return (OctetString) getValue(idxIfAlias);
1261:                }
1262:
1263:                public void setIfAlias(OctetString newValue) {
1264:                    setValue(idxIfAlias, newValue);
1265:                }
1266:
1267:                public TimeTicks getIfCounterDiscontinuityTime() {
1268:                    return (TimeTicks) getValue(idxIfCounterDiscontinuityTime);
1269:                }
1270:
1271:                public void setIfCounterDiscontinuityTime(TimeTicks newValue) {
1272:                    setValue(idxIfCounterDiscontinuityTime, newValue);
1273:                }
1274:
1275:                //--AgentGen BEGIN=ifXEntry::RowFactory
1276:                //--AgentGen END
1277:            }
1278:
1279:            class IfStackEntryRowFactory extends DefaultMOMutableRow2PCFactory {
1280:                public synchronized MOTableRow createRow(OID index,
1281:                        Variable[] values) throws UnsupportedOperationException {
1282:                    IfStackEntryRow row = new IfStackEntryRow(index, values);
1283:                    //--AgentGen BEGIN=ifStackEntry::createRow
1284:                    //--AgentGen END
1285:                    return row;
1286:                }
1287:
1288:                public synchronized void freeRow(MOTableRow row) {
1289:                    //--AgentGen BEGIN=ifStackEntry::freeRow
1290:                    //--AgentGen END
1291:                }
1292:            }
1293:
1294:            class IfStackEntryRow extends DefaultMOMutableRow2PC {
1295:                public IfStackEntryRow(OID index, Variable[] values) {
1296:                    super (index, values);
1297:                }
1298:
1299:                public Integer32 getIfStackStatus() {
1300:                    return (Integer32) getValue(idxIfStackStatus);
1301:                }
1302:
1303:                public void setIfStackStatus(Integer32 newValue) {
1304:                    setValue(idxIfStackStatus, newValue);
1305:                }
1306:
1307:                //--AgentGen BEGIN=ifStackEntry::RowFactory
1308:                //--AgentGen END
1309:            }
1310:
1311:            class IfTestEntryRowFactory extends DefaultMOMutableRow2PCFactory {
1312:                public synchronized MOTableRow createRow(OID index,
1313:                        Variable[] values) throws UnsupportedOperationException {
1314:                    IfTestEntryRow row = new IfTestEntryRow(index, values);
1315:                    //--AgentGen BEGIN=ifTestEntry::createRow
1316:                    //--AgentGen END
1317:                    return row;
1318:                }
1319:
1320:                public synchronized void freeRow(MOTableRow row) {
1321:                    //--AgentGen BEGIN=ifTestEntry::freeRow
1322:                    //--AgentGen END
1323:                }
1324:            }
1325:
1326:            class IfTestEntryRow extends DefaultMOMutableRow2PC {
1327:                public IfTestEntryRow(OID index, Variable[] values) {
1328:                    super (index, values);
1329:                }
1330:
1331:                public Integer32 getIfTestId() {
1332:                    return (Integer32) getValue(idxIfTestId);
1333:                }
1334:
1335:                public void setIfTestId(Integer32 newValue) {
1336:                    setValue(idxIfTestId, newValue);
1337:                }
1338:
1339:                public Integer32 getIfTestStatus() {
1340:                    return (Integer32) getValue(idxIfTestStatus);
1341:                }
1342:
1343:                public void setIfTestStatus(Integer32 newValue) {
1344:                    setValue(idxIfTestStatus, newValue);
1345:                }
1346:
1347:                public OID getIfTestType() {
1348:                    return (OID) getValue(idxIfTestType);
1349:                }
1350:
1351:                public void setIfTestType(OID newValue) {
1352:                    setValue(idxIfTestType, newValue);
1353:                }
1354:
1355:                public Integer32 getIfTestResult() {
1356:                    return (Integer32) getValue(idxIfTestResult);
1357:                }
1358:
1359:                public void setIfTestResult(Integer32 newValue) {
1360:                    setValue(idxIfTestResult, newValue);
1361:                }
1362:
1363:                public OID getIfTestCode() {
1364:                    return (OID) getValue(idxIfTestCode);
1365:                }
1366:
1367:                public void setIfTestCode(OID newValue) {
1368:                    setValue(idxIfTestCode, newValue);
1369:                }
1370:
1371:                public OctetString getIfTestOwner() {
1372:                    return (OctetString) getValue(idxIfTestOwner);
1373:                }
1374:
1375:                public void setIfTestOwner(OctetString newValue) {
1376:                    setValue(idxIfTestOwner, newValue);
1377:                }
1378:
1379:                //--AgentGen BEGIN=ifTestEntry::RowFactory
1380:                //--AgentGen END
1381:            }
1382:
1383:            class IfRcvAddressEntryRowFactory extends
1384:                    DefaultMOMutableRow2PCFactory {
1385:                public synchronized MOTableRow createRow(OID index,
1386:                        Variable[] values) throws UnsupportedOperationException {
1387:                    IfRcvAddressEntryRow row = new IfRcvAddressEntryRow(index,
1388:                            values);
1389:                    //--AgentGen BEGIN=ifRcvAddressEntry::createRow
1390:                    //--AgentGen END
1391:                    return row;
1392:                }
1393:
1394:                public synchronized void freeRow(MOTableRow row) {
1395:                    //--AgentGen BEGIN=ifRcvAddressEntry::freeRow
1396:                    //--AgentGen END
1397:                }
1398:            }
1399:
1400:            class IfRcvAddressEntryRow extends DefaultMOMutableRow2PC {
1401:                public IfRcvAddressEntryRow(OID index, Variable[] values) {
1402:                    super (index, values);
1403:                }
1404:
1405:                public Integer32 getIfRcvAddressStatus() {
1406:                    return (Integer32) getValue(idxIfRcvAddressStatus);
1407:                }
1408:
1409:                public void setIfRcvAddressStatus(Integer32 newValue) {
1410:                    setValue(idxIfRcvAddressStatus, newValue);
1411:                }
1412:
1413:                public Integer32 getIfRcvAddressType() {
1414:                    return (Integer32) getValue(idxIfRcvAddressType);
1415:                }
1416:
1417:                public void setIfRcvAddressType(Integer32 newValue) {
1418:                    setValue(idxIfRcvAddressType, newValue);
1419:                }
1420:
1421:                //--AgentGen BEGIN=ifRcvAddressEntry::RowFactory
1422:                //--AgentGen END
1423:            }
1424:
1425:            //--AgentGen BEGIN=_METHODS
1426:            //--AgentGen END
1427:
1428:            //--AgentGen BEGIN=_CLASSES
1429:            //--AgentGen END
1430:
1431:            //--AgentGen BEGIN=_END
1432:            //--AgentGen END
1433:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.