DESY ACOP Beans Home

com.cosylab.gui.displayers
Interface MultipleDataConsumer

All Known Subinterfaces:
MultipleAcopDisplayer<T>, MultipleDisplayer
All Known Implementing Classes:
AcopChart, AcopChartReorg, AcopTable, AcopTrendChart

public interface MultipleDataConsumer

MultipleDataConsumer is data consumer, which is able to process at the same time several dynamic data sources by allocation own simple data consumer for each source.

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

Method Summary
<D extends DataConsumer>
D
getConsumer(java.lang.String name, java.lang.Class<D> type)
           Returns data consumer of specified data consumer type and for specified string name.
 DataConsumer[] getConsumers()
          Returns all data consumers created by this multiple data consumer.
 java.lang.Class<DataConsumer>[] getSupportedConsumerTypes()
          Returns array of supported data consumer types, which can be used as parameter and returnned with getConsumer(String,Class) method.
 void releaseConsumer(DataConsumer consumer)
          Requests frm this multiple consumer to release all resources connectet to provided single consumer.
 

Method Detail

getConsumer

<D extends DataConsumer> D getConsumer(java.lang.String name,
                                       java.lang.Class<D> type)

Returns data consumer of specified data consumer type and for specified string name. The organization of data is indicated with name (list, table, tree organization). Multiple consumer might interprete this by it's own preferences or abilities. The name of returned consuer must equals to provided name.

Example. Names: PS1/current, PS1/readback, PS2/current, PS2/readback migth table displayer interprete as two rows (PS1 and PS2) wtih two columns (current and readback). Tree displayer migth interprete this names as two branches with two subbranches.

Note that name is not fixed consumer property. Some displayers migth expect for name to be same as DISPLAY_NAME and is changed if display name is changed.

Parameters:
name - organized data name
type - required data soncumer type
Returns:
newly allocated consumer for required name and type

releaseConsumer

void releaseConsumer(DataConsumer consumer)
Requests frm this multiple consumer to release all resources connectet to provided single consumer. Provided consumer must be created by this multiple consumer.

Parameters:
consumer - the consumer to be released

getConsumers

DataConsumer[] getConsumers()
Returns all data consumers created by this multiple data consumer.

Returns:
all data consumers created by this multiple data consumer

getSupportedConsumerTypes

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

Returns:
array of supported data consumer types


Copyright © 2010. All Rights Reserved.