|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgr.uoa.di.madgik.grs.record.field.Field
public abstract class Field
This class is the base class for all Fields that are handled by the gRS2 set of components. All implementations
of this abstract class must define a default constructor without arguments as instances of these classes will be instantiated
using reflection based on the existence of a default no arguments constructor
| Constructor Summary | |
|---|---|
Field()
|
|
| Method Summary | |
|---|---|
void |
bind(Record record)
Binds the Field to a specific Record that hsots it |
void |
deflate(java.io.DataOutput out)
Deflates the state and data of the implementor in a from capable of reconstructing the exact same instance |
void |
dispose()
Disposes all internal state and invokes extendDispose() |
abstract void |
extendDeflate(java.io.DataOutput out)
Method that needs to be implemented by the class extenders to deflate the information they keep |
abstract void |
extendDispose()
Method to be implemented by class extenders to dispose their internal state |
abstract void |
extendFromXML(org.w3c.dom.Element element,
boolean reset)
|
abstract void |
extendInflate(java.io.DataInput in,
boolean reset)
Method that needs to be implemented by the Field extenders to inflate their internal information |
abstract void |
extendReceive(java.io.DataInput in,
IBuffer.TransportOverride override)
Method that needs to be implemented by the Field extenders to receive their priveously send information |
abstract void |
extendReceiveFromXML(org.w3c.dom.Element element,
IBuffer.TransportOverride override)
|
abstract void |
extendSend(java.io.DataOutput out,
IBuffer.TransportOverride override)
Method that needs to be implemented by the class extenders to send the information they keep |
abstract void |
extendSendToXML(org.w3c.dom.Document doc,
org.w3c.dom.Element element,
IBuffer.TransportOverride override)
|
abstract void |
extendToXML(org.w3c.dom.Document doc,
org.w3c.dom.Element element)
|
void |
fromXML(org.w3c.dom.Element element)
|
void |
fromXML(org.w3c.dom.Element element,
boolean reset)
|
int |
getDefinitionIndex()
Retrieves the index of the FieldDefinition within the RecordDefinition of the bound Record |
FieldDefinition |
getFieldDefinition()
Retrieves the FieldDefinition based on the definition index and the bound Record RecordDefinition |
abstract java.io.InputStream |
getInputStream()
Provides an InputStream over the locally available payload of the Field |
MediatingInputStream |
getMediatingInputStream()
Retrieves an MediatingInputStream over this Field |
void |
inflate(java.io.DataInput in)
Inflate the state and data of the implementor as was previously deflated using IPumpable.deflate(DataOutput) |
void |
inflate(java.io.DataInput in,
boolean reset)
Inflate the state and data of the implementor as was previously deflated using IPumpable.deflate(DataOutput) |
abstract boolean |
isAvailable()
Method that needs to be implemented by class extenders to indicate in case of a remote field copy when the field is not expecting any more data from its original instance. |
boolean |
isRemoteCopy()
Checks if the instance is a remote copy of the original |
void |
makeAvailable()
Makes fully available the content of the Field by invoking Field#makeAvailable(TransportOverride) with a
IBuffer.TransportOverride.Override value |
void |
makeAvailable(IBuffer.TransportOverride override)
Invokes the bound Record's Record#requestPartial(TransportOverride, int) method with the provided
IBuffer.TransportOverride value |
void |
makeLocal()
Called by Record.makeLocal(). |
void |
prebind(Record record)
Pre-binds the Field to the provided Record |
void |
receive(java.io.DataInput in)
Receives the information send by a respective call to send(DataOutput). |
void |
receiveFromXML(org.w3c.dom.Element element)
|
IBuffer.TransportDirective |
resolveTransportDirective()
Resolves the transport directive that needs to be used by this Field. |
void |
send(java.io.DataOutput out)
Sets the state and information of this Field in the provided stream. |
org.w3c.dom.Element |
sendToXML(org.w3c.dom.Document doc)
|
void |
setDefinitionIndex(int index)
Sets the index of the FieldDefinition within the RecordDefinition of the bound Record |
void |
setRemoteCopy(boolean remoteCopy)
Sets whether this instance of the Field is a remote copy of the original Field |
org.w3c.dom.Element |
toXML(org.w3c.dom.Document doc)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Field()
| Method Detail |
|---|
public void setDefinitionIndex(int index)
FieldDefinition within the RecordDefinition of the bound Record
index - the indexpublic int getDefinitionIndex()
FieldDefinition within the RecordDefinition of the bound Record
public void bind(Record record)
Field to a specific Record that hsots it
record - the recordpublic void prebind(Record record)
Field to the provided Record
record - public void setRemoteCopy(boolean remoteCopy)
Field is a remote copy of the original Field
remoteCopy - whether or not it is a remote copypublic boolean isRemoteCopy()
public FieldDefinition getFieldDefinition()
throws GRS2RecordDefinitionException
FieldDefinition based on the definition index and the bound Record RecordDefinition
GRS2RecordDefinitionException - if the Field is not bound to a Record or no usable definition has been found
public IBuffer.TransportDirective resolveTransportDirective()
throws GRS2RecordDefinitionException,
GRS2BufferException
Field. If the defined IBuffer.TransportDirective is set
to IBuffer.TransportDirective.Inherit, the bound record's Record.resolveTransportDirective() is used
IBuffer.TransportDirective
GRS2RecordDefinitionException - The bound Record's definition could not be retrieved
GRS2BufferException - the IBuffer state does not allow for this operation to be completed
public final void deflate(java.io.DataOutput out)
throws GRS2RecordSerializationException
Field in the provided stream. After deflating the internally kept information,
extendDeflate(DataOutput) is invoked for class extenders to persist their information
deflate in interface IPumpableout - the stream to writer information to
GRS2RecordSerializationException - There was a problem in the serialization
public final org.w3c.dom.Element toXML(org.w3c.dom.Document doc)
throws GRS2RecordSerializationException
toXML in interface IPumpableGRS2RecordSerializationException
public final void fromXML(org.w3c.dom.Element element)
throws GRS2RecordSerializationException
fromXML in interface IPumpableGRS2RecordSerializationException
public final void fromXML(org.w3c.dom.Element element,
boolean reset)
throws GRS2RecordSerializationException
GRS2RecordSerializationException
public final void send(java.io.DataOutput out)
throws GRS2RecordSerializationException
Field in the provided stream. After sending the internally kept information,
Field#extendSend(DataOutput, TransportOverride) is invoked for class extenders to persist their information
out - the stream to send information to
GRS2RecordSerializationException - There was a problem in the serialization
public final org.w3c.dom.Element sendToXML(org.w3c.dom.Document doc)
throws GRS2RecordSerializationException
GRS2RecordSerializationException
public final void receiveFromXML(org.w3c.dom.Element element)
throws GRS2RecordSerializationException
GRS2RecordSerializationExceptionpublic final void makeLocal()
Record.makeLocal(). External use is unnecessary and discouraged.
Resets any information which indicate previous executed transfers and makes the Field behave as if it were local.
If partial transfers are involved makeAvailable() should be invoked beforehand in case the full payload is needed.
This method has no effect if the Field is created locally or retrieved by the same IBuffer instance the producer used
public abstract void extendDeflate(java.io.DataOutput out)
throws GRS2RecordSerializationException
out - the stream to deflate to
GRS2RecordSerializationException - There was a problem in the serialization
public abstract void extendToXML(org.w3c.dom.Document doc,
org.w3c.dom.Element element)
throws GRS2RecordSerializationException
GRS2RecordSerializationException
public abstract void extendFromXML(org.w3c.dom.Element element,
boolean reset)
throws GRS2RecordSerializationException
GRS2RecordSerializationException
public abstract void extendSend(java.io.DataOutput out,
IBuffer.TransportOverride override)
throws GRS2RecordSerializationException
out - the stream to send information tooverride - the IBuffer.TransportOverride directive
GRS2RecordSerializationException - There was a problem in the serialization
public final void inflate(java.io.DataInput in)
throws GRS2RecordSerializationException
IPumpable.deflate(DataOutput)
Similar as calling inflate(DataInput, boolean) with a reset parameter of false
inflate in interface IPumpablein - the stream to inflate from
GRS2RecordSerializationException - the inflate could not be completedinflate(DataInput),
IPumpable.inflate(DataInput)
public final void inflate(java.io.DataInput in,
boolean reset)
throws GRS2RecordSerializationException
IPumpable.deflate(DataOutput)
Inflates a Field that was previously deflated using deflate(DataOutput). After the Field
deflate's its internal information, the extendInflate(DataInput, boolean) is invoked
inflate in interface IPumpablein - the stream to inflate fromreset - whether or not the inflated information needs to be reset to clear any indication of previous executed transfers
GRS2RecordSerializationException - There was a problem in the deserialization
public final void receive(java.io.DataInput in)
throws GRS2RecordSerializationException
send(DataOutput). After the internally kept information are read,
the stream is passed to Field#extendReceive(DataInput, TransportOverride)
in - the stream to read from
GRS2RecordSerializationException - There was a problem in the deserialization
public abstract void extendInflate(java.io.DataInput in,
boolean reset)
throws GRS2RecordSerializationException
Field extenders to inflate their internal information
in - the stream to inflate fromreset - whether or not the inflated information needs to be reset to clear any indication of previous executed transfers
GRS2RecordSerializationException - There was a problem in the deserialization
public abstract void extendReceive(java.io.DataInput in,
IBuffer.TransportOverride override)
throws GRS2RecordSerializationException
Field extenders to receive their priveously send information
in - the stream to receive fromoverride - the IBuffer.TransportOverride to use
GRS2RecordSerializationException - There was a problem in the deserializationpublic void dispose()
extendDispose()
public abstract void extendDispose()
public abstract boolean isAvailable()
public void makeAvailable()
throws GRS2RecordDefinitionException,
GRS2BufferException,
GRS2ProxyMirrorException
Field by invoking Field#makeAvailable(TransportOverride) with a
IBuffer.TransportOverride.Override value
GRS2RecordDefinitionException - the definition of the bound record could not be utilized
GRS2BufferException - the state of the IBuffer does not permit this operation to be completed
GRS2ProxyMirrorException - The state of the mirroring protocol does not permit for this operation to be completed
public void makeAvailable(IBuffer.TransportOverride override)
throws GRS2RecordDefinitionException,
GRS2BufferException,
GRS2ProxyMirrorException
Record's Record#requestPartial(TransportOverride, int) method with the provided
IBuffer.TransportOverride value
override - the IBuffer.TransportOverride to use
GRS2RecordDefinitionException - the definition of the bound record could not be utilized
GRS2BufferException - the state of the IBuffer does not permit this operation to be completed
GRS2ProxyMirrorException - The state of the mirroring protocol does not permit for this operation to be completed
public abstract java.io.InputStream getInputStream()
throws java.io.IOException
InputStream over the locally available payload of the Field
java.io.IOException - The input stream could not be created
public MediatingInputStream getMediatingInputStream()
throws java.io.IOException,
GRS2RecordMediationException
MediatingInputStream over this Field
java.io.IOException - the stream could not be created
GRS2RecordMediationException - the mediated stream could not be created
public abstract void extendSendToXML(org.w3c.dom.Document doc,
org.w3c.dom.Element element,
IBuffer.TransportOverride override)
throws GRS2RecordSerializationException
GRS2RecordSerializationException
public abstract void extendReceiveFromXML(org.w3c.dom.Element element,
IBuffer.TransportOverride override)
throws GRS2RecordSerializationException
GRS2RecordSerializationException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||