org.jmythapi.protocol.response.impl
Class StorageGroupFileList

java.lang.Object
  extended by org.jmythapi.impl.AData<E>
      extended by org.jmythapi.protocol.response.impl.AMythResponse<StorageGroupFileList.Props>
          extended by org.jmythapi.protocol.response.impl.StorageGroupFileList
All Implemented Interfaces:
Cloneable, Iterable<IStorageGroupFile>, IPropertyAware<StorageGroupFileList.Props>, IVersionable, ISendable, IMythResponse<StorageGroupFileList.Props>, IStorageGroupFileList

public class StorageGroupFileList
extends AMythResponse<StorageGroupFileList.Props>
implements IStorageGroupFileList


Nested Class Summary
static class StorageGroupFileList.Props
           
 
Field Summary
 
Fields inherited from class org.jmythapi.impl.AData
logger, propsClass, protoVersion, respArgs
 
Fields inherited from interface org.jmythapi.protocol.response.IStorageGroupFileList
FILE_PROPS_DELIM
 
Constructor Summary
StorageGroupFileList(IMythPacket packet)
           
 
Method Summary
 List<IStorageGroupFile> asList()
          Gets a list of files stored in the storage group.
protected  void checkSize(List<String> responseArgs)
          A function to check if the given response-argument-liste contains all expected arguments.
 Iterator<IStorageGroupFile> iterator()
           
 int size()
          Gets the amount of files stored in the storage group.
 String toString()
          Returns the content of this data object as a formatted string.
 
Methods inherited from class org.jmythapi.protocol.response.impl.AMythResponse
decodeProperty, encodeProperty, getExpectedSize, getPacket, getProperties, getProperty, getPropertyIndex
 
Methods inherited from class org.jmythapi.impl.AData
clone, equals, getPropertyClass, getPropertyCount, getPropertyMap, getPropertyValue, getPropertyValue, getPropertyValueObject, getPropertyValueObject, getPropertyValues, getVersionNr, hashCode, init, postProcessArguments, setPropertyValue, setPropertyValue, setPropertyValueObject
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jmythapi.IPropertyAware
getPropertyClass, getPropertyCount, getPropertyMap, getPropertyValue, getPropertyValue, getPropertyValueObject, getPropertyValues, setPropertyValue, setPropertyValue, setPropertyValueObject
 
Methods inherited from interface org.jmythapi.IVersionable
getVersionNr
 

Constructor Detail

StorageGroupFileList

public StorageGroupFileList(IMythPacket packet)
Method Detail

checkSize

protected void checkSize(List<String> responseArgs)
                  throws IllegalArgumentException
Description copied from class: AMythResponse

A function to check if the given response-argument-liste contains all expected arguments.

The expected argument-list-size is calculated using #getExpectedSize(ArrayList).

Overrides:
checkSize in class AMythResponse<StorageGroupFileList.Props>
Parameters:
responseArgs - the response-argument-list
Throws:
IllegalArgumentException - if expected arguments are missing.

asList

public List<IStorageGroupFile> asList()
Description copied from interface: IStorageGroupFileList
Gets a list of files stored in the storage group.

Specified by:
asList in interface IStorageGroupFileList
Returns:
a list of files

iterator

public Iterator<IStorageGroupFile> iterator()
Specified by:
iterator in interface Iterable<IStorageGroupFile>

size

public int size()
Description copied from interface: IStorageGroupFileList
Gets the amount of files stored in the storage group.

Specified by:
size in interface IStorageGroupFileList
Returns:
the amount of files of the storage group

toString

public String toString()
Description copied from class: AData

Returns the content of this data object as a formatted string.

E.g.
 <0>TOTAL_RAM_MB: 1002 | <1>FREE_RAM_MB: 474 | <2>TOTAL_VM_MB: 853 | <3>FREE_VM_MB: 853
 

Overrides:
toString in class AData<StorageGroupFileList.Props>


Copyright © 2008-2013. All Rights Reserved.