DESY ACOP Beans Home

com.cosylab.gui.displayers
Interface DataConsumer

All Known Subinterfaces:
AcopDisplayer, AsynchronousNumberConsumer, AsynchronousObjectConsumer, AsynchronousStringConsumer, Converter, ConvertibleDisplayer, Displayer, DoubleConsumer, DoubleDisplayer, DoubleSeqConsumer, DoubleSeqDisplayer, EnumDisplayer, IconDisplayer, LongConsumer, LongDisplayer, LongSeqConsumer, NonblockingNumberConsumer, NonblockingObjectConsumer, NonblockingStringConsumer, NumberConsumer, ObjectConsumer, ObjectDisplayer, ObjectSeqConsumer, PatternConsumer, PatternDisplayer, StringConsumer, StringDisplayer, StringSeqConsumer, SynchronousNumberConsumer, SynchronousObjectConsumer, SynchronousStringConsumer
All Known Implementing Classes:
AbstractConverter, AbstractDisplayerPanel, AcopBitTableColumn, AcopButton, AcopChartConsumer, AcopChartConsumer, AcopCheckBox, AcopDialKnob, AcopGauger, AcopIcon, AcopLabel, AcopNumberLabel, AcopNumericTableColumn, AcopSlider, AcopStringTableColumn, AcopTableColumn, AcopTrendChartConsumer, AcopWheelswitch, AsynchronousDispatcher, ButtonController, CharacteristicsMapPanel, CheckBoxController, ConverterChain, DataConsumerDispatcher, DataInterceptor, DialKnobDisplayer, DoubleConsumerMulticaster, DoubleNumberDisplayer, DoubleSeqConsumerMulticaster, ExponentialConverter, FeedbackConsumerSupport, GaugerDisplayer, IconDisplayer, IdentityConverter, LabelDisplayer, LinearConverter, LogarithmicConverter, LongConsumerMulticaster, MinimalDataConsumer, MultiplierConverter, NonblockingNumberDispatcher, ObjectConsumerMulticaster, OnApplyDispatcher, PatternConsumerMulticaster, PotentialConverter, ReverseConsumer, SimpleArrayConverterSupport, SimpleConverterSupport, SliderDisplayer, SliderDisplayerSetter, StringConsumerMulticaster, SynchronousNumberDispatcher, WheelswitchDisplayer

public interface DataConsumer

DataConsumer interface defines receiver for udates of

Combunation of daata consumer and data source is data pipe. It could be used for data riltering or editing.

By default all data consumers are synchronous: they returns method call when update was successfull of fail with exception.

Since:
Nov 24, 2003.
Version:
$Id: DataConsumer.java,v 1.4 2008-04-22 12:31:02 jbobnar Exp $
Author:
Igor Kriznar

Method Summary
<D extends DataConsumer>
D
getDataConsumer(java.lang.Class<D> type)
           Returns data consumer for requested data consumer type.
 DataConsumer getDefaultDataConsumer()
          Returns the implementation of default consumer type supported by this data consumer.
 java.lang.String getName()
          Returns name of this data consumer.
 java.lang.String[] getSupportedCharacteristics()
          Resturns array with names of supported characteristics.
 java.lang.Class<DataConsumer>[] getSupportedConsumerTypes()
          Returns array of supported data consumer types, which can be used as parameter and returnned with getDataCosnumer(Class) method.
 void setCharacteristics(java.util.Map characteristics)
          Sets new dynamic value characteristics to this data consumer.
 void updateDataState(DataState state)
          Push data state (quality) update change for dynamic value.
 

Method Detail

getDataConsumer

<D extends DataConsumer> D getDataConsumer(java.lang.Class<D> type)

Returns data consumer for requested data consumer type. If this data consumer does not support required data consumer, null is returned.

If this data cosnumer does not support specific data consumer type, then it means, that it is not desirable to cast data of that type to any by this consumer supported data consumer types.

Parameters:
type - Class of specific data consumer (e.g. DoubleConsumer)
Returns:
implementation of required data consumer or null if not supported

getDefaultDataConsumer

DataConsumer getDefaultDataConsumer()
Returns the implementation of default consumer type supported by this data consumer.

Returns:
the implementation of default consumer type supported by this data consumer

updateDataState

void updateDataState(DataState state)
Push data state (quality) update change for dynamic value. Usually called by data source.

Parameters:
state - new data state(quality) descriptor

setCharacteristics

void setCharacteristics(java.util.Map characteristics)
Sets new dynamic value characteristics to this data consumer. This is usually called only at initializaation, before first data state or value is updated. Usually carries characteristics such as value minimum or maximum. Name and meaning of atributes is defined with contract betwean data consumer and source implementation.

Parameters:
characteristics - the Map with attri

getName

java.lang.String getName()
Returns name of this data consumer.

Returns:
the name of this data consumer

getSupportedCharacteristics

java.lang.String[] getSupportedCharacteristics()
Resturns array with names of supported characteristics. Data source can use this method to optimize setting characteristics to this data consumer. If arrray of length 0 is return, then consumer does not need or support any characteristic. If null is returned, than consumer expect all existing characteristics from data source.

Returns:
array with names of supported characteristics

getSupportedConsumerTypes

java.lang.Class<DataConsumer>[] getSupportedConsumerTypes()
Returns array of supported data consumer types, which can be used as parameter and returnned with getDataCosnumer(Class) method.

Returns:
array of supported data consumer types


Copyright © 2010. All Rights Reserved.