org.snmp4j.smi

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.smi 
org.snmp4j.smi
org.snmp4j.smi Provides classes for the representation of SMIv1/v2 data types (which also includes some basic ASN.1 primitive data types).

The org.snmp4j.smi classes are capable of BER encoding and decoding themself to/from a byte stream. In addition, the SMI data type classes provide convenient functions for manipulating their content.

The VariantVariable is a special class that can be used in command responder applications to intercept access to a SMI value.

Variable Binding Examples

import org.snmp4j.smi.*;
...
VariableBinding vb = new VariableBinding(new OID("1.3.6.1.2.1.1.4.0"));
vb.setValue(new OctetString("SNMP4J Text"));
...
vb = new VariableBinding();
vb.setOid(new OID(new int[] { 1,3,6,1,2,1,1,2,0 }));
...
vb = new VariableBinding(vb.getOid(), new IpAddress("255.255.255.255"));
...
vb = new VariableBinding(vb.getOid(), new Gauge32(2^32-1));
int syntax = vb.getSyntax();
if (syntax != SMIConstants.SYNTAX_GAUGE32) {
  // never reached
}
else {
  long value = ((UnsignedInteger32)vb.getValue()).getValue();
  System.out.println(vb.getOid() + " = " + value);
  // prints: 1.3.6.1.2.1.1.2.0 = 4294967295
}
...

The following UML class diagram shows the most important classes of the org.snmp4j.smi package and their relationships (relationships to other packages are not shown):

Java Source File NameTypeComment
AbstractVariable.javaClass The Variable abstract class is the base class for all SNMP variables.

All derived classes need to be registered with their SMI BER type in the smisyntaxes.propertiesso that the AbstractVariable.createFromBER(BERInputStream inputStream) method is able to decode a variable from a BER encoded stream.

To register additional syntaxes, set the system property AbstractVariable.SMISYNTAXES_PROPERTIES before decoding a Variable for the first time.

Address.javaInterface The Address interface serves as a base class for all SNMP transport addresses.
AssignableFromByteArray.javaInterface The AssignableFromByteArray interface describes objects whose value can be set from a byte array and converted back to a byte array.
AssignableFromInteger.javaInterface
AssignableFromLong.javaInterface
AssignableFromString.javaInterface
BitString.javaClass The BitString class represents the obsolete SMI type BIT STRING which has been defined in RFC 1442 (an SNMPv2 draft) but which has been obsoleteted by RFC 1902 and RFC 2578.
Counter32.javaClass The Counter32 class allows all the functionality of unsigned integers but is recognized as a distinct SMI type, which is used for monotonically increasing values that wrap around at 2^32-1 (4294967295).
Counter64.javaClass The Counter64 class represents a 64bit unsigned integer type.
Gauge32.javaClass The Gauge32 class is indistinguishable from UnsingedInteger32.
GenericAddress.javaClass The GenericAddress implements the decorator and factory design pattern to provide a generic address type.
Integer32.javaClass The Integer32 represents 32bit signed integer values for SNMP.
IpAddress.javaClass The IpAddress class represents an IPv4 address SNMP variable.
Null.javaClass The Null class represents SMI Null and the derived SMIv2 exception syntaxes.
OctetString.javaClass The OctetString class represents the SMI type OCTET STRING.
OID.javaClass The Object Identifier Class. The Object Identifier (OID) class is the encapsulation of an SMI object identifier.
Opaque.javaClass The Opaque class represents the SMI type Opaque which is used to transparently exchange BER encoded values.
ReadonlyVariableCallback.javaClass This abstract class helps to implement a VariantVariableCallback for a read-only Variable.
SMIAddress.javaClass A SMIAddress is an address that is defined by the Structure of Management Information (SMI) and can be thereby serialized through the Basic Encoding Rules (BER) used by the SNMP protocol.
SMIConstants.javaClass The SMIConstants defines the tag values for SMI syntax types.
TcpAddress.javaClass The TcpAddress represents TCP/IP transport addresses.
TimeTicks.javaClass The TimeTicks class represents the time in 1/100 seconds since some epoch (which should be have been defined in the corresponding MIB specification).
TransportIpAddress.javaClass The TransportIpAddress is the abstract base class for all transport addresses on top of IP network addresses.
UdpAddress.javaClass The UdpAddress represents UDP/IP transport addresses.
UnsignedInteger32.javaClass UnsignedInteger32 type is an SNMP type that represents unsigned 32bit integer values (0 to 4294967295).
Variable.javaInterface The Variable interface defines common attributes of all SNMP variables.
VariableBinding.javaClass A VariableBinding is an association of a object instance identifier ( OID ) and the instance's value ( Variable ).
VariantVariable.javaClass The VariantVariable provides a decorator for any type of Variable instance, to be able to intercept or monitor variable value modification by using a VariantVariableCallback .

This class will work for implementations that use VariantVariable.getSyntax() method to determine the variables syntax.

VariantVariableCallback.javaInterface The VariantVariableCallback can be implemented by objects that want to intercept/monitor reading and writing of a VariantVariable's value.
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.