|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.cisco.provisioning.cpe.extensions.configuration.AbstractTFTPFile
public abstract class AbstractTFTPFile
Abstract TFTPFile class. This class implement the TFTPFile interface and provides an abstract implementation that can be subclassed to provide a concrete implementation of the TFTPFile interface with minimal effort. Subclasses must be serializable.
TFTPFile,
Serialized Form| Constructor Summary | |
|---|---|
AbstractTFTPFile()
No-arg constructor. |
|
AbstractTFTPFile(byte[] fileBytes)
Use this constructor when no filename tag is used and the configuration file bytes is known at construction time. |
|
AbstractTFTPFile(String filename)
Use this constructor when the filename is known at construction time, but the configuration file contents are created later. |
|
AbstractTFTPFile(String filename,
byte[] fileBytes)
Use this constructor when the filename and configuration file bytes are known at construction time. |
|
| Method Summary | |
|---|---|
void |
decode(ByteArrayInputStream in,
com.cisco.csrc.encode.DataDecoder decoder)
Decodes object's data and sets object's variables. |
void |
display(PrintWriter output,
String prefix,
List<String> options,
boolean verbose)
Display the contents of this object for debugging. |
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. |
abstract void |
generate()
Generate the TFTP file. |
byte[] |
getFile()
Get the configuration file to be delivered to the device. |
String |
getFilename()
Get the filename identifier for the TFTPFile. |
Map<String,Object> |
getProperties()
Get the property map. |
Object |
getProperty(String key)
Get the named property from the property map. |
int |
hashCode()
Returns the hashcode for this AbstractTFTPFile. |
abstract void |
mix(String ipAddress,
CSRCProperties properties)
Perform DPE mixing. |
String |
paramString()
Returns a string representing the state of the TFTPFile object. |
void |
readExternal(ObjectInput in)
Externalizable interface. |
void |
setProperty(String key,
Object value)
Set the named property in the property map. |
String |
toString()
Return a string containing the contents of TFTPFile in human-readable form. |
abstract void |
validate()
Validate the TFTP file. |
void |
writeExternal(ObjectOutput out)
Externalizable interface. |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractTFTPFile()
public AbstractTFTPFile(String filename)
filename - public AbstractTFTPFile(byte[] fileBytes)
fileBytes -
public AbstractTFTPFile(String filename,
byte[] fileBytes)
filename - fileBytes - | Method Detail |
|---|
public final String getFilename()
getFilename in interface TFTPFilepublic byte[] getFile()
getFile in interface TFTPFilepublic final Object getProperty(String key)
getProperty in interface TFTPFilekey - property name
public final void setProperty(String key,
Object value)
setProperty in interface TFTPFilekey - property namevalue - property value
IllegalArgumentException - if key or value is invalidpublic final Map<String,Object> getProperties()
getProperties in interface TFTPFile
public abstract void validate()
throws InvalidConfigException
validate in interface TFTPFileInvalidConfigException - if any errors are encountered during the
validation.
public abstract void generate()
throws InvalidConfigException
generate in interface TFTPFileInvalidConfigException - if any errors are encountered during the
generation.
public abstract void mix(String ipAddress,
CSRCProperties properties)
throws InvalidConfigException
mix in interface TFTPFileipAddress - of the device requesting the TFTP fileproperties - relevant to mixing operation
InvalidConfigException - if any errors are encountered during the
mixing.public int hashCode()
hashCode in class Objectpublic boolean equals(Object object)
equals in class Objectobject - to compare
public final String toString()
toString in class Objectpublic String paramString()
null. Subclasses should override to provide additional
fields in the output string.
public void display(PrintWriter output,
String prefix,
List<String> options,
boolean verbose)
The output from this method is expected to be easier to read, with
possibly less detail than is produced by toString. The
output can be multi-line if that makes it easier to read.
display in interface com.cisco.csrc.util.Displayableoutput - the resulting output is written to this parameter.prefix - string to output before each line, usually blanks to indent
this output to show association with parent object.options - list of string options to control output.verbose - true indicates detailed output desired.
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 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 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 | ||||||||