fulmine.model.field.containerdefinition
Class DescriptorField
java.lang.Object
fulmine.AbstractLifeCycle
fulmine.model.component.AbstractComponent
fulmine.model.field.AbstractField
fulmine.model.field.containerdefinition.DescriptorField
- All Implemented Interfaces:
- IEvent, IEventSource, IAddressable, IDescriptor, IDestroyable, ILifeCycle, IComponent, IField, IWireState, Cloneable
public final class DescriptorField
- extends AbstractField
A field that holds the description of the structure of a single
IField
in a container. The description contains the identity, IWF
wire code, data type, application code and permission code of the target
field. The identity of this field is the identity of the field it describes.
The descriptor writes the field attributes as follows:
-------------------------------------------------------------------------------------------------------------------------
| 8th byte | 7th byte | 6th byte | 5th byte | 4th byte | 3rd byte | 2nd byte | 1st byte |
-------------------------------------------------------------------------------------------------------------------------
| wire code | permission | type | application |
-------------------------------------------------------------------------------------------------------------------------
- Author:
- Ramon Servadei
Methods inherited from class fulmine.model.field.AbstractField |
addedToContainer, doComponentDestroy, getApplication, getContainer, getPermission, notifyEvent, removedFromContainer, setApplication, setContainer, setPermission, setValueFromString, toDetailedString, toIdentityString |
Methods inherited from class fulmine.model.component.AbstractComponent |
addEvent, addListener, checkClone, clone, createIdentityString, doDestroy, doPostAddListener, doPostRemoveListener, doStart, getAddress, getAddressable, getDomain, getDrivingFrame, getEventSourceGroupId, getFrame, getIdentity, getIdentityString, getListeners, getSource, getTriggerEvent, getType, isClone, readState, removeListener, removeListeners, setDrivingFrame, setFrame, setTriggerEvent, writeState |
Methods inherited from interface fulmine.model.field.IField |
clone |
DescriptorField
public DescriptorField(String identity)
- Standard constructor
- Parameters:
identity
- the identity of this field AND the identity of the field this
describes
getLog
protected AsyncLog getLog()
- Description copied from class:
AbstractLifeCycle
- Get the log to use for the object hierarchy
- Overrides:
getLog
in class AbstractComponent
- Returns:
- the log to use for the object hierarchy
createField
public IField createField()
setWireCode
public void setWireCode(int wireCode)
setDataType
public void setDataType(byte type)
getWireCode
public int getWireCode()
getDataType
public byte getDataType()
doReadState
protected boolean doReadState(IOperationScope scope,
byte[] buffer,
int start,
int numberOfBytes)
throws Exception
- Description copied from class:
AbstractComponent
- Update the component state from the wire format state in the buffer.
Any nested fields must be read using their
AbstractComponent.readState(IOperationScope, byte[], int, int)
method.
- Specified by:
doReadState
in class AbstractComponent
- Returns:
- true if the read operation succeded.
- Throws:
Exception
- See Also:
IWireState.readState(IOperationScope, byte[], int, int)
doWriteState
protected boolean doWriteState(IOperationScope scope,
IWireIdentity wireId,
byte[][] headerBuffer,
int[] headerBufferPosition,
byte[][] dataBuffer,
int[] dataBufferPosition,
boolean completeState)
throws Exception
- Description copied from class:
AbstractComponent
- Write the component state in its wire form to the buffer. Any
nested fields must be written by calling their
AbstractComponent.writeState(IOperationScope, IWireIdentity, byte[][], int[], byte[][], int[], boolean)
method.
- Specified by:
doWriteState
in class AbstractComponent
- Returns:
- true if the write operation succeeded
- Throws:
Exception
- See Also:
IWireState.writeState(IOperationScope, IWireIdentity, byte[][],
int[], byte[][], int[], boolean)
,
for a discussion of the byte[][] usage
getValueAsString
public String getValueAsString()
- Description copied from interface:
IField
- Get the value of this field as a string.
- Returns:
- a string representing the value of this field.
getValue
public Object getValue()
- Description copied from interface:
IField
- Get the field value
- Returns:
- the field type
toString
public String toString()
- Overrides:
toString
in class AbstractField
hashCode
public int hashCode()
- Overrides:
hashCode
in class AbstractField
equals
public boolean equals(Object obj)
- Overrides:
equals
in class AbstractField
Copyright © 2007-2009. All Rights Reserved.