|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.EventObject | +--javax.infobus.InfoBusEvent | +--javax.infobus.InfoBusItemRequestedEvent
This event is sent on behalf of a data consumer to find a named data item it would like to receive. The data consumer causes this event to be distributed to producers by calling one of the InfoBus findXXX methods.
A data producer can respond to this event by setting the data item field in this event with the requested DataItem object, using the setDataItem method. The InfoBus calls the getDataItem method on this event to get the data item to return to the data consumer via the InfoBus findXXX method that was originally called.
Method Summary | |
java.awt.datatransfer.DataFlavor[] |
getDataFlavors()
Exposes the DataFlavors that the consumer prefers, as a hint to producers that can supply data in more than one format. |
java.lang.Object |
getDataItem()
Allows the handler of the event to unpack a DataItem that was provided in response to the request. |
InfoBusDataConsumer |
getSourceAsConsumer()
Returns the source of the InfoBusItemRequestedEvent, which is always an InfoBusDataConsumer. |
void |
setDataItem(java.lang.Object item)
If the DataItem field in the event is currently null, sets that field to the value passed as item. |
Methods inherited from class javax.infobus.InfoBusEvent |
getDataItemName |
Methods inherited from class java.util.EventObject |
getSource,
toString |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Method Detail |
public java.awt.datatransfer.DataFlavor[] getDataFlavors()
The consumer may specify MIME types in the order it prefers, including
InfoBus and standard MIME types. A special MIME string
MIME_TYPE_ANY_ACCESS
indicates that a consumer will accept
any type of InfoBus access interface available for the item. The
producer is not required to consider the requested DataFlavors in
supplying the data item.
public void setDataItem(java.lang.Object item)
This is a write-once method, and attempts to replace a non-null DataItem have no effect. The DataItemm field is null [writable] when this event is first delivered to a producer.
item
- the value to set the DataItem field topublic java.lang.Object getDataItem()
public InfoBusDataConsumer getSourceAsConsumer()
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |