|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IField
A field represents a property of an entity. The entity is represented by an
IContainer
. A field can be naturally added to a container and becomes
part of the container's state.
A field is wire-state aware; it knows its data type and also includes the logic to read and write its identity and data into byte[] form. The reading and writing is an asymmetrical operation; a field can write its identity and data to a byte[] but can only read the data from the byte[], it cannot read its identity from a byte[], that is the responsibility of the parent container. This is because a container receives the wire frame and needs to locate each field expressed in the wire frame and pass the byte[] to the field.
A field can have a non-unique wire identity so long as no other field in the container shares the same wire identity. As an example, a field with a wire value 'XYZ' can identify a 'foo' field in record type A and a 'bar' field in record type B. These records are separate objects that will be sent as separate wire messages and so can share the same field wire value.
Note fields are equal by their type and encapsulated property value. Equality does not take into account the record of the field. Thus if 2 fields both called 'foo', belonging to different records, have the same type and value, they are equal.
Fields are given a permission by the creating application code. This permission governs whether receiving contexts can view the field's value.
IWireState
,
IWireIdentity
,
IPermissionProfile
Method Summary | |
---|---|
void |
addedToContainer(IContainer container)
Signals the field that it has been added to a container. |
Object |
clone()
Clone this. |
byte |
getApplication()
Get the application code for the field. |
IContainer |
getContainer()
Get the container this field has been added to |
short |
getPermission()
Get the permission code for the field. |
Object |
getValue()
Get the field value |
String |
getValueAsString()
Get the value of this field as a string. |
void |
removedFromContainer(IContainer container)
Signals the field that it has been removed from a container. |
boolean |
setValueFromString(String value)
Set the field value from the string. |
Methods inherited from interface fulmine.protocol.wire.IWireState |
---|
readState, writeState |
Methods inherited from interface fulmine.event.IEventSource |
---|
addEvent, addListener, getEventSourceGroupId, getListeners, removeListener, removeListeners |
Methods inherited from interface fulmine.IDescriptor |
---|
toDetailedString, toIdentityString |
Methods inherited from interface fulmine.ILifeCycle |
---|
isActive, start |
Methods inherited from interface fulmine.IDestroyable |
---|
destroy |
Methods inherited from interface fulmine.IAddressable |
---|
getAddress, getDomain, getIdentity, getType |
Methods inherited from interface fulmine.event.IEvent |
---|
getDrivingFrame, getFrame, getSource, getTriggerEvent, setTriggerEvent |
Methods inherited from interface fulmine.IDescriptor |
---|
toDetailedString, toIdentityString |
Methods inherited from interface fulmine.IAddressable |
---|
getAddress, getDomain, getIdentity, getType |
Method Detail |
---|
void addedToContainer(IContainer container)
container
- the container that now has a reference to thisIContainer getContainer()
IContainer
this belongs tovoid removedFromContainer(IContainer container)
container
- the container that removed a reference to thisObject clone() throws CloneNotSupportedException
clone
in interface IEvent
CloneNotSupportedException
Object.clone()
String getValueAsString()
Object getValue()
short getPermission()
IPermissionProfile
byte getApplication()
IPermissionProfile
boolean setValueFromString(String value)
false
or throws a
RuntimeException
.
value
- the value to set
true
if the value changed, false
if it
did not or there was a problem converting the string to the
field's data format
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |