|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.cisco.provisioning.cpe.extensions.configuration.DHCPCmd
public class DHCPCmd
The DHCPCmd encapsulates an operation to be performed by the BAC CNR extension point. The command consists of: extension point, dictionary, operation, option name, and (optionally) option value. The object is immutable.
CNRExtPt,
DHCPOper,
DHCPDict,
Serialized Form| Constructor Summary | |
|---|---|
DHCPCmd()
No-arg constructor required by Exernalizable and Encodable |
|
DHCPCmd(CNRExtPt extension,
DHCPOper operation,
DHCPDict dictionary,
Object optionName)
Constructor for command operations that do not support option values. |
|
DHCPCmd(CNRExtPt extension,
DHCPOper operation,
DHCPDict dictionary,
Object optionName,
DHCPSpecialValue optionValue,
String parameter)
Constructor for command operations that support special option values. |
|
DHCPCmd(CNRExtPt extension,
DHCPOper operation,
DHCPDict dictionary,
Object optionName,
Object optionValue)
Constructor for command operations that support option values. |
|
| Method Summary | |
|---|---|
void |
decode(ByteArrayInputStream in,
com.cisco.csrc.encode.DataDecoder decoder)
Decodes object's data and sets object's variables. |
void |
encode(ByteArrayOutputStream out,
com.cisco.csrc.encode.DataEncoder encoder)
Encodes object's data. |
boolean |
equals(Object object)
Indicates whether some other object is "equal to" this one. |
boolean |
equalsOption(DHCPCmd cmd)
Determines if another DHCPCmd object references the same dictionary and option name. |
DHCPDict |
getDictionary()
Return the dictionary to which the command is to be applied. |
byte |
getDictionaryAsByte()
Return the dictionary to which the command is to be applied. |
CNRExtPt |
getExtension()
Return the extension to which the command is to be applied. |
byte |
getExtensionAsByte()
Return the extension to which the command is to be applied. |
DHCPOper |
getOperation()
Return the command operation. |
byte |
getOperationAsByte()
Return the command operation. |
String |
getOptionName()
Return the option name. |
CNROptionArgumentArray |
getOptionNameAsArgArray()
Returns the option name as a CNROptionArgumentArray . |
CNRNames |
getOptionNameAsEnum()
Return the option name as an enumeration constant. |
int |
getOptionNameAsEnumValue()
Return the option name as an enumeration value. |
String |
getOptionValue()
Return the singled-valued option value string. |
byte[] |
getOptionValueBytes()
Return the singled-valued option value as bytes. |
String |
getSpecialParameter()
Return the command special value parameter (null if none specified). |
DHCPSpecialValue |
getSpecialValue()
Return the command special value (null if none specified). |
byte |
getSpecialValueAsByte()
Return the command special value as byte (0 if none). |
int |
hashCode()
Returns the hashcode for this DHCPData. |
boolean |
isOptionNameArgArray()
Return true if the option name was specified as a CNROptionArgumentArray value. |
boolean |
isOptionNameEnumValue()
Return true if the option name was specified as a CNRNames enum value. |
boolean |
isOptionValueBytes()
Return true if the option value is a byte array. |
boolean |
isOptionValueString()
Return true if the option value is a String. |
void |
readExternal(ObjectInput in)
Externalizable interface. |
String |
toString()
Return a string containing the contents of DHCPCmd in human-readable form. |
String |
toStringOptionValue()
Return a string containing the DHCPCmd option value in human-readable form. |
void |
writeExternal(ObjectOutput out)
Externalizable interface. |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DHCPCmd()
public DHCPCmd(CNRExtPt extension,
DHCPOper operation,
DHCPDict dictionary,
Object optionName)
extension - CNR extension point to perform the commandoperation - CNR operation to be performed (only PUT_* allowed)dictionary - CNR dictionary target for commandoptionName - option name for command, can be string, CNRNames, or
a CNROptionArgumentArray.
IllegalArgumentException - if arguments are null or if arguments
are invalid (e.g., operation not PUT_* or optionName not valid)
public DHCPCmd(CNRExtPt extension,
DHCPOper operation,
DHCPDict dictionary,
Object optionName,
Object optionValue)
extension - CNR extension point to perform the commandoperation - CNR operation to be performed (only PUT_* allowed)dictionary - CNR dictionary target for commandoptionName - option name for command, can be string, CNRNames, or
a CNROptionArgumentArray.optionValue - option value of command, can be String or byte[], or
DHCPSpecialValue
IllegalArgumentException - if arguments are null or if arguments
are invalid (e.g., operation not PUT_* or optionName not valid)
public DHCPCmd(CNRExtPt extension,
DHCPOper operation,
DHCPDict dictionary,
Object optionName,
DHCPSpecialValue optionValue,
String parameter)
extension - CNR extension point to perform the commandoperation - CNR operation to be performed (only PUT_* allowed)dictionary - CNR dictionary target for commandoptionName - option name for command, can be string, CNRNames, or
a CNROptionArgumentArray.optionValue - option value of commandparameter - the parameter for the special value if needed
IllegalArgumentException - if arguments are null or if arguments
are invalid (e.g., operation not PUT_* or optionName not valid)| Method Detail |
|---|
public final CNRExtPt getExtension()
CNRExtPtpublic final byte getExtensionAsByte()
DHCPDictpublic final DHCPDict getDictionary()
DHCPDictpublic final byte getDictionaryAsByte()
DHCPDictpublic final DHCPOper getOperation()
DHCPOperpublic final byte getOperationAsByte()
DHCPOperpublic final DHCPSpecialValue getSpecialValue()
DHCPOperpublic final String getSpecialParameter()
DHCPSpecialValuepublic final byte getSpecialValueAsByte()
DHCPSpecialValuepublic final String getOptionName()
public CNROptionArgumentArray getOptionNameAsArgArray()
public final CNRNames getOptionNameAsEnum()
CNRNamespublic final int getOptionNameAsEnumValue()
CNRNamespublic final String getOptionValue()
public final byte[] getOptionValueBytes()
public int hashCode()
hashCode in class Objectpublic boolean equals(Object object)
equals in class Objectobject - to compare
public boolean equalsOption(DHCPCmd cmd)
cmd - the DHCPCmd object to compare
public boolean isOptionNameEnumValue()
public boolean isOptionNameArgArray()
public boolean isOptionValueBytes()
public boolean isOptionValueString()
public String toString()
toString in class Objectpublic String toStringOptionValue()
public void writeExternal(ObjectOutput out)
throws IOException
writeExternal in interface Externalizableout - the stream to write the object to
IOException - Includes any I/O exceptions that may occur
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
readExternal in interface Externalizablein - the stream to read data from in order to restore the object
IOException - if I/O errors occur
ClassNotFoundException - If the class for an object being
restored cannot be found.
public void encode(ByteArrayOutputStream out,
com.cisco.csrc.encode.DataEncoder encoder)
encode in interface com.cisco.csrc.encode.Encodableout - the output stream to write toencoder - the encoder to use
public void decode(ByteArrayInputStream in,
com.cisco.csrc.encode.DataDecoder decoder)
decode in interface com.cisco.csrc.encode.Encodablein - the input stream to write todecoder - the decoder to use
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||