public class FwkInfoBusController extends FwkPort implements FwkInfoBusControllerInterface
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected java.util.Hashtable |
consumerList |
protected int |
priority |
protected java.util.Hashtable |
producerList |
static java.lang.String |
version |
PORT, PORT_ARRAY, PORT_BG, PORT_BG_ARRAY, PORT_BG_LARGE, PORT_BG_LARGE_ARRAY, PORT_LARGE, PORT_LARGE_ARRAY
inAllowed, outAllowed
infoBusMemberSupport
changeManager, properties, suspendChangeManager
source
author, buildnr, className, company, copyright, creationDate, dateFormatString, description, eMail, FWK_ICON, FWK_ICON_ARRAY, FWK_ICON_BG, FWK_ICON_BG_ARRAY, FWK_ICON_BG_LARGE, FWK_ICON_BG_LARGE_ARRAY, FWK_ICON_LARGE, FWK_ICON_LARGE_ARRAY, icon, ICON, iconCount, iconKey, internetAddress, name, titleName
BUSNAME
INFOBUS_SOURCE
AUTHOR, BUILDNR, COMPANY, COPYRIGHT, DATE_FORMAT, DEFAULT_ICON, DESCRIPTION, INTERNET, LARGE_ICON, LARGE_KEY_EXT, LARGE_OPAQUE_ICON, LARGE_OPAQUE_KEY_EXT, OPAQUE_ICON, OPAQUE_KEY_EXT, RCS_DATE_FORMAT, SUPPORT_EMAIL, TITLE_NAME
Modifier | Constructor and Description |
---|---|
protected |
FwkInfoBusController()
The default constructor.
|
|
FwkInfoBusController(java.lang.String memberName,
FwkArrayInterface mimeTypes,
int prio)
The default constructor.
|
|
FwkInfoBusController(java.lang.String memberName,
int prio)
The default constructor.
|
|
FwkInfoBusController(java.lang.String memberName,
java.lang.String[] mimeTypes,
int prio)
The default constructor.
|
|
FwkInfoBusController(java.lang.String memberName,
java.lang.String mimeType,
int prio)
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addDataConsumer(javax.infobus.InfoBusDataConsumer consumer)
Called by the InfoBus each time an InfoBusDataConsumer joins the InfoBus
after the DataController did, to update the
DataController of the addition of the consumer.
|
void |
addDataProducer(javax.infobus.InfoBusDataProducer producer)
Called by the InfoBus each time an InfoBusDataProducer joins the
InfoBus after the DataController did, to update the
DataController of the addition of the producer.
|
protected void |
finalize()
Leave the info at the end of session.
|
boolean |
findDataItem(java.lang.String dataItemName,
java.awt.datatransfer.DataFlavor[] flavors,
javax.infobus.InfoBusDataConsumer consumer,
java.util.Vector foundItem)
Called by the InfoBus when a consumer wishes to find a DataItem matching the
given dataItemName.
|
boolean |
findMultipleDataItems(java.lang.String dataItemName,
java.awt.datatransfer.DataFlavor[] flavors,
javax.infobus.InfoBusDataConsumer consumer,
java.util.Vector foundItems)
Called by the InfoBus when a consumer wishes to find ALL DataItems matching
the given dataItemName.
|
boolean |
fireItemAvailable(java.lang.String dataItemName,
java.awt.datatransfer.DataFlavor[] flavors,
javax.infobus.InfoBusDataProducer producer)
Called by the InfoBus when the producer "source" requests the distribution
of an InfoBusItemAvailable event to consumers on the InfoBus.
|
boolean |
fireItemRevoked(java.lang.String dataItemName,
javax.infobus.InfoBusDataProducer producer)
Called by the InfoBus when a producer requests the distribution of an
InfoBusItemRevoked event to consumers on the InfoBus.
|
FwkControllerInterface |
getController()
Get the controller instance of the application.
|
int |
getPriority()
Retrieves the priority of the controller.
|
java.lang.String |
getVersion()
Return the version string of the FWK component.
|
protected void |
initialize(int prio)
Initislize the component.
|
void |
propertyChange(java.beans.PropertyChangeEvent ev)
Invoked if a property changed.
|
void |
removeDataConsumer(javax.infobus.InfoBusDataConsumer consumer)
Called by the InfoBus each time an InfoBusDataConsumer leaves the InfoBus to
alert the DataController of the change.
|
void |
removeDataProducer(javax.infobus.InfoBusDataProducer producer)
Called by the InfoBus each time an InfoBusDataProducer leaves the InfoBus to
alert the DataController of the change.
|
void |
setConsumerList(java.util.Vector consumers)
Called once by the InfoBus when the DataController adds itself.
|
void |
setController(FwkControllerInterface controller)
Set the controller instance of the application.
|
void |
setInfoBusName(java.lang.String newName)
Set the infobus name.
|
void |
setPriority(int prio)
Set the priority of the controller.
|
void |
setProducerList(java.util.Vector producers)
Called once by the InfoBus when the DataController adds itself.
|
addConsumerMimeType, addProducerMimeType, dataItemAvailable, dataItemRequested, dataItemRevoked, getConsumerDataFlavor, getConsumerDataFlavors, getConsumerMimeTypes, getProducerDataFlavor, getProducerDataFlavors, getProducerMimeTypes, initialize, register, release, removeConsumerMimeType, removeProducerMimeType, unregister
getInAllowed, getOutAllowed, setInAllowed, setOutAllowed
addInfoBusPropertyListener, addInfoBusVetoableListener, getInfoBus, getInfoBusName, getMemberName, isConnected, joinInfoBus, removeInfoBusPropertyListener, removeInfoBusVetoableListener, setInfoBus, setMemberName, setName
addDataItemChangeListener, fireItemAdded, fireItemDeleted, fireItemRevoked, fireItemValueChanged, getName, getProperty, getPropertyGroup, getSource, isChangeManagerSuspended, removeDataItemChangeListener, setProperty, setPropertyGroup, suspendChangeManager
addCommand, addCommand, addToGroup, addToGroup, addVetoableChangeListener, addVetoableChangeListener, clearCommands, commandsAvailable, compareTo, deleteGroup, destroyController, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getAuthor, getBuild, getCommand, getCommands, getCommands, getCompany, getCompanyInternetAddress, getCopyright, getCreationDate, getCreationDate, getDateFormatString, getDescription, getFwkMimeTypes, getGroup, getIcon, getIcon, getIconKey, getIconKey, getPersistentObjectNames, getSupportEMail, getTitle, getTitleName, getVetoableChangeArray, getVetoableChangeListenerArray, getVetoableChangeListenerArray, groupExists, removeCommand, removeFromGroup, removeVetoableChangeListener, removeVetoableChangeListener, setAuthor, setBuild, setCommands, setCompany, setCompanyInternetAddress, setCopyright, setCreationDate, setDateFormatString, setDescription, setDescriptor, setDescriptor, setIcon, setIcon, setIconKey, setIconKey, setSource, setSupportEMail, setTitleName
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeArray, getPropertyChangeListenerArray, getPropertyChangeListenerArray, isPropertyChangeEventSuspended, removePropertyChangeListener, removePropertyChangeListener, suspendPropertyChangeEvents
getClassName, getPresentationString, getPresentationString, getTransferData, getTransferDataFlavors, isDataFlavorSupported, lostOwnership, setClassName, setCreationDate, toString
getNiceVersion
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
addConsumerMimeType, addProducerMimeType, getConsumerDataFlavor, getConsumerDataFlavors, getConsumerMimeTypes, getProducerDataFlavor, getProducerDataFlavors, getProducerMimeTypes, removeConsumerMimeType, removeProducerMimeType
getInAllowed, getOutAllowed, setInAllowed, setOutAllowed
getInfoBusName, getMemberName, isConnected, setMemberName
fireItemAdded, fireItemDeleted, fireItemRevoked, fireItemValueChanged, getProperty, getPropertyGroup, setProperty, setPropertyGroup, suspendChangeManager
getCommands, getPersistentObjectNames
destroyController
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeArray, getPropertyChangeListenerArray, getPropertyChangeListenerArray, isPropertyChangeEventSuspended, removePropertyChangeListener, removePropertyChangeListener, setSource, suspendPropertyChangeEvents
addVetoableChangeListener, addVetoableChangeListener, getVetoableChangeArray, getVetoableChangeListenerArray, getVetoableChangeListenerArray, removeVetoableChangeListener, removeVetoableChangeListener
getAuthor, getBuild, getClassName, getCompany, getCompanyInternetAddress, getCopyright, getCreationDate, getCreationDate, getDateFormatString, getDescription, getIcon, getIcon, getIconKey, getIconKey, getName, getPresentationString, getPresentationString, getSupportEMail, getTitle, getTitleName, setAuthor, setBuild, setClassName, setCompany, setCompanyInternetAddress, setCopyright, setCreationDate, setCreationDate, setDateFormatString, setDescription, setDescriptor, setIcon, setIcon, setIconKey, setIconKey, setName, setSupportEMail, setTitleName
getTransferData, getTransferDataFlavors, isDataFlavorSupported
addCommand, addCommand, addToGroup, addToGroup, clearCommands, commandsAvailable, deleteGroup, getCommand, getCommands, getGroup, groupExists, removeCommand, removeFromGroup, setCommands
getPresentationString, getPresentationString
release
addInfoBusPropertyListener, addInfoBusVetoableListener, getInfoBus, removeInfoBusPropertyListener, removeInfoBusVetoableListener, setInfoBus
public static final java.lang.String version
protected int priority
protected java.util.Hashtable consumerList
protected java.util.Hashtable producerList
protected FwkInfoBusController()
public FwkInfoBusController(java.lang.String memberName, int prio)
memberName
- The name of the infobus member.
Use the member name conventions of the FwkInfoBusMember.mimetypes
- An array constaining the supported mime types.prio
- The priority of the controller.#FwkInfoBusMember.setMemberName
,
#javax.infobus.InfoBus
public FwkInfoBusController(java.lang.String memberName, FwkArrayInterface mimeTypes, int prio)
memberName
- The name of the infobus member.
Use the member name conventions of the FwkInfoBusMember.mimetypes
- An component array constaining the supported mime types.prio
- The priority of the controller.#FwkInfoBusMember.setMemberName
,
#javax.infobus.InfoBus
public FwkInfoBusController(java.lang.String memberName, java.lang.String mimeType, int prio)
memberName
- The name of the infobus member.
Use the member name conventions of the FwkInfoBusMember.mimetype
- A string constaining the supported mime type.prio
- The priority of the controller.#FwkInfoBusMember.setMemberName
,
#javax.infobus.InfoBus
public FwkInfoBusController(java.lang.String memberName, java.lang.String[] mimeTypes, int prio)
memberName
- The name of the infobus member.
Use the member name conventions of the FwkInfoBusMember.mimetypes
- A string array constaining the supported mime types.prio
- The priority of the controller.#FwkInfoBusMember.setMemberName
,
#javax.infobus.InfoBus
public java.lang.String getVersion()
FwkInterface
getVersion
in interface FwkInterface
getVersion
in class FwkPort
protected void finalize() throws java.lang.Throwable
protected void initialize(int prio)
memberName
- The mebername of the component.The
- priority of the controller.public FwkControllerInterface getController()
getController
in interface FwkControlledByInterface
public void setController(FwkControllerInterface controller)
setController
in interface FwkControlledByInterface
controller
- The controller instance of the application.public void setInfoBusName(java.lang.String newName)
setInfoBusName
in interface FwkInfoBusMemberInterface
setInfoBusName
in class FwkPort
The
- new name of the infobus.public void setPriority(int prio)
setPriority
in interface FwkInfoBusControllerInterface
prio
- The priority of the controller.#javax.infobus.InfoBus
public int getPriority()
getPriority
in interface FwkInfoBusControllerInterface
#javax.infobus.InfoBus
public void addDataConsumer(javax.infobus.InfoBusDataConsumer consumer) throws FwkException
addDataConsumer
in interface javax.infobus.InfoBusDataController
consumer
- the DataConsumer now joining the InfoBusa
- FwkException if the limit is reached.FwkException
public void addDataProducer(javax.infobus.InfoBusDataProducer producer)
addDataProducer
in interface javax.infobus.InfoBusDataController
producer
- - the DataProducer now joining the InfoBuspublic void setConsumerList(java.util.Vector consumers)
setConsumerList
in interface javax.infobus.InfoBusDataController
consumers
- the Vector of InfoBusDataConsumers held by the InfoBus
when the DataController added itself to the buspublic void setProducerList(java.util.Vector producers)
setProducerList
in interface javax.infobus.InfoBusDataController
producers
- the Vector of InfoBusDataProducers held by the InfoBus when the
DataController added itself to the buspublic void removeDataConsumer(javax.infobus.InfoBusDataConsumer consumer)
removeDataConsumer
in interface javax.infobus.InfoBusDataController
consumer
- - the DataConsumer that is leaving the InfoBuspublic void removeDataProducer(javax.infobus.InfoBusDataProducer producer)
removeDataProducer
in interface javax.infobus.InfoBusDataController
producer
- - the DataProducer that is leaving the InfoBuspublic boolean fireItemRevoked(java.lang.String dataItemName, javax.infobus.InfoBusDataProducer producer)
Note that the DataController should copy the source field it receives to any target-specific method that the controller calls.
fireItemRevoked
in interface javax.infobus.InfoBusDataController
dataItemName
- the name of the DataItem being revoked by sourceproducer
- the Producer no longer offering the DataItempublic boolean fireItemAvailable(java.lang.String dataItemName, java.awt.datatransfer.DataFlavor[] flavors, javax.infobus.InfoBusDataProducer producer)
Note that the DataController should copy the source field it receives to any target-specific method that the controller calls
fireItemAvailable
in interface javax.infobus.InfoBusDataController
dataItemName
- the name of the DataItem made available by sourceflavors
- the DataFlavors the source makes available (optional, possibly null)source
- the Producer offering the DataItempublic boolean findDataItem(java.lang.String dataItemName, java.awt.datatransfer.DataFlavor[] flavors, javax.infobus.InfoBusDataConsumer consumer, java.util.Vector foundItem)
If the DataController returns a DataItem from this method, the InfoBus will stop seeking the data and return that DataItem (calling no other controllers). If foundItem is empty when the call completes, the InfoBus uses the boolean return value to determine whether to continue polling controllers: if true, polling stops and null is returned to the consumer.
findDataItem
in interface javax.infobus.InfoBusDataController
dataItemName
- the name of the DataItem that the consumer is seekingflavors
- the DataFlavors the consumer prefers (optional, possibly null)consumer
- the Consumer seeking the datafoundItem
- a Vector for storing the result which will be empty when
the method is calledpublic boolean findMultipleDataItems(java.lang.String dataItemName, java.awt.datatransfer.DataFlavor[] flavors, javax.infobus.InfoBusDataConsumer consumer, java.util.Vector foundItems)
All non-null responses should be stored in the foundItems Vector. The responses returned by this controller will be concatenated with those of the controllers called before and after this one. If the return value is true, no further controllers will be polled.
findMultipleDataItems
in interface javax.infobus.InfoBusDataController
dataItemName
- the name of the DataItem that the consumer is seekingflavors
- the DataFlavors the consumer prefers (optional, possibly null)consumer
- the Consumer seeking the datafoundItems
- a Vector for storing all non-null results;
will be empty when the method is calledpublic void propertyChange(java.beans.PropertyChangeEvent ev)
propertyChange
in interface java.beans.PropertyChangeListener
propertyChange
in class FwkPort
ev
- The property change event