fulmine.model.container.impl
Class Record

java.lang.Object
  extended by fulmine.AbstractLifeCycle
      extended by fulmine.model.component.AbstractComponent
          extended by fulmine.model.container.AbstractContainer
              extended by fulmine.model.container.AbstractEventProcessingContainer
                  extended by fulmine.model.container.AbstractDynamicContainer
                      extended by fulmine.model.container.impl.Record
All Implemented Interfaces:
IEvent, IEventFrame, IEventSource, IAddressable, IDescriptor, IDestroyable, ILifeCycle, IComponent, IContainer, IRemoteSubscribable, IWireState, Cloneable

public class Record
extends AbstractDynamicContainer

This is a dynamic container implementation. This implementation is thread safe.

A record can be used as a base-class or as an outright class. If used outright, it serves as a general purpose data construct that can be used in the event distribution framework with no extra user code required other than to populate the record. It is safe to simply construct the record instances using the Record#Record(String) constructor when used as a dynamic, general purpose, construct.

When used as a base-class, user code is required if the record sub-class is to participate in the event distribution framework. The appropriate user coded IContainerFactory.IContainerBuilder must be registered via the ContainerFactory for the record sub-class in the remote fulmine context instance. If this is not performed, the remote context will default to creating a standard record instance. Instances must also only be created using the ContainerFactory#createContainer(String, int) method.

A record can also be used as the base-class for a static container implementation. The IContainerFactory.IContainerBuilder will define the IContainerDefinitionField. The same base-class rules described in the preceding paragraph apply.

Author:
Ramon Servadei
See Also:
ContainerFactory

Nested Class Summary
 
Nested classes/interfaces inherited from class fulmine.model.container.AbstractDynamicContainer
AbstractDynamicContainer.ReaderTask
 
Nested classes/interfaces inherited from interface fulmine.model.container.IContainer
IContainer.DataState
 
Field Summary
 
Fields inherited from class fulmine.model.container.AbstractEventProcessingContainer
events
 
Constructor Summary
Record(String nativeContextIdentity, String identity, IType type, IDomain domain, IFrameworkContext hostContext, boolean local)
          Type specific constructor that allows the record to be constructed with a user defined type.
 
Method Summary
protected  AsyncLog getLog()
          Get the log to use for the object hierarchy
 
Methods inherited from class fulmine.model.container.AbstractDynamicContainer
afterAdd, afterRemove, getDefinition, getFieldsToWrite, isDynamic, newReaderTask
 
Methods inherited from class fulmine.model.container.AbstractEventProcessingContainer
addEvent, clone, doCommitEvents, doComponentDestroy, doStateChangeOp, getChangedFields
 
Methods inherited from class fulmine.model.container.AbstractContainer
add, beforeAdd, beforeRemove, beginFrame, contains, doPostAddListener, doPostRemoveListener, doReadState, doStart, doWriteState, endFrame, equals, flushFrame, get, getBooleanField, getComponentIdentities, getContext, getDataState, getDoubleField, getFields, getFloatField, getFrameIdentifier, getIntegerField, getLongField, getNativeContextIdentity, getRemoteSubscriptionCount, getStringField, hashCode, isEmpty, isEventFrameThread, isFrameActive, isLocal, isRemote, lockFrame, logNotTheEventFrameThread, markForRemoteSubscription, remove, setState, size, toDetailedString, toString, unmarkForRemoteSubscription
 
Methods inherited from class fulmine.model.component.AbstractComponent
addListener, checkClone, createIdentityString, doDestroy, getAddress, getAddressable, getDomain, getDrivingFrame, getEventSourceGroupId, getFrame, getIdentity, getIdentityString, getListeners, getSource, getTriggerEvent, getType, isClone, readState, removeListener, removeListeners, setDrivingFrame, setFrame, setTriggerEvent, toIdentityString, 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.container.IContainer
destroy, getType, isClone, start
 
Methods inherited from interface fulmine.protocol.wire.IWireState
readState, writeState
 
Methods inherited from interface fulmine.event.IEventSource
addListener, getEventSourceGroupId, getListeners, removeListener, removeListeners
 
Methods inherited from interface fulmine.IDescriptor
toIdentityString
 
Methods inherited from interface fulmine.ILifeCycle
isActive
 
Methods inherited from interface fulmine.IAddressable
getAddress, getDomain, getIdentity
 
Methods inherited from interface fulmine.event.IEvent
getDrivingFrame, getFrame, getSource, getTriggerEvent, setTriggerEvent
 
Methods inherited from interface fulmine.IDescriptor
toIdentityString
 
Methods inherited from interface fulmine.IAddressable
getAddress, getDomain, getIdentity
 

Constructor Detail

Record

public Record(String nativeContextIdentity,
              String identity,
              IType type,
              IDomain domain,
              IFrameworkContext hostContext,
              boolean local)
Type specific constructor that allows the record to be constructed with a user defined type. By default, the ContainerFactory will construct a Record if no IContainerFactory.IContainerBuilder has been registered. This should be fine for use cases where a dynamic record of this type is required. When a static record of this type is required, a builder has to be registered in the remote context against the type argument, otherwise a dynamic version will be created.

Parameters:
nativeContextIdentity - the name of the context this record is native to; the name of its local context
identity - the identity for the record
type - the integer type for this record, must commence from Type.RECORD)
domain - the domain for the record
hostContext - the context hosting this record instance
local - true the container is local to this context
Method Detail

getLog

protected AsyncLog getLog()
Description copied from class: AbstractLifeCycle
Get the log to use for the object hierarchy

Overrides:
getLog in class AbstractEventProcessingContainer
Returns:
the log to use for the object hierarchy


Copyright © 2007-2009. All Rights Reserved.