| java.lang.Object snmp.SNMPObject snmp.SNMPSequence
All known Subclasses: snmp.SNMPv2BulkRequestPDU, snmp.SNMPVariablePair, snmp.SNMPv1TrapPDU, snmp.SNMPPDU, snmp.SNMPVarBindList, snmp.SNMPMessage,
SNMPSequence | public class SNMPSequence extends SNMPObject (Code) | | 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.
|
Constructor Summary | |
public | SNMPSequence() Create a new empty sequence. | public | SNMPSequence(Vector v) Create a new SNMP sequence from the supplied Vector of SNMPObjects. | protected | SNMPSequence(byte[] enc) Construct an SNMPMessage from a received ASN.1 byte representation. |
Method Summary | |
public void | addSNMPObject(SNMPObject newObject) Add the SNMP object to the end of the sequence. | protected void | extractFromBEREncoding(byte[] enc) | protected byte[] | getBEREncoding() Return the BER encoding for the sequence. | public SNMPObject | getSNMPObjectAt(int index) Return the SNMP object at the specified index. | public Object | getValue() Returns a Vector containing the SNMPObjects in the sequence. | public void | insertSNMPObjectAt(SNMPObject newObject, int index) Insert the SNMP object at the specified position in the sequence. | public void | setValue(Object newSequence) Used to set the contained SNMP objects from a supplied Vector. | public int | size() Return the number of SNMPObjects contained in the sequence. | public String | toString() Return a sequence of representations of the contained objects, separated by spaces
and enclosed in parentheses. |
SNMPSequence | public SNMPSequence()(Code) | | Create a new empty sequence.
|
getBEREncoding | protected byte[] getBEREncoding()(Code) | | Return the BER encoding for the sequence.
|
getSNMPObjectAt | public SNMPObject getSNMPObjectAt(int index)(Code) | | Return the SNMP object at the specified index. Indices are 0-based.
|
getValue | public Object getValue()(Code) | | Returns a Vector containing the SNMPObjects in the sequence.
|
setValue | public void setValue(Object newSequence) throws SNMPBadValueException(Code) | | Used to set the contained SNMP objects from a supplied Vector.
throws: SNMPBadValueException - Indicates an incorrect object type supplied, or that the suppliedVector contains non-SNMPObjects. |
size | public int size()(Code) | | Return the number of SNMPObjects contained in the sequence.
|
toString | public String toString()(Code) | | Return a sequence of representations of the contained objects, separated by spaces
and enclosed in parentheses.
|
|
|