|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfulmine.AbstractLifeCycle
fulmine.model.component.AbstractComponent
fulmine.model.field.AbstractField
fulmine.model.field.containerdefinition.ContainerDefinitionField
public final class ContainerDefinitionField
Default implementation of an IContainerDefinitionField. The
definition is made up of DescriptorField fields. These descriptor
fields provide the necessary meta data for a transmitting container to write
an IField using its wire identity and provides the receiving
container with the information to construct the correct field type.
The fields of this implementation have SWF wire identities. There is no way to send the definition using IWF as, by design, the IWF code maps to a field and this is one of the functions the definition provides.
Static definitions are 'singletons'; all containers of the same type share the same static definition. Static definitions are not sent on-the-wire or mutated.
| Constructor Summary | |
|---|---|
ContainerDefinitionField(AbstractDynamicContainer container)
Constructor for a dynamic definition |
|
ContainerDefinitionField(String definition,
IField... fields)
Constructor for a static definition |
|
| Method Summary | |
|---|---|
void |
add(IField field)
Add the field to the definition. |
Object |
clone()
Clone this. |
boolean |
containsDefinition(int wireCode)
Determines if the container definition contains a DescriptorField
for a field identified by its integer wire identity. |
IField |
createField(int wireCode)
Create the field identified by its wire code. |
protected void |
doComponentDestroy()
The destroy method that is invoked on a non-cloned version of this. |
protected boolean |
doReadState(IOperationScope scope,
byte[] buffer,
int start,
int numberOfBytes)
Update the component state from the wire format state in the buffer. |
protected boolean |
doWriteState(IOperationScope scope,
IWireIdentity wireId,
byte[][] headerBuffer,
int[] headerBufferPosition,
byte[][] dataBuffer,
int[] dataBufferPosition,
boolean completeState)
Write the component state in its wire form to the buffer. |
boolean |
equals(Object obj)
|
byte |
getApplication(int wireCode)
Get the application code for the field identified by its wire identity |
String[] |
getComponentIdentities()
|
String |
getIdentityFor(IWireIdentity wireId)
Get the identity assigned to the wire identity |
String |
getIdentityForWireCode(int wireCode)
Get the IWF wire identity code |
protected AsyncLog |
getLog()
Get the log to use for the object hierarchy |
short |
getPermission(int wireCode)
Get the permission code for the field identified by its wire identity |
Object |
getValue()
Get the field value |
String |
getValueAsString()
Get the value of this field as a string. |
int |
getWireCodeForIdentity(String identity)
Get the IWF wire identity code for the IField identified by the
string |
IWireIdentity |
getWireIdentityFor(String identity)
Get the wire identity assigned for an identity |
boolean |
isDynamic()
Identify if the definition is dynamic (i.e. |
void |
populate(IContainer container)
Create the fields in the container from this definition. |
void |
remove(IField field)
Remove the DescriptorField with the same identity as the field
argument from this definition. |
void |
resetChanges()
Reset all changes. |
| Methods inherited from class fulmine.model.field.AbstractField |
|---|
addedToContainer, getApplication, getContainer, getPermission, hashCode, notifyEvent, removedFromContainer, setApplication, setContainer, setPermission, setValueFromString, toDetailedString, toIdentityString, toString |
| Methods inherited from class fulmine.model.component.AbstractComponent |
|---|
addEvent, addListener, checkClone, 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 class fulmine.AbstractLifeCycle |
|---|
checkActive, destroy, finalize, isActive, start |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface fulmine.model.field.IField |
|---|
addedToContainer, getApplication, getContainer, getPermission, removedFromContainer, setValueFromString |
| 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 |
| Constructor Detail |
|---|
public ContainerDefinitionField(String definition,
IField... fields)
definition - the unique name for the definitionpublic ContainerDefinitionField(AbstractDynamicContainer container)
container - a dynamic container (can have new fields added/removed)| Method Detail |
|---|
protected AsyncLog getLog()
AbstractLifeCycle
getLog in class AbstractComponentpublic boolean isDynamic()
IContainerDefinitionField
isDynamic in interface IContainerDefinitionFieldtrue if the definition is dynamicpublic void add(IField field)
IContainerDefinitionFieldDescriptorField is constructed to represent the field. The
descriptor field is held in the definition.
add in interface IContainerDefinitionFieldfield - the field to represent with a DescriptorFieldpublic void remove(IField field)
IContainerDefinitionFieldDescriptorField with the same identity as the field
argument from this definition.
remove in interface IContainerDefinitionFieldfield - the field representation to remove from the definitionpublic String getIdentityFor(IWireIdentity wireId)
IWireIdentityRegistry
getIdentityFor in interface IWireIdentityRegistrywireId - the wire identity to find the plain identity for
String identity assigned to this wire identitypublic IWireIdentity getWireIdentityFor(String identity)
IWireIdentityRegistry
getWireIdentityFor in interface IWireIdentityRegistryidentity - the identity to find the assigned wire identity for
IWireIdentity assigned to this identitypublic String getIdentityForWireCode(int wireCode)
IContainerDefinitionField
getIdentityForWireCode in interface IContainerDefinitionFieldwireCode - the integer value of the IWF wire identity
IField declared for
this IWF wire identitypublic int getWireCodeForIdentity(String identity)
IContainerDefinitionFieldIField identified by the
string
getWireCodeForIdentity in interface IContainerDefinitionFieldidentity - the string identity of the IField to find
IField
protected boolean doReadState(IOperationScope scope,
byte[] buffer,
int start,
int numberOfBytes)
throws Exception
AbstractComponentAbstractComponent.readState(IOperationScope, byte[], int, int) method.
doReadState in class AbstractComponentExceptionIWireState.readState(IOperationScope, byte[], int, int)
protected boolean doWriteState(IOperationScope scope,
IWireIdentity wireId,
byte[][] headerBuffer,
int[] headerBufferPosition,
byte[][] dataBuffer,
int[] dataBufferPosition,
boolean completeState)
throws Exception
AbstractComponentAbstractComponent.writeState(IOperationScope, IWireIdentity, byte[][], int[], byte[][], int[], boolean)
method.
doWriteState in class AbstractComponentExceptionIWireState.writeState(IOperationScope, IWireIdentity, byte[][],
int[], byte[][], int[], boolean),
for a discussion of the byte[][] usagepublic void populate(IContainer container)
IContainerDefinitionField
populate in interface IContainerDefinitionFieldcontainer - the container to populatepublic String[] getComponentIdentities()
protected void doComponentDestroy()
AbstractComponent
doComponentDestroy in class AbstractFieldpublic String getValueAsString()
IField
getValueAsString in interface IFieldpublic void resetChanges()
IContainerDefinitionField
resetChanges in interface IContainerDefinitionFieldpublic boolean containsDefinition(int wireCode)
IContainerDefinitionFieldDescriptorField
for a field identified by its integer wire identity.
containsDefinition in interface IContainerDefinitionFieldwireCode - the integer wire identity for the field
true if there is a DescriptorField for this
integer wire identitypublic IField createField(int wireCode)
IContainerDefinitionFieldDescriptorField for the wire identity.
createField in interface IContainerDefinitionFieldwireCode - the integer wire identity for the field
IField or null if there was no
DescriptorField for this integer wire identityIContainerDefinitionField.containsDefinition(int)public Object getValue()
IField
getValue in interface IFieldpublic byte getApplication(int wireCode)
IContainerDefinitionField
getApplication in interface IContainerDefinitionFieldwireCode - the integer wire identity for the field
IPermissionProfilepublic short getPermission(int wireCode)
IContainerDefinitionField
getPermission in interface IContainerDefinitionFieldwireCode - the integer wire identity for the field
IPermissionProfilepublic boolean equals(Object obj)
equals in class AbstractField
public Object clone()
throws CloneNotSupportedException
IEvent
clone in interface IEventclone in interface IFieldclone in class AbstractComponentCloneNotSupportedExceptionObject#clone)_
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||