|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--snmp.SNMPObject
|
+--snmp.SNMPSequence
One of the most important SNMP classes. Represents a sequence of other SNMP data types. Virtually all compound structures are subclasses of SNMPSequence - for example, the top-level SNMPMessage, and the SNMPPDU it contains, are both just specializations of SNMPSequence. Sequences are frequently nested within other sequences.
| Field Summary | |
protected java.util.Vector |
sequence
|
protected int |
type
|
| Constructor Summary | |
SNMPSequence()
Create a new empty sequence. |
|
SNMPSequence(byte[] enc)
Construct an SNMPMessage from a received ASN.1 byte representation. |
|
SNMPSequence(java.util.Vector v)
Create a new SNMP sequence from the supplied Vector of SNMPObjects. |
|
| Method Summary | |
void |
addSNMPObject(SNMPObject newObject)
Add the SNMP object to the end of the sequence. |
protected void |
extractFromBEREncoding(byte[] enc)
|
byte[] |
getBEREncoding()
Return the BER encoding for the sequence. |
SNMPObject |
getSNMPObjectAt(int index)
Return the SNMP object at the specified index. |
java.lang.Object |
getValue()
Returns a Vector containing the SNMPObjects in the sequence. |
void |
setValue(java.lang.Object newSequence)
Used to set the contained SNMP objects from a supplied Vector. |
int |
size()
Return the number of SNMPObjects contained in the sequence. |
java.lang.String |
toString()
Return a sequence of representations of the contained objects, separated by spaces and enclosed in parentheses. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.util.Vector sequence
protected int type
| Constructor Detail |
public SNMPSequence()
public SNMPSequence(java.util.Vector v)
throws SNMPBadValueException
SNMPBadValueException - Thrown if non-SNMP object supplied in Vector v.
public SNMPSequence(byte[] enc)
throws SNMPBadValueException
SNMPBadValueException - Indicates invalid SNMP sequence encoding supplied.| Method Detail |
public java.lang.Object getValue()
getValue in class SNMPObject
public void setValue(java.lang.Object newSequence)
throws SNMPBadValueException
setValue in class SNMPObjectSNMPBadValueException - Indicates an incorrect object type supplied, or that the supplied
Vector contains non-SNMPObjects.public int size()
public void addSNMPObject(SNMPObject newObject)
throws SNMPBadValueException
SNMPBadValueException - Relevant only in subclassespublic SNMPObject getSNMPObjectAt(int index)
public byte[] getBEREncoding()
getBEREncoding in class SNMPObject
protected void extractFromBEREncoding(byte[] enc)
throws SNMPBadValueException
public java.lang.String toString()
toString in class SNMPObject
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||